[pve-devel] [PATCH] ebtables removes preceeding zero from mac addr to make the digest happy.

Stefan Priebe s.priebe at profihost.ag
Tue Jul 15 15:10:45 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..9511c13 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 preceeding zero so we need todo it too (but only the first)
+		$macaddr =~ s/^0//;
+
 		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 preceeding zero so we need todo it too (but only the first)
+		    $macaddr =~ s/^0//;
+
 		    generate_tap_layer2filter($ruleset, $iface, $macaddr, $vmfw_conf, $vmid);
 		}
 	    }
-- 
1.7.10.4




More information about the pve-devel mailing list