From: Don Slice Date: Wed, 13 Jan 2016 14:02:46 +0000 (-0800) Subject: lib:removed onmatch next and onmatch goto from route-map deny X-Git-Tag: frr-2.0-rc1~1162^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7ebab1fb57beac8dd1afc51e4b3e0ef2eb085b45;p=mirror%2Ffrr.git lib:removed onmatch next and onmatch goto from route-map deny Ticket: CM-7566 Reviewed By: Daniel Walton, Donald Sharp Testing Done: Manual testing - see bug Since on a route-map deny clause, the route-map will end on match, the on-match next and on-match goto statements are meaningless and confusing. Removed them. Signed-off-by: Don Slice --- diff --git a/lib/routemap.c b/lib/routemap.c index e760dacf7d..53df69dfcd 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1531,8 +1531,16 @@ DEFUN (rmap_onmatch_next, index = vty->index; if (index) - index->exitpolicy = RMAP_NEXT; - + { + if (index->type == RMAP_DENY) + { + /* Under a deny clause, match means it's finished. No need to set next */ + vty_out (vty, "on-match next not supported under route-map deny%s", + VTY_NEWLINE); + return CMD_WARNING; + } + index->exitpolicy = RMAP_NEXT; + } return CMD_SUCCESS; } @@ -1565,6 +1573,14 @@ DEFUN (rmap_onmatch_goto, if (index) { + if (index->type == RMAP_DENY) + { + /* Under a deny clause, match means it's finished. No need to go anywhere */ + vty_out (vty, "on-match goto not supported under route-map deny%s", + VTY_NEWLINE); + return CMD_WARNING; + } + if (argc == 1 && argv[0]) VTY_GET_INTEGER_RANGE("route-map index", d, argv[0], 1, 65536); else