mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 22:30:58 +01:00
Only add dhcp rule if one rpfilter interface has the 'dhcp' option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e7792fc868
commit
c6f48a77e0
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user