Complain when filter does not end in accept nor reject.
This commit is contained in:
parent
b5958826cc
commit
0b1cad8162
2 changed files with 3 additions and 2 deletions
|
@ -736,8 +736,10 @@ f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struc
|
||||||
f_pool = tmp_pool;
|
f_pool = tmp_pool;
|
||||||
inst = filter->root;
|
inst = filter->root;
|
||||||
res = interpret(inst);
|
res = interpret(inst);
|
||||||
if (res.type != T_RETURN)
|
if (res.type != T_RETURN) {
|
||||||
|
log( L_ERR "Filter %s did not return accept nor reject. Make up your mind", filter->name);
|
||||||
return F_ERROR;
|
return F_ERROR;
|
||||||
|
}
|
||||||
DBG( "done (%d)\n", res.val.i );
|
DBG( "done (%d)\n", res.val.i );
|
||||||
return res.val.i;
|
return res.val.i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,6 @@ protocol static {
|
||||||
bgp_community.empty;
|
bgp_community.empty;
|
||||||
print "community = ", bgp_community;
|
print "community = ", bgp_community;
|
||||||
print "done";
|
print "done";
|
||||||
accept;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
route 0.0.0.0/0 via 195.113.31.113;
|
route 0.0.0.0/0 via 195.113.31.113;
|
||||||
|
|
Loading…
Reference in a new issue