diff options
author | Maria Matejka <mq@ucw.cz> | 2022-03-14 11:13:48 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-04-06 18:14:08 +0200 |
commit | 0f68515263e91dd49b2d845cdff35af40c064dc2 (patch) | |
tree | 8ae7a4859016173a191bd38e8d4aab160dc49825 /filter | |
parent | 63cf5d5d8c8e156a1f427614c8017ca71c32191c (diff) |
Unsetting route attributes without messing with type system
Diffstat (limited to 'filter')
-rw-r--r-- | filter/f-inst.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/filter/f-inst.c b/filter/f-inst.c index e2212c5b..0226f729 100644 --- a/filter/f-inst.c +++ b/filter/f-inst.c @@ -714,9 +714,6 @@ case EAF_TYPE_LC_SET: RESULT_(T_LCLIST, ad, e->u.ptr); break; - case EAF_TYPE_UNDEF: - RESULT_VOID; - break; default: bug("Unknown dynamic attribute type"); } @@ -794,23 +791,8 @@ ACCESS_RTE; ACCESS_EATTRS; - { - struct ea_list *l = lp_alloc(fs->pool, sizeof(struct ea_list) + sizeof(eattr)); - - l->next = NULL; - l->flags = EALF_SORTED; - l->count = 1; - l->attrs[0].id = da.ea_code; - l->attrs[0].flags = 0; - l->attrs[0].type = EAF_TYPE_UNDEF; - l->attrs[0].originated = 1; - l->attrs[0].fresh = 1; - l->attrs[0].u.data = 0; - - f_rta_cow(fs); - l->next = *fs->eattrs; - *fs->eattrs = l; - } + f_rta_cow(fs); + ea_unset_attr(fs->eattrs, fs->pool, 1, da.ea_code); } INST(FI_LENGTH, 1, 1) { /* Get length of */ |