diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/TypeChecker.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Vyatta/TypeChecker.pm b/lib/Vyatta/TypeChecker.pm index 124dc17..086fee7 100755 --- a/lib/Vyatta/TypeChecker.pm +++ b/lib/Vyatta/TypeChecker.pm @@ -124,6 +124,10 @@ sub validate_protocol { my $value = shift; $value = lc $value; return 1 if ($value eq 'all'); + if ($value =~ /^\d+$/) { + # 0 has special meaning to iptables + return 1 if $value >= 1 and $value <= 255; + } if (!open(IN, "</etc/protocols")) { print "can't open /etc/protocols"; return 0; |