summaryrefslogtreecommitdiff
path: root/scripts/policy/vyatta-check-as-prepend.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/policy/vyatta-check-as-prepend.pl')
-rwxr-xr-xscripts/policy/vyatta-check-as-prepend.pl6
1 files changed, 6 insertions, 0 deletions
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;