]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[bgpd] Fixed as-path prepend/exclude ASN handling
authorDenis Ovsienko <pilot@etcnet.org>
Tue, 9 Jun 2009 11:15:33 +0000 (15:15 +0400)
committerDenis Ovsienko <pilot@etcnet.org>
Tue, 9 Jun 2009 11:15:33 +0000 (15:15 +0400)
 - aspath_gettoken(): use as_t to fix 4-byte ASN scanning (bug #484)
 - set_aspath_prepend_cmd(): use CMD_AS_RANGE in message to match
   actual range
 - no_set_aspath_prepend_val_cmd(): idem
 - set_aspath_exclude_cmd(): idem
 - no_set_aspath_exclude_val_cmd(): idem

bgpd/bgp_aspath.c
bgpd/bgp_routemap.c

index a1e4608fe97714f120904f40092c31dff4324996..d0d621c22be7d1f848ef816052d5cf985f3c5204 100644 (file)
@@ -1642,7 +1642,7 @@ aspath_gettoken (const char *buf, enum as_token *token, u_long *asno)
   /* Check actual AS value. */
   if (isdigit ((int) *p)) 
     {
-      u_short asval;
+      as_t asval;
       
       *token = as_token_asval;
       asval = (*p - '0');
index bb9014feea16f899d35728206fb9f392de842239..d86937ba035225c3354a884be9548bb2482c5df0 100644 (file)
@@ -3053,7 +3053,7 @@ ALIAS (no_set_weight,
 
 DEFUN (set_aspath_prepend,
        set_aspath_prepend_cmd,
-       "set as-path prepend .<1-65535>",
+       "set as-path prepend ." CMD_AS_RANGE,
        SET_STR
        "Transform BGP AS_PATH attribute\n"
        "Prepend to the as-path\n"
@@ -3091,7 +3091,7 @@ DEFUN (no_set_aspath_prepend,
 
 ALIAS (no_set_aspath_prepend,
        no_set_aspath_prepend_val_cmd,
-       "no set as-path prepend .<1-65535>",
+       "no set as-path prepend ." CMD_AS_RANGE,
        NO_STR
        SET_STR
        "Transform BGP AS_PATH attribute\n"
@@ -3100,7 +3100,7 @@ ALIAS (no_set_aspath_prepend,
 
 DEFUN (set_aspath_exclude,
        set_aspath_exclude_cmd,
-       "set as-path exclude .<1-65535>",
+       "set as-path exclude ." CMD_AS_RANGE,
        SET_STR
        "Transform BGP AS-path attribute\n"
        "Exclude from the as-path\n"
@@ -3137,7 +3137,7 @@ DEFUN (no_set_aspath_exclude,
 
 ALIAS (no_set_aspath_exclude,
        no_set_aspath_exclude_val_cmd,
-       "no set as-path exclude .<1-65535>",
+       "no set as-path exclude ." CMD_AS_RANGE,
        NO_STR
        SET_STR
        "Transform BGP AS_PATH attribute\n"