From a9068b2d3b8ca6eceee13424598e12c01840c8d9 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 7 May 2019 09:40:57 +0000 Subject: [PATCH] followup: code cleanup and comment Signed-off-by: Thomas Lamprecht --- src/PVE/Firewall.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index e679127..e46a3b1 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -3782,9 +3782,11 @@ sub compile_ebtables_filter { push(@$arpfilter, $ip); } } - if($net->{ip} && $vmfw_conf->{options}->{ipfilter}) { + if ($net->{ip} && $vmfw_conf->{options}->{ipfilter}) { + # ebtables changes this to a .0/MASK network but we just + # want the address here, no network - see #2193 $net->{ip} =~ s|/(\d+)$||; - push(@$arpfilter, $net->{ip}); + push @$arpfilter, $net->{ip}; } generate_tap_layer2filter($ruleset, $iface, $macaddr, $vmfw_conf, $vmid, $arpfilter); } -- 2.39.2