diff options
author | Daniil Baturin <daniil@vyos.io> | 2020-07-26 11:52:31 +0300 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2020-07-26 11:53:46 +0300 |
commit | 878d8b34eb6af37d0cb9e2776527eb041a88bde2 (patch) | |
tree | eaa9f32f2cf563be5f9b40a6e72118ae695c8485 | |
parent | 19daa5d7363cd789561b1a4db34d9ffeaa5983b1 (diff) | |
download | vyatta-cfg-quagga-878d8b34eb6af37d0cb9e2776527eb041a88bde2.tar.gz vyatta-cfg-quagga-878d8b34eb6af37d0cb9e2776527eb041a88bde2.zip |
T2021: relax the OSPFv3 area restriction and allow decimal format.
-rwxr-xr-x | scripts/vyatta_quagga_utils.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/vyatta_quagga_utils.pl b/scripts/vyatta_quagga_utils.pl index ffeeaa04..a4c68e68 100755 --- a/scripts/vyatta_quagga_utils.pl +++ b/scripts/vyatta_quagga_utils.pl @@ -93,6 +93,15 @@ sub check_ospf_area { sub check_ospfv3_area { my $area = shift; + # allow both decimal or dotted decimal, + # In FRR post PR#6700 it's no longer an issue + # + if ( $area =~ m/^\d+$/ ) { + if ( $area >= 0 && $area <= 4294967295 ) { + exit 0; + } + } + if ( $area =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ ) { foreach my $octet ( $1, $2, $3, $4 ) { if ( ( $octet < 0 ) || ( $octet > 255 ) ) { exit 1; } @@ -100,7 +109,7 @@ sub check_ospfv3_area { exit 0; } - die "Invalid OSPF area: $area. Only dotted decimal notation is allowed.\n"; + die "Invalid OSPF area: $area\n"; } sub check_community { |