Commit be3f52f3 authored by Simon Deziel's avatar Simon Deziel Committed by Iustin Pop
Browse files

Force tap's MAC prefix to "fe"

Setting a high prefix discourages the bridge from adopting the tap's
MAC. Xen is not affected by this since the MAC is forced to

This addresses issue #217.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarIustin Pop <>
parent 112aee5f
......@@ -33,14 +33,20 @@ if [ -x "@SYSCONFDIR@/ganeti/kvm-vif-bridge" ]; then
exec @SYSCONFDIR@/ganeti/kvm-vif-bridge
ip link set $INTERFACE up
if [ "$MODE" = "bridged" ]; then
# Fix the autogenerated MAC to have the first octet set to "fe"
# to discourage the bridge from using the TAP dev's MAC
FIXED_MAC=$(ip link show $INTERFACE | awk '{if ($1 == "link/ether") printf("fe%s",substr($2,3,15))}')
ip link set $INTERFACE address $FIXED_MAC
ip link set $INTERFACE up
ip link set $INTERFACE mtu $(</sys/class/net/${BRIDGE}/mtu)
# Connect the interface to the bridge
brctl addif $BRIDGE $INTERFACE
ip link set $INTERFACE up
if [ -z "$IP" ]; then
echo "Routed NIC but no IP address specified"
exit 1
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