Handle empty protocol
authorJamie Cameron <jcameron@webmin.com>
Mon, 26 Jan 2009 19:35:53 +0000 (19:35 +0000)
committerJamie Cameron <jcameron@webmin.com>
Mon, 26 Jan 2009 19:35:53 +0000 (19:35 +0000)
shorewall/shorewall-lib.pl

index 35659b0..213543e 100644 (file)
@@ -982,10 +982,10 @@ return ( $in{'log'} ? "$in{'action'}:$in{'log'}" : $in{'action'},
          ($in{'sinzone_def'} ? ":$in{'sinzone'}" : ""),
         ($in{'dest'} || $in{'dother'}).
          ($in{'dinzone_def'} ? ":$in{'dinzone'}" : ""),
-        $in{'proto'} || $in{'pother'},
+        $in{'proto'} || $in{'pother'} || '-',
         $in{'dport_def'} ? "-" : $in{'dport'},
         $in{'sport_def'} ? "-" : $in{'sport'},
-        $in{'dnat_def'} ? ( "-" ) : ( $in{'dnat'} ),
+        $in{'dnat_def'} ? "-" : $in{'dnat'},
         &version_atleast(1, 4, 7) ? (
                ( $in{'rate_def'} ? "-" : $in{'rate'} ),
                ( $in{'set_def'} ? "-" : $in{'set'} )