Commit e46de62a authored by Sebastian Gebhard's avatar Sebastian Gebhard Committed by Klaus Aehlig
Browse files

Fix bridging in net-common



Bridging does not work correctly in net-common. The parameters passed
by Ganeti are put in /var/run/ganeti/xen-hypervisor/nic/$domname/$devid
and read again from there before running the setup functions according
to the $MODE which is read from the file.

When using MODE=bridged, the script expects to get the name of the
bridge passed as $BRIDGE, but is actually stored and passed as $LINK.
This patch fixes the issue.
Signed-off-by: default avatarSebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent e2bbdded
......@@ -50,10 +50,10 @@ function setup_bridge {
if [ "$MODE" = "bridged" ]; then
fix_mac
ip link set $INTERFACE up
ip link set $INTERFACE mtu $(</sys/class/net/${BRIDGE}/mtu)
ip link set $INTERFACE mtu $(</sys/class/net/${LINK}/mtu)
# Connect the interface to the bridge
brctl addif $BRIDGE $INTERFACE
brctl addif $LINK $INTERFACE
fi
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment