WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH][qemu-xen] Change tap device mac address to prevent c

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][qemu-xen] Change tap device mac address to prevent change of bridge's mac
From: Miroslav Rezanina <mrezanin@xxxxxxxxxx>
Date: Tue, 21 Dec 2010 08:13:03 -0500 (EST)
Delivery-date: Tue, 21 Dec 2010 05:13:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1238106651.28663.1292935027329.JavaMail.root@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Qemu tap device is created with random mac address and then add to bridge. Due 
to linux kernel handlig, bridge change its mac address to tap mac in case tap 
mac is lower than bridge one. This can lead to short network breakage for dom0 
and guests. 

This patch set tap device mac adress to FE:FF:FF:FF:FF:FF to ensure tap device 
mac is always higher then bridge one.

Signed-off-by: Miroslav Rezanina <mrezanin@xxxxxxxxxx>

Patch:
--
diff --git a/i386-dm/qemu-ifup-Linux b/i386-dm/qemu-ifup-Linux
index bcbee92..c706a10 100644
--- a/i386-dm/qemu-ifup-Linux
+++ b/i386-dm/qemu-ifup-Linux
@@ -33,5 +33,8 @@ then
    fi
 fi
 
+# We have to change mac address of tap device to not change bridge mac
+ip link set $1 addr fe:ff:ff:ff:ff:ff
+
 ifconfig $1 0.0.0.0 up
 brctl addif $bridge $1 || true
-- 
Miroslav Rezanina
Software Engineer - Virtualization Team - XEN kernel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>