diff options
author | Denis Ovsienko <pilot@etcnet.org> | 2009-06-18 15:18:15 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2009-06-18 15:18:15 -0700 |
commit | 7ae50cb6d1b373b8a8758826c39e910db1995a4a (patch) | |
tree | e5404c94e44933a524b5b26ebecbc2f4d0fb3eed | |
parent | d97bd7f97244c51ae65d6aca866b41f6e734a457 (diff) | |
download | quagga-7ae50cb6d1b373b8a8758826c39e910db1995a4a.tar.bz2 quagga-7ae50cb6d1b373b8a8758826c39e910db1995a4a.tar.xz |
[bgpd] Fixed as-path prepend/exclude ASN handling
- 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
-rw-r--r-- | bgpd/bgp_aspath.c | 2 | ||||
-rw-r--r-- | bgpd/bgp_routemap.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index a7c72a9d..c7c40094 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -1637,7 +1637,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'); diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 30e40a1a..4fff0268 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3048,7 +3048,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" @@ -3086,7 +3086,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" @@ -3095,7 +3095,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" @@ -3132,7 +3132,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" |