summaryrefslogtreecommitdiff
path: root/scripts/policy/vyatta-check-as-prepend.pl
blob: a34ca0a757cd1f7741d7a9c516c8633ae9cc3381 (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/perl
@as_list = split(' ',$ARGV[0]);
foreach $as (@as_list) {
    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;