Preserve bridge MTU in KVM ifup script
authorAndrea Spadaccini <spadaccio@google.com>
Tue, 11 Oct 2011 13:39:05 +0000 (14:39 +0100)
committerIustin Pop <iustin@google.com>
Fri, 11 May 2012 09:02:57 +0000 (11:02 +0200)
Closes: #201 - KVM_IFUP does not set bridge-MTU on tap devices
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit a1ec8695a6b453acdc2fa746a27be73c614b2e87)

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

tools/kvm-ifup.in

index 4ba17e7..2ff8ccb 100644 (file)
@@ -36,6 +36,8 @@ fi
 ip link set $INTERFACE up
 
 if [ "$MODE" = "bridged" ]; then
+       ip link set $INTERFACE mtu $(</sys/class/net/${BRIDGE}/mtu)
+
        # Connect the interface to the bridge
        brctl addif $BRIDGE $INTERFACE
 else