diff --git a/Shorewall/Perl/Shorewall/Misc.pm b/Shorewall/Perl/Shorewall/Misc.pm index 5b5f16243..93f790bc1 100644 --- a/Shorewall/Perl/Shorewall/Misc.pm +++ b/Shorewall/Perl/Shorewall/Misc.pm @@ -920,13 +920,20 @@ sub add_common_rules ( $$ ) { my $rpfilterref = ensure_mangle_chain( 'rpfilter' ); - add_ijump( $rpfilterref, - j => 'RETURN', - s => NILIPv4, - p => UDP, - dport => 67, - sport => 68 - ) if $family == F_IPV4; + if ( $family == F_IPV4 ) { + for $interface ( @$list ) { + if ( get_interface_option( $interface, 'dhcp' ) ) { + add_ijump( $rpfilterref, + j => 'RETURN', + s => NILIPv4, + p => UDP, + dport => 67, + sport => 68 + ); + last; + } + } + } add_ijump( $rpfilterref, j => $target,