From 0b1cad81623e85f1f1b9ef3652cdc389641496e5 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Wed, 31 May 2000 21:50:13 +0000 Subject: Complain when filter does not end in accept nor reject. --- filter/filter.c | 4 +++- filter/test.conf2 | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/filter/filter.c b/filter/filter.c index 59b9658..f1a8f8f 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -736,8 +736,10 @@ f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struc f_pool = tmp_pool; inst = filter->root; 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; + } DBG( "done (%d)\n", res.val.i ); return res.val.i; } diff --git a/filter/test.conf2 b/filter/test.conf2 index 64991f7..055e49a 100644 --- a/filter/test.conf2 +++ b/filter/test.conf2 @@ -57,7 +57,6 @@ protocol static { bgp_community.empty; print "community = ", bgp_community; print "done"; - accept; }; route 0.0.0.0/0 via 195.113.31.113; -- cgit v1.2.3