Fix 'upnpclient' on required interfaces

This commit is contained in:
Tom Eastep 2009-08-11 08:31:58 -07:00
parent 51e7bcdaf4
commit 5cb9ff0009
2 changed files with 11 additions and 4 deletions

View File

@ -631,10 +631,14 @@ sub add_common_rules() {
my $base = uc chain_base $interface; my $base = uc chain_base $interface;
my $variable = get_interface_gateway $interface; my $variable = get_interface_gateway $interface;
if ( interface_is_optional $interface ) {
add_commands( $chainref, add_commands( $chainref,
qq(if [ -n "\$${base}_IS_USABLE" -a -n "$variable" ]; then) , qq(if [ -n "\$${base}_IS_USABLE" -a -n "$variable" ]; then) ,
qq( echo -A $chainref->{name} -i $interface -s $variable -p udp -j ACCEPT >&3) , qq( echo -A $chainref->{name} -i $interface -s $variable -p udp -j ACCEPT >&3) ,
qq(fi) ); qq(fi) );
} else {
add_commands( $chainref, qq(echo -A $chainref->{name} -i $interface -s $variable -p udp -j ACCEPT >&3) );
}
} }
} }
} }

View File

@ -185,6 +185,9 @@ Shorewall 4.4.0
4) Given that Jozsef Kadlecsik has not yet released ipset 3.1, ipset 4) Given that Jozsef Kadlecsik has not yet released ipset 3.1, ipset
bindings are once again supported. bindings are once again supported.
5) The 'upnpclient' option only worked correctly if 'optional' was
also specified for the interface.
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
K N O W N P R O B L E M S R E M A I N I N G K N O W N P R O B L E M S R E M A I N I N G
---------------------------------------------------------------------------- ----------------------------------------------------------------------------