]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: change debug_bgp_bestpath_prefix to DEFUN
authorDaniel Walton <dwalton@cumulusnetworks.com>
Wed, 20 Sep 2017 15:12:17 +0000 (19:12 +0400)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Wed, 20 Sep 2017 15:12:17 +0000 (19:12 +0400)
bgpd/bgp_debug.c

index e4ebb6af2f650f8ddfc458d1d07cd80a058af3ca..36ac73ae01f05996a5983c0d06030a427332e6ef 100644 (file)
@@ -870,9 +870,9 @@ DEFUN (no_debug_bgp_keepalive_peer,
 #endif
 
 /* debug bgp bestpath */
-DEFPY (debug_bgp_bestpath_prefix,
+DEFUN (debug_bgp_bestpath_prefix,
        debug_bgp_bestpath_prefix_cmd,
-       "debug bgp bestpath <A.B.C.D/M|X:X::X:X/M>$bestpath",
+       "debug bgp bestpath <A.B.C.D/M|X:X::X:X/M>",
        DEBUG_STR
        BGP_STR
        "BGP bestpath\n"
@@ -883,28 +883,28 @@ DEFPY (debug_bgp_bestpath_prefix,
        int idx_ipv4_ipv6_prefixlen = 3;
 
        argv_p = prefix_new();
-       str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
+       (void)str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
        apply_mask(argv_p);
 
        if (!bgp_debug_bestpath_prefixes)
                bgp_debug_bestpath_prefixes = list_new();
 
        if (bgp_debug_list_has_entry(bgp_debug_bestpath_prefixes, NULL,
-                                    bestpath)) {
+                                    argv_p)) {
                vty_out(vty,
                        "BGP bestpath debugging is already enabled for %s\n",
-                       bestpath_str);
+                       argv[idx_ipv4_ipv6_prefixlen]->arg);
                return CMD_SUCCESS;
        }
 
-       bgp_debug_list_add_entry(bgp_debug_bestpath_prefixes, NULL, bestpath);
+       bgp_debug_list_add_entry(bgp_debug_bestpath_prefixes, NULL, argv_p);
 
        if (vty->node == CONFIG_NODE) {
                DEBUG_ON(bestpath, BESTPATH);
        } else {
                TERM_DEBUG_ON(bestpath, BESTPATH);
                vty_out(vty, "BGP bestpath debugging is on for %s\n",
-                       bestpath_str);
+                       argv[idx_ipv4_ipv6_prefixlen]->arg);
        }
 
        return CMD_SUCCESS;
@@ -925,7 +925,7 @@ DEFUN (no_debug_bgp_bestpath_prefix,
        int found_prefix = 0;
 
        argv_p = prefix_new();
-       str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
+       (void)str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
        apply_mask(argv_p);
 
        if (bgp_debug_bestpath_prefixes
@@ -1271,7 +1271,7 @@ DEFUN (debug_bgp_update_prefix,
        struct prefix *argv_p;
 
        argv_p = prefix_new();
-       str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
+       (void)str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
        apply_mask(argv_p);
 
        if (!bgp_debug_update_prefixes)
@@ -1313,7 +1313,7 @@ DEFUN (no_debug_bgp_update_prefix,
        int found_prefix = 0;
 
        argv_p = prefix_new();
-       str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
+       (void)str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
        apply_mask(argv_p);
 
        if (bgp_debug_update_prefixes
@@ -1404,7 +1404,7 @@ DEFUN (debug_bgp_zebra_prefix,
        struct prefix *argv_p;
 
        argv_p = prefix_new();
-       str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
+       (void)str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
        apply_mask(argv_p);
 
        if (!bgp_debug_zebra_prefixes)
@@ -1464,7 +1464,7 @@ DEFUN (no_debug_bgp_zebra_prefix,
        int found_prefix = 0;
 
        argv_p = prefix_new();
-       str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
+       (void)str2prefix(argv[idx_ipv4_ipv6_prefixlen]->arg, argv_p);
        apply_mask(argv_p);
 
        if (bgp_debug_zebra_prefixes