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-changelog

[Xen-changelog] [xen-unstable] tools/hotplug/Linux: only apply dummy MAC

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools/hotplug/Linux: only apply dummy MAC address to virtual devices.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 Jan 2011 19:40:17 -0800
Delivery-date: Tue, 04 Jan 2011 19:40:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1294154762 0
# Node ID 959e87a1117f9dd172aff70d80adf7f6982877b1
# Parent  a8d69de8eb315b3b18c8a86c4d1505f53b84a443
tools/hotplug/Linux: only apply dummy MAC address to virtual devices.

Avoid applying to the bridge and physical network device.

This should un-break dom0 networking in the old xend-creates-bridge
setup (problem introduced in 22493:937488219719).

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/hotplug/Linux/network-bridge        |    2 +-
 tools/hotplug/Linux/vif-bridge            |    4 ++--
 tools/hotplug/Linux/vif2                  |    2 +-
 tools/hotplug/Linux/xen-network-common.sh |   22 ++++++++++++++++------
 4 files changed, 20 insertions(+), 10 deletions(-)

diff -r a8d69de8eb31 -r 959e87a1117f tools/hotplug/Linux/network-bridge
--- a/tools/hotplug/Linux/network-bridge        Tue Jan 04 11:32:20 2011 +0000
+++ b/tools/hotplug/Linux/network-bridge        Tue Jan 04 15:26:02 2011 +0000
@@ -244,7 +244,7 @@ op_start () {
     ip link set ${netdev} name ${pdev}
     ip link set ${tdev} name ${bridge}
 
-    setup_bridge_port ${pdev}
+    setup_physical_bridge_port ${pdev}
 
     # Restore slaves
     if [ -n "${slaves}" ]; then
diff -r a8d69de8eb31 -r 959e87a1117f tools/hotplug/Linux/vif-bridge
--- a/tools/hotplug/Linux/vif-bridge    Tue Jan 04 11:32:20 2011 +0000
+++ b/tools/hotplug/Linux/vif-bridge    Tue Jan 04 15:26:02 2011 +0000
@@ -81,7 +81,7 @@ fi
 
 case "$command" in
     online)
-        setup_bridge_port "$dev"
+        setup_virtual_bridge_port "$dev"
         add_to_bridge "$bridge" "$dev"
         ;;
 
@@ -91,7 +91,7 @@ case "$command" in
         ;;
 
     add)
-        setup_bridge_port "$dev"
+        setup_virtual_bridge_port "$dev"
         add_to_bridge "$bridge" "$dev"
         ;;
 esac
diff -r a8d69de8eb31 -r 959e87a1117f tools/hotplug/Linux/vif2
--- a/tools/hotplug/Linux/vif2  Tue Jan 04 11:32:20 2011 +0000
+++ b/tools/hotplug/Linux/vif2  Tue Jan 04 15:26:02 2011 +0000
@@ -23,7 +23,7 @@ case "$command" in
     "online")
        if [ "$bridge" != "-" ]
            then
-           setup_bridge_port "$vif"
+           setup_virtual_bridge_port "$vif"
            add_to_bridge "$bridge" "$vif"
        else
            # Just let the normal udev rules for interfaces handle it.
diff -r a8d69de8eb31 -r 959e87a1117f tools/hotplug/Linux/xen-network-common.sh
--- a/tools/hotplug/Linux/xen-network-common.sh Tue Jan 04 11:32:20 2011 +0000
+++ b/tools/hotplug/Linux/xen-network-common.sh Tue Jan 04 15:26:02 2011 +0000
@@ -80,20 +80,30 @@ find_dhcpd_arg_file()
 }
 
 # configure interfaces which act as pure bridge ports:
-setup_bridge_port() {
+_setup_bridge_port() {
     local dev="$1"
+    local virtual="$2"
 
     # take interface down ...
     ip link set ${dev} down
 
-    # Initialise a dummy MAC address. We choose the numerically
-    # largest non-broadcast address to prevent the address getting
-    # stolen by an Ethernet bridge for STP purposes.
-    # (FE:FF:FF:FF:FF:FF)
-    ip link set ${dev} address fe:ff:ff:ff:ff:ff || true
+    if [ $virtual -ne 0 ] ; then
+        # Initialise a dummy MAC address. We choose the numerically
+        # largest non-broadcast address to prevent the address getting
+        # stolen by an Ethernet bridge for STP purposes.
+        # (FE:FF:FF:FF:FF:FF)
+        ip link set ${dev} address fe:ff:ff:ff:ff:ff || true
+    fi
 
     # ... and configure it
     ip addr flush ${dev}
+}
+
+setup_physical_bridge_port() {
+    _setup_bridge_port $1 0
+}
+setup_virtual_bridge_port() {
+    _setup_bridge_port $1 1
 }
 
 # Usage: create_bridge bridge

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools/hotplug/Linux: only apply dummy MAC address to virtual devices., Xen patchbot-unstable <=