]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib:removed onmatch next and onmatch goto from route-map deny
authorDon Slice <dslice@cumulusnetworks.com>
Wed, 13 Jan 2016 14:02:46 +0000 (06:02 -0800)
committerDon Slice <dslice@cumulusnetworks.com>
Wed, 13 Jan 2016 14:10:18 +0000 (06:10 -0800)
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 <dslice@cumulusnetworks.com>
lib/routemap.c

index e760dacf7dc99773f993452796d9238a10891e4d..53df69dfcd772f6f2d2cc9f181d9f62aff151b41 100644 (file)
@@ -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