diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2020-04-29 15:07:33 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2020-05-02 02:47:18 +0200 |
commit | 82bfee76f0adfd50d51833343c63ba9e2afcb60e (patch) | |
tree | e2aa0226cefa9ffb5209671c642dcd26e4ab1935 | |
parent | b12442c985f2bd8c9fd47ca63151724962fabdc2 (diff) |
Filter: Remove quitbird command
No need for this debug filter command and it can be abused from CLI.
-rw-r--r-- | doc/bird.sgml | 3 | ||||
-rw-r--r-- | filter/config.Y | 5 | ||||
-rw-r--r-- | filter/f-inst.c | 2 | ||||
-rw-r--r-- | filter/filter.h | 2 | ||||
-rw-r--r-- | filter/test.conf2 | 1 |
5 files changed, 2 insertions, 11 deletions
diff --git a/doc/bird.sgml b/doc/bird.sgml index 1c60e619..1808d04c 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1698,9 +1698,6 @@ protocol sections. <tag><label id="print">print|printn <m/expr/ [<m/, expr.../]</tag> Prints given expressions; useful mainly while debugging filters. The <cf/printn/ variant does not terminate the line. - - <tag><label id="quitbird">quitbird</tag> - Terminates BIRD. Useful when debugging the filter interpreter. </descrip> diff --git a/filter/config.Y b/filter/config.Y index 49c59efc..77424a8b 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 3d185918..63a6bdab 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 9d997efb..26c1037b 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 48515020..e95f9563 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; |