diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2008-05-17 16:30:32 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2008-05-17 16:30:32 -0700 |
commit | d78fc63fe037e2dc1fc0f2cde5ecfdb3eab69d8f (patch) | |
tree | 3e9e7b764b044dcf3718b8443f538c94a8006139 | |
parent | 17ed70940a38afa3da375c1b7621ceeb30530852 (diff) | |
download | vyatta-cfg-quagga-d78fc63fe037e2dc1fc0f2cde5ecfdb3eab69d8f.tar.gz vyatta-cfg-quagga-d78fc63fe037e2dc1fc0f2cde5ecfdb3eab69d8f.zip |
Fix 3266: Syntax validation for as-path-prepend does not allow 32 bit ASNs
Fix 3268 : CLI allows an as-path-prepend of > 24 ASNs but routing engine does not appear to support > 24
-rwxr-xr-x | scripts/policy/vyatta-check-as-prepend.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/policy/vyatta-check-as-prepend.pl b/scripts/policy/vyatta-check-as-prepend.pl index 0da3d8d6..a34ca0a7 100755 --- a/scripts/policy/vyatta-check-as-prepend.pl +++ b/scripts/policy/vyatta-check-as-prepend.pl @@ -1,6 +1,10 @@ #!/usr/bin/perl @as_list = split(' ',$ARGV[0]); foreach $as (@as_list) { - if ($as =~ /[^\d\s]/ || $as < 1 || $as > 65535) { exit 1;} + if ($as =~ /[^\d\s]/ || $as < 1 || $as > 4294967294) { exit 1;} +} +if (scalar(@as_list) > 24) { + print "Error: max 24 as paths"; + exit 1; } exit 0; |