Commit 82bfee76 authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

Filter: Remove quitbird command

No need for this debug filter command and it can be abused from CLI.
parent b12442c9
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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>


+2 −3
Original line number Diff line number Diff line
@@ -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; }
 ;
+0 −2
Original line number Diff line number Diff line
@@ -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? */
+0 −2
Original line number Diff line number Diff line
@@ -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");
  }
+0 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ protocol static {
			print scope;
			if !(scope ~ [ SCOPE_HOST, SCOPE_SITE ]) then {
				print "Failed in test";
				quitbird;
			}

			preference = 15;