]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix 'set as-path prepend last-as 10'
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 15 Apr 2017 00:13:26 +0000 (20:13 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 15 Apr 2017 00:13:26 +0000 (20:13 -0400)
1) Fix missing newline in help string
2) Make the ability to have 10 be consistent with the stable/2.0 branch.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_routemap.c

index bafc81eaf8a0408511f757b5352dec9c3cf6ddf2..9b5a7a5ebb0b01ea2a1882c4f7a8d32d94c1f02a 100644 (file)
@@ -1437,7 +1437,7 @@ route_set_aspath_prepend_compile (const char *arg)
 {
   unsigned int num;
 
-  if (sscanf(arg, "last-as %u", &num) == 1 && num > 0 && num < 10)
+  if (sscanf(arg, "last-as %u", &num) == 1 && num > 0 && num <= 10)
     return (void*)(uintptr_t)num;
 
   return route_aspath_compile(arg);
@@ -3677,12 +3677,12 @@ DEFUN (set_aspath_prepend_asn,
 
 DEFUN (set_aspath_prepend_lastas,
        set_aspath_prepend_lastas_cmd,
-       "set as-path prepend last-as (1-9)",
+       "set as-path prepend last-as (1-10)",
        SET_STR
        "Transform BGP AS_PATH attribute\n"
        "Prepend to the as-path\n"
        "Use the peer's AS-number\n"
-       "Number of times to insert")
+       "Number of times to insert\n")
 {
   return set_aspath_prepend_asn (self, vty, argc, argv);
 }