From 8306b478bee23055c5b0c47991ca5f35225e885d Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 19 Nov 2007 18:44:27 -0800 Subject: Add syntax validation for as-path prepend. --- scripts/policy/vyatta-check-as-prepend.pl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 scripts/policy/vyatta-check-as-prepend.pl (limited to 'scripts/policy/vyatta-check-as-prepend.pl') diff --git a/scripts/policy/vyatta-check-as-prepend.pl b/scripts/policy/vyatta-check-as-prepend.pl new file mode 100755 index 00000000..0da3d8d6 --- /dev/null +++ b/scripts/policy/vyatta-check-as-prepend.pl @@ -0,0 +1,6 @@ +#!/usr/bin/perl +@as_list = split(' ',$ARGV[0]); +foreach $as (@as_list) { + if ($as =~ /[^\d\s]/ || $as < 1 || $as > 65535) { exit 1;} +} +exit 0; -- cgit v1.2.3