]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fix some bugs in filter interpret.
authorOndrej Zajicek <santiago@crfreenet.org>
Sun, 16 Nov 2008 21:16:04 +0000 (22:16 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Sun, 16 Nov 2008 21:16:04 +0000 (22:16 +0100)
filter/filter.c

index bdc6f088549221da80dd6efdb17ae3da9ec5029d..6288df7fba082a47abc3b52a4ac5c09c9d774ff6 100644 (file)
@@ -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) */