]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: pass correct parameters to remove static routes with tags 134/head
authorDon Slice <dslice@cumulusnetworks.com>
Thu, 26 Jan 2017 20:49:00 +0000 (12:49 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 30 Jan 2017 18:40:53 +0000 (13:40 -0500)
Problem found in testing where certain "no ip route ... tag x" commands
would fail.  This was due to a change in tag processing where the tag
value is validated and previously some of the parameters were passed
incorrectly.  This caused the validation to fail.  This change ensures
the correct parameters are passed for evaluation as tags.  Manual testing
completed and the previously failing test now passes.  bgp and ospf smoke
tests will also be performed before pushing.

Ticket: CM-14605
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-5627
zebra/zebra_vty.c

index 508819862440ab1bc11d3bd08e83a53c10482d0c..40bf0eac78a3f2ccd9ab6b1f727da0997fe1e614 100644 (file)
@@ -791,7 +791,7 @@ ALIAS (no_ip_route,
        "Emit an ICMP unreachable when matched\n"
        "Silently discard pkts when matched\n")
 
-ALIAS (no_ip_route_tag,
+DEFUN (no_ip_route_flags_tag,
        no_ip_route_flags_tag_cmd,
        "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295>",
        NO_STR
@@ -804,6 +804,10 @@ ALIAS (no_ip_route_tag,
        "Silently discard pkts when matched\n"
        "Tag of this route\n"
        "Tag value\n")
+{
+  return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3],
+                            NULL, NULL, NULL);
+}
 
 DEFUN (no_ip_route_flags2,
        no_ip_route_flags2_cmd,
@@ -831,7 +835,7 @@ DEFUN (no_ip_route_flags2_tag,
        "Tag of this route\n"
        "Tag value\n")
 {
-  return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, argv[1],
+  return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, argv[2],
                             NULL, NULL, NULL);
 }
 
@@ -882,7 +886,7 @@ ALIAS (no_ip_route_mask,
        "Emit an ICMP unreachable when matched\n"
        "Silently discard pkts when matched\n")
 
-ALIAS (no_ip_route_mask_tag,
+DEFUN (no_ip_route_mask_flags_tag,
        no_ip_route_mask_flags_tag_cmd,
        "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295>",
        NO_STR
@@ -896,6 +900,10 @@ ALIAS (no_ip_route_mask_tag,
        "Silently discard pkts when matched\n"
        "Tag of this route\n"
        "Tag value\n")
+{
+  return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[4],
+                            NULL, NULL, NULL);
+}
 
 DEFUN (no_ip_route_mask_flags2,
        no_ip_route_mask_flags2_cmd,
@@ -925,7 +933,7 @@ DEFUN (no_ip_route_mask_flags2_tag,
        "Tag of this route\n"
        "Tag value\n")
 {
-  return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, argv[2],
+  return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, argv[3],
                             NULL, NULL, NULL);
 }