From: Ondrej Zajicek (work) Date: Wed, 29 Apr 2020 13:07:33 +0000 (+0200) Subject: Filter: Remove quitbird command X-Git-Tag: v2.0.8~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82bfee76f0adfd50d51833343c63ba9e2afcb60e;p=thirdparty%2Fbird.git Filter: Remove quitbird command No need for this debug filter command and it can be abused from CLI. --- diff --git a/doc/bird.sgml b/doc/bird.sgml index 1c60e619c..1808d04cb 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1698,9 +1698,6 @@ protocol sections. - Terminates BIRD. Useful when debugging the filter interpreter. diff --git a/filter/config.Y b/filter/config.Y index 49c59efca..77424a8b2 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -273,7 +273,7 @@ assert_assign(struct f_lval *lval, struct f_inst *expr, const char *start, const CF_DECLS CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN, - ACCEPT, REJECT, ERROR, QUITBIRD, + ACCEPT, REJECT, ERROR, INT, BOOL, IP, TYPE, PREFIX, RD, PAIR, QUAD, EC, LC, SET, STRING, BGPMASK, BGPPATH, CLIST, ECLIST, LCLIST, IF, THEN, ELSE, CASE, @@ -822,8 +822,7 @@ term: ; break_command: - QUITBIRD { $$ = F_QUITBIRD; } - | ACCEPT { $$ = F_ACCEPT; } + ACCEPT { $$ = F_ACCEPT; } | REJECT { $$ = F_REJECT; } | ERROR { $$ = F_ERROR; } ; diff --git a/filter/f-inst.c b/filter/f-inst.c index 3d1859181..63a6bdab2 100644 --- a/filter/f-inst.c +++ b/filter/f-inst.c @@ -479,8 +479,6 @@ FID_MEMBER(enum filter_return, fret, f1->fret != f2->fret, "%s", filter_return_str(item->fret)); switch (whati->fret) { - case F_QUITBIRD: - die( "Filter asked me to die" ); case F_ACCEPT: /* Should take care about turning ACCEPT into MODIFY */ case F_ERROR: case F_REJECT: /* Maybe print complete route along with reason to reject route? */ diff --git a/filter/filter.h b/filter/filter.h index 9d997efbf..26c1037b7 100644 --- a/filter/filter.h +++ b/filter/filter.h @@ -24,7 +24,6 @@ enum filter_return { F_ACCEPT, /* Need to preserve ordering: accepts < rejects! */ F_REJECT, F_ERROR, - F_QUITBIRD, }; static inline const char *filter_return_str(const enum filter_return fret) { @@ -36,7 +35,6 @@ static inline const char *filter_return_str(const enum filter_return fret) { FRS(F_ACCEPT); FRS(F_REJECT); FRS(F_ERROR); - FRS(F_QUITBIRD); #undef FRS default: bug("This shall not happen"); } diff --git a/filter/test.conf2 b/filter/test.conf2 index 485150200..e95f95634 100644 --- a/filter/test.conf2 +++ b/filter/test.conf2 @@ -43,7 +43,6 @@ protocol static { print scope; if !(scope ~ [ SCOPE_HOST, SCOPE_SITE ]) then { print "Failed in test"; - quitbird; } preference = 15;