diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-03-14 17:22:22 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-03-14 17:31:40 +0100 |
commit | 875cc073b067f295cccc668008e10218f8e98dd3 (patch) | |
tree | 28f65beeab81c8b422dd9d7c18a4f4f331adeb31 /nest/rt-attr.c | |
parent | 9aa77fccebc4d84b5e1496884cd124d09893041b (diff) |
Nest: Update handling of temporary attributes
The temporary atttributes are no longer removed by ea_do_prune(), but
they are undefined by store_tmp_attrs() protocol hooks. This fixes
several bugs where temporary attributes were removed when they should
not or not removed when they should be. The flag EAF_TEMP is no longer
needed and was removed.
Update all protocol make_tmp_attrs() / store_tmp_attrs() hooks to use
helper functions and to handle unset attributes properly.
Also fix some related bugs like improper handling of empty eattr list.
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r-- | nest/rt-attr.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c index 3e4578b0..cc362cab 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -571,8 +571,8 @@ ea_do_sort(ea_list *e) } /** - * In place discard duplicates, undefs and temporary attributes in sorted - * ea_list. We use stable sort for this reason. + * In place discard duplicates and undefs in sorted ea_list. We use stable sort + * for this reason. **/ static inline void ea_do_prune(ea_list *e) @@ -596,10 +596,6 @@ ea_do_prune(ea_list *e) if ((s0->type & EAF_TYPE_MASK) == EAF_TYPE_UNDEF) continue; - /* Drop temporary attributes */ - if (s0->type & EAF_TEMP) - continue; - /* Copy the newest version to destination */ *d = *s0; @@ -979,8 +975,6 @@ ea_dump(ea_list *e) { eattr *a = &e->attrs[i]; debug(" %02x:%02x.%02x", EA_PROTO(a->id), EA_ID(a->id), a->flags); - if (a->type & EAF_TEMP) - debug("T"); debug("=%c", "?iO?I?P???S?????" [a->type & EAF_TYPE_MASK]); if (a->type & EAF_ORIGINATED) debug("o"); |