[pve-devel] [PATCH] ebtables remove preceeding zeros from mac addr to make the digest happy
Stefan Priebe
s.priebe at profihost.ag
Tue Jul 15 16:04:09 CEST 2014
Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
---
src/PVE/Firewall.pm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index b9419c1..2b8f258 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -3227,6 +3227,9 @@ sub compile_ebtables_filter {
my $iface = "tap${vmid}i$1";
my $macaddr = $net->{macaddr};
+ # ebtables remove zeros from mac pairs
+ $macaddr =~ s/0([0-9a-f])/$1/ig;
+
generate_tap_layer2filter($ruleset, $iface, $macaddr, $vmfw_conf, $vmid);
}
@@ -3251,6 +3254,9 @@ sub compile_ebtables_filter {
my $macaddr = $d->{mac};
my $iface = $d->{host_ifname};
+ # ebtables remove zeros from mac pairs
+ $macaddr =~ s/0([0-9a-f])/$1/ig;
+
generate_tap_layer2filter($ruleset, $iface, $macaddr, $vmfw_conf, $vmid);
}
}
--
1.7.10.4
More information about the pve-devel
mailing list