diff --git a/Shorewall-perl/Shorewall/Nat.pm b/Shorewall-perl/Shorewall/Nat.pm index cee6a891c..219edc543 100644 --- a/Shorewall-perl/Shorewall/Nat.pm +++ b/Shorewall-perl/Shorewall/Nat.pm @@ -77,8 +77,9 @@ sub do_ipsec_options($) fatal_error "Invalid Option ($e)" unless $fmt; if ( $fmt eq NOTHING ) { - fatal_error "Option $e does not take a value" if defined $val; + fatal_error "Option \"$e\" does not take a value" if defined $val; } else { + fatal_error "Missing value for option \"$e\"" unless defined $val; fatal_error "Invalid value ($val) for option \"$e\"" unless $val =~ /^($fmt)$/; } diff --git a/Shorewall-perl/Shorewall/Zones.pm b/Shorewall-perl/Shorewall/Zones.pm index 83dd37f87..1029421de 100644 --- a/Shorewall-perl/Shorewall/Zones.pm +++ b/Shorewall-perl/Shorewall/Zones.pm @@ -157,8 +157,9 @@ sub parse_zone_option_list($) fatal_error "Invalid Option ($e)" unless $fmt; if ( $fmt eq NOTHING ) { - fatal_error "Option $e does not take a value" if defined $val; + fatal_error "Option \"$e\" does not take a value" if defined $val; } else { + fatal_error "Missing value for option \"$e\"" unless defined $val; fatal_error "Invalid value ($val) for option \"$e\"" unless $val =~ /^($fmt)$/; }