diff options
-rw-r--r-- | filter/f-inst.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/filter/f-inst.c b/filter/f-inst.c index 33663329..b26facb0 100644 --- a/filter/f-inst.c +++ b/filter/f-inst.c @@ -826,13 +826,6 @@ eattr *e = ea_find(eal, da.ea_code); if (!e) { - /* A special case for tunnel encap */ - if (da.type == EAF_TYPE_TUNNEL_ENCAP) { - RESULT_(T_TLVLIST, tl, NULL); - runtime("Can't get null tunnel encap"); - break; - } - RESULT_VAL(val_empty(da.f_type)); break; } @@ -1339,10 +1332,10 @@ ARG(2, T_SET); METHOD_CONSTRUCTOR("add"); - if (subtlv_set_type(v2.val.t)) - RESULT(T_TLVLIST, tl, [[ tlv_set_add(fpool, v1.val.tl, tlv_alloc(fpool, v2.val.t)) ]]); - else - runtime("Can't add non-tlv"); + if (!subtlv_set_type(v2.val.t)) + runtime("Mismatched set type"); + + RESULT(T_TLVLIST, tl, [[ tlv_set_add(fpool, v1.val.tl, tlv_alloc(fpool, v2.val.t)) ]]); } INST(FI_TLVLIST_ADD_TLVLIST, 2, 1) { @@ -1547,30 +1540,30 @@ RESULT(T_LCLIST, ad, [[ lclist_filter(fpool, v1.val.ad, &v2, 1) ]]); } - INST(FI_TLVLIST_FILTER_TLVLIST, 2, 1) { + INST(FI_TLVLIST_FILTER_SET, 2, 1) { ARG(1, T_TLVLIST); ARG(2, T_SET); METHOD_CONSTRUCTOR("filter"); + if (!subtlv_set_type(v2.val.t)) + runtime("Mismatched set type"); + #if 0 RESULT(T_TLVLIST, tl, [[ tlvlist_filter(fpool, v1.val.tl, &v2, 1) ]]); #else - runtime("FI_TLVLIST_FILTER_TLVLIST disabled"); + runtime("FI_TLVLIST_FILTER_SET disabled"); #endif } - INST(FI_TLVLIST_FILTER_SET, 2, 1) { + INST(FI_TLVLIST_FILTER_TLVLIST, 2, 1) { ARG(1, T_TLVLIST); ARG(2, T_TLVLIST); METHOD_CONSTRUCTOR("filter"); - if (!subtlv_set_type(v2.val.t)) - runtime("Mismatched set type"); - #if 0 RESULT(T_TLVLIST, tl, [[ tlvlist_filter(fpool, v1.val.tl, &v2, 1) ]]); #else - runtime("FI_TLVLIST_FILTER_SET disabled"); + runtime("FI_TLVLIST_FILTER_TLVLIST disabled"); #endif } |