summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-04-08 17:47:14 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-04-08 17:47:14 +0200
commit0277cc0baf1439a779f4c3ed8b2a77f29f5cfed7 (patch)
treebd3e456c88b8d64589d6496959330f8f3671be89
parent646b24d93249199ee59fdecd685532212b506bda (diff)
downloadbird-0277cc0baf1439a779f4c3ed8b2a77f29f5cfed7.tar
bird-0277cc0baf1439a779f4c3ed8b2a77f29f5cfed7.zip
Revert "Fixes behavior of defined() on bgp_community attribute."
This reverts commit 74e9331fe0892c4c96b4c4d7db3f14bb7e9d928e.
-rw-r--r--filter/filter.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/filter/filter.c b/filter/filter.c
index ae3b03a..3230610 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -621,6 +621,12 @@ interpret(struct f_inst *what)
e = ea_find( (*f_rte)->attrs->eattrs, what->a2.i );
if (!e) {
+ /* A special case: undefined int_set looks like empty int_set */
+ if ((what->aux & EAF_TYPE_MASK) == EAF_TYPE_INT_SET) {
+ res.type = T_CLIST;
+ res.val.ad = adata_empty(f_pool);
+ break;
+ }
/* Undefined value */
res.type = T_VOID;
break;
@@ -836,11 +842,7 @@ interpret(struct f_inst *what)
case P('C','a'): /* Community list add or delete */
TWOARGS;
-
- /* Replace undefined value with empty community list */
- if (v1.type == T_VOID)
- v1.val.ad = adata_empty(f_pool);
- else if (v1.type != T_CLIST)
+ if (v1.type != T_CLIST)
runtime("Can't add/delete to non-clist");
if ((v2.type == T_PAIR) || (v2.type == T_QUAD))