aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinit7
1 files changed, 7 insertions, 0 deletions
diff --git a/init b/init
index bc1452c..e9b59f7 100755
--- a/init
+++ b/init
@@ -242,6 +242,10 @@ priv_netbase="$(sed -e 's/^\(.*\)\.0\.0$/\1/' <<<"$priv_network")"
# joins the bridge. Needless to say, constantly changing MAC will wreck
# all kinds of networking havoc.
#
+# While bridge_hw should be (and used to be) enough, something was broken (bug
+# #945466) and now we set it manually and also pass it to DHCP (which runs
+# before post-up).
+#
cat <<EOF >/etc/network/interfaces
auto lo
iface lo inet loopback
@@ -255,6 +259,8 @@ iface br0 inet dhcp
bridge_maxwait 0
bridge_fd 0
bridge_hw $gmac
+ hwaddress $gmac
+ post-up ip link set br0 address $gmac
post-up ip link set $eth txqueuelen 4000
post-up ip link set br0 txqueuelen 4000
@@ -269,6 +275,7 @@ iface br1 inet static
bridge_maxwait 0
bridge_fd 0
bridge_hw $lmac
+ post-up ip link set br1 address $lmac
post-up ip link set br1 txqueuelen 4000
post-up iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE
post-up iptables -A FORWARD -i br0 -o br1 -m state --state RELATED,ESTABLISHED -j ACCEPT