]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Filter: Remove quitbird command
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Wed, 29 Apr 2020 13:07:33 +0000 (15:07 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Sat, 2 May 2020 00:47:18 +0000 (02:47 +0200)
No need for this debug filter command and it can be abused from CLI.

doc/bird.sgml
filter/config.Y
filter/f-inst.c
filter/filter.h
filter/test.conf2

index 1c60e619c6864f5f7ebe873b32a7b6f6211b6b68..1808d04cbdb087538a349d3dcbc7bf3c91cca087 100644 (file)
@@ -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>
 
 
index 49c59efcab5611f390ad87cae22b3f736808ffa0..77424a8b21c67586003f69cc481b9cdc9470861a 100644 (file)
@@ -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; }
  ;
index 3d1859181135e5290d6b3348e55a679e1275f36a..63a6bdab22a5bc1264c4378183b36351c9f5c1af 100644 (file)
     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? */
index 9d997efbf9b9c755256d11b2a024dbe4dc39527d..26c1037b71f815491019220636cd4222e0096861 100644 (file)
@@ -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");
   }
index 485150200c5cef64e9f8892f62b9983971ce9a64..e95f9563471d26bd5f286ba112faa2dcf6a2ea25 100644 (file)
@@ -43,7 +43,6 @@ protocol static {
                        print scope;
                        if !(scope ~ [ SCOPE_HOST, SCOPE_SITE ]) then {
                                print "Failed in test";
-                               quitbird;
                        }
 
                        preference = 15;