From 5cb9ff0009ad836d0fb26a23ad2f04ded26cec12 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 11 Aug 2009 08:31:58 -0700 Subject: [PATCH] Fix 'upnpclient' on required interfaces --- Shorewall/Perl/Shorewall/Rules.pm | 12 ++++++++---- Shorewall/releasenotes.txt | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 48f2d9684..6b9a99ad6 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -631,10 +631,14 @@ sub add_common_rules() { my $base = uc chain_base $interface; my $variable = get_interface_gateway $interface; - add_commands( $chainref, - 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(fi) ); + if ( interface_is_optional $interface ) { + add_commands( $chainref, + 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(fi) ); + } else { + add_commands( $chainref, qq(echo -A $chainref->{name} -i $interface -s $variable -p udp -j ACCEPT >&3) ); + } } } } diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 5fc2433e3..c1c6b61ef 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -185,6 +185,9 @@ Shorewall 4.4.0 4) Given that Jozsef Kadlecsik has not yet released ipset 3.1, ipset 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 ----------------------------------------------------------------------------