From a7ab53e1354e6752aa6f0100c38a54a9b3b1f0a9 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 20 Jul 2011 15:55:18 -0700 Subject: [PATCH] Trap '!' in port columns. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index c4f883546..a41b36ec0 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -2856,6 +2856,7 @@ sub do_proto( $$$;$ ) $output .= "-m multiport ${invert}--dports ${ports} "; $multiport = 1; } else { + fatal_error "Missing DEST PORT" unless supplied $ports; $ports = validate_portpair $pname , $ports; $output .= "${invert}--dport ${ports} "; } @@ -2878,6 +2879,7 @@ sub do_proto( $$$;$ ) $sports = validate_port_list $pname , $sports; $output .= "-m multiport ${invert}--sports ${sports} "; } else { + fatal_error "Missing SOURCE PORT" unless supplied $sports; $sports = validate_portpair $pname , $sports; $output .= "${invert}--sport ${sports} "; }