There is (maybe) a bug in the linux kernel that
we need to set every bridge into promisc mode to
get traffic out through the bridges.
ip link show ${device} | grep -qE "<.*PROMISC.*>"
}
+function device_set_promisc() {
+ local device=${1}
+ local state=${2}
+
+ assert device_exists ${device}
+ assert isset state
+ assert isoneof state on off
+
+ ip link set ${device} promisc ${state}
+}
+
# Check if the device is free
function device_is_free() {
! device_is_used $@
device_set_up ${zone}
+ # XXX Currently, there is a bug (in the linux kernel?) that we need to
+ # set our bridges to promisc mode.
+ device_set_promisc ${zone} on
+
# Bring all ports up
zone_ports_up ${zone}
zone_configs_up ${zone}
zone_configs_down ${zone}
zone_ports_down ${zone}
+ # XXX See remark in _up().
+ device_set_promisc ${zone} off
+
device_set_down ${zone}
brctl delbr ${zone}