]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes error handling in ASN expressions.
authorOndrej Zajicek <santiago@crfreenet.org>
Fri, 8 Oct 2010 23:00:53 +0000 (01:00 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Fri, 8 Oct 2010 23:00:53 +0000 (01:00 +0200)
filter/filter.c

index 3b150a7402d94a99dc5df6280c860c4fa4edb747..8426a214da0991eea94dedb5bb51f2dcb95ca9c1 100644 (file)
@@ -1150,10 +1150,7 @@ f_eval_asn(struct f_inst *expr)
 {
   /* Called as a part of another interpret call, therefore no log_reset() */
   struct f_val res = interpret(expr);
-  if (res.type != T_INT)
-    cf_error("Can't operate with value of non-integer type in AS path mask constructor");
-  return res.val.i;
+  return (res.type == T_INT) ? res.val.i : 0;
 }
 
 /**