From 646050e57af95df01ee0aea7fad2cc10230e41e1 Mon Sep 17 00:00:00 2001 From: Mitesh Kanjariya Date: Wed, 12 Jul 2017 14:55:22 -0700 Subject: [PATCH] bgp: fix match mac address/match evpn vni commands Ticket: CM-17071 Review: CCR-6454 Unit-test: Manual Signed-off-by: Mitesh Kanjariya --- bgpd/bgp_routemap.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index bde0363ae7..69b798a01c 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -667,7 +667,8 @@ static void route_match_vni_free(void *rule) /* Route map commands for vni matching. */ struct route_map_rule_cmd route_match_evpn_vni_cmd = { - "vni", route_match_vni, route_match_vni_compile, route_match_vni_free}; + "evpn vni", route_match_vni, route_match_vni_compile, + route_match_vni_free}; /* `match local-preference LOCAL-PREF' */ @@ -3105,16 +3106,13 @@ DEFUN (match_mac_address, DEFUN (no_match_mac_address, no_match_mac_address_cmd, - "no match mac address", + "no match mac address WORD", NO_STR MATCH_STR "mac\n" - "Match address of route\n") + "Match address of route\n" + "MAC acess-list name\n") { - if (argc == 0) - return bgp_route_match_delete(vty, "mac address", NULL, - RMAP_EVENT_FILTER_DELETED); - return bgp_route_match_delete(vty, "mac address", argv[4]->arg, RMAP_EVENT_FILTER_DELETED); } @@ -3127,7 +3125,7 @@ DEFUN (match_evpn_vni, "Match VNI\n" "VNI ID\n") { - return bgp_route_match_add(vty, "evpn vni", argv[2]->arg, + return bgp_route_match_add(vty, "evpn vni", argv[3]->arg, RMAP_EVENT_MATCH_ADDED); } @@ -3140,7 +3138,7 @@ DEFUN (no_match_evpn_vni, "Match VNI\n" "VNI ID\n") { - return bgp_route_match_delete(vty, "evpn vni", argv[3]->arg, + return bgp_route_match_delete(vty, "evpn vni", argv[4]->arg, RMAP_EVENT_MATCH_DELETED); } -- 2.39.5