summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-11-16 22:16:04 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-11-16 22:16:04 +0100
commit44711e0ca2658da080e04ce7e208a78c9b20e927 (patch)
tree6cab7c316f982d53c4516f0a0d76f96b3a044b70
parentebacaf6f7b4418dd283fd3e39b84e48e331a6a66 (diff)
downloadbird-44711e0ca2658da080e04ce7e208a78c9b20e927.tar
bird-44711e0ca2658da080e04ce7e208a78c9b20e927.zip
Fix some bugs in filter interpret.
-rw-r--r--filter/filter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/filter/filter.c b/filter/filter.c
index bdc6f08..6288df7 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -655,7 +655,7 @@ interpret(struct f_inst *what)
ONEARG;
res = v1;
res.type |= T_RETURN;
- break;
+ return res;
case P('c','a'): /* CALL: this is special: if T_RETURN and returning some value, mask it out */
ONEARG;
res = interpret(what->a2.p);
@@ -676,7 +676,10 @@ interpret(struct f_inst *what)
}
}
/* It is actually possible to have t->data NULL */
- return interpret(t->data);
+
+ res = interpret(t->data);
+ if (res.type & T_RETURN)
+ return res;
}
break;
case P('i','M'): /* IP.MASK(val) */