From d4ff629fd82e20da93c5074ca7eebec7d3325abd Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 22 Nov 2009 08:36:40 -0800 Subject: [PATCH] Generate error on port == 0 --- Shorewall/Perl/Shorewall/IPAddrs.pm | 3 ++- Shorewall/Perl/Shorewall/Rules.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/IPAddrs.pm b/Shorewall/Perl/Shorewall/IPAddrs.pm index d17fc112b..47342de4b 100644 --- a/Shorewall/Perl/Shorewall/IPAddrs.pm +++ b/Shorewall/Perl/Shorewall/IPAddrs.pm @@ -72,7 +72,7 @@ our @EXPORT = qw( ALLIPv4 validate_icmp6 ); our @EXPORT_OK = qw( ); -our $VERSION = '4.4_1'; +our $VERSION = '4.4_5'; # # Some IPv4/6 useful stuff @@ -302,6 +302,7 @@ sub validate_port( $$ ) { my $value; if ( $port =~ /^(\d+)$/ ) { + fatal_error "Invalid Port Number (0)" unless $port; return $port if $port <= 65535; } else { $proto = proto_name $proto if $proto =~ /^(\d+)$/; diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 65798b7b3..3b3990816 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -46,7 +46,7 @@ our @EXPORT = qw( process_tos compile_stop_firewall ); our @EXPORT_OK = qw( process_rule process_rule1 initialize ); -our $VERSION = '4.4_4'; +our $VERSION = '4.4_5'; # # Set to one if we find a SECTION