summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_routemap.c
diff options
context:
space:
mode:
authorJuergen Kammer <j.kammer@eurodata.de>2007-04-09 14:03:25 -0500
committerJeffrey C. Ollie <jeff@ocjtech.us>2007-04-09 14:03:25 -0500
commitfc4dc72017e8208111866382782640117d03fb5f (patch)
treec3a8747eeb471098d0dfb4f2e9138d1ac0cfa2f7 /bgpd/bgp_routemap.c
parent6502208c3217e52e693146e6b72e76fd76982a51 (diff)
downloadquagga-fc4dc72017e8208111866382782640117d03fb5f.tar.bz2
quagga-fc4dc72017e8208111866382782640117d03fb5f.tar.xz
Applying quagga-cvs20070307-as4-v05.patchquagga-cvs20070307-as4-v05.patch
Diffstat (limited to 'bgpd/bgp_routemap.c')
-rw-r--r--bgpd/bgp_routemap.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 806a5072..a0f8eff4 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -1636,7 +1636,7 @@ route_set_aggregator_as_compile (const char *arg)
sscanf (arg, "%s %s", as, address);
- aggregator->as = strtoul (as, NULL, 10);
+ aggregator->as = str2asnum (as, NULL);
inet_aton (address, &aggregator->address);
return aggregator;
@@ -3234,7 +3234,7 @@ DEFUN (no_set_atomic_aggregate,
DEFUN (set_aggregator_as,
set_aggregator_as_cmd,
- "set aggregator as <1-65535> A.B.C.D",
+ "set aggregator as ASNUMBER A.B.C.D",
SET_STR
"BGP aggregator attribute\n"
"AS number of aggregator\n"
@@ -3246,7 +3246,14 @@ DEFUN (set_aggregator_as,
struct in_addr address;
char *argstr;
- VTY_GET_INTEGER_RANGE ("AS Path", as, argv[0], 1, BGP_AS_MAX);
+ as = str2asnum( argv[0], NULL );
+ if ( !as )
+ {
+ vty_out (vty, "%s is not a valid as number.%s",
+ argv[0],
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
ret = inet_aton (argv[1], &address);
if (ret == 0)
@@ -3283,7 +3290,13 @@ DEFUN (no_set_aggregator_as,
if (argv == 0)
return bgp_route_set_delete (vty, vty->index, "aggregator as", NULL);
- VTY_GET_INTEGER_RANGE ("AS Path", as, argv[0], 1, BGP_AS_MAX);
+ as = str2asnum( argv[0], NULL );
+ if ( !as ) {
+ vty_out (vty, "%s is not a valid as number.%s",
+ argv[0],
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
ret = inet_aton (argv[1], &address);
if (ret == 0)
@@ -3306,7 +3319,7 @@ DEFUN (no_set_aggregator_as,
ALIAS (no_set_aggregator_as,
no_set_aggregator_as_val_cmd,
- "no set aggregator as <1-65535> A.B.C.D",
+ "no set aggregator as ASNUMBER A.B.C.D",
NO_STR
SET_STR
"BGP aggregator attribute\n"