Blame 0013-ifup.sh-Add-support-for-bridge-over-team-and-vlan-ta.patch

Harald Hoyer ab11ed
From a55f910cf6f13e1a6d9d5be769297ee3ecc64bb9 Mon Sep 17 00:00:00 2001
Harald Hoyer ab11ed
From: WANG Chao <chaowang@redhat.com>
Harald Hoyer ab11ed
Date: Mon, 1 Apr 2013 20:34:40 +0800
Harald Hoyer ab11ed
Subject: [PATCH] ifup.sh: Add support for bridge over team and vlan tagged
Harald Hoyer ab11ed
 team
Harald Hoyer ab11ed
Harald Hoyer ab11ed
Team is the same network stack as bonding. Therefore give ifup the ability to
Harald Hoyer ab11ed
handle bridge over team and vlan tagged team as bonding too.
Harald Hoyer ab11ed
Harald Hoyer ab11ed
Signed-off-by: WANG Chao <chaowang@redhat.com>
Harald Hoyer ab11ed
---
Harald Hoyer ab11ed
 modules.d/40network/ifup.sh | 8 ++++++++
Harald Hoyer ab11ed
 1 file changed, 8 insertions(+)
Harald Hoyer ab11ed
Harald Hoyer ab11ed
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
Harald Hoyer ab11ed
index 582278f..815ab64 100755
Harald Hoyer ab11ed
--- a/modules.d/40network/ifup.sh
Harald Hoyer ab11ed
+++ b/modules.d/40network/ifup.sh
Harald Hoyer ab11ed
@@ -46,6 +46,8 @@ if [ -e /tmp/bridge.info ]; then
Harald Hoyer ab11ed
         if [ "$netif" = "$ethname" ]; then
Harald Hoyer ab11ed
             if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
Harald Hoyer ab11ed
                 : # We need to really setup bond (recursive call)
Harald Hoyer ab11ed
+            elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
Harald Hoyer ab11ed
+                : # We need to really setup team (recursive call)
Harald Hoyer ab11ed
             else
Harald Hoyer ab11ed
                 netif="$bridgename"
Harald Hoyer ab11ed
                 use_bridge='true'
Harald Hoyer ab11ed
@@ -59,6 +61,8 @@ if [ -e /tmp/vlan.info ]; then
Harald Hoyer ab11ed
     if [ "$netif" = "$phydevice" ]; then
Harald Hoyer ab11ed
         if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
Harald Hoyer ab11ed
             : # We need to really setup bond (recursive call)
Harald Hoyer ab11ed
+        elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
Harald Hoyer ab11ed
+            : # We need to really setup team (recursive call)
Harald Hoyer ab11ed
         else
Harald Hoyer ab11ed
             netif="$vlanname"
Harald Hoyer ab11ed
             use_vlan='true'
Harald Hoyer ab11ed
@@ -212,6 +216,8 @@ if [ -e /tmp/bridge.info ]; then
Harald Hoyer ab11ed
         for ethname in $ethnames ; do
Harald Hoyer ab11ed
             if [ "$ethname" = "$bondname" ] ; then
Harald Hoyer ab11ed
                 DO_BOND_SETUP=yes ifup $bondname -m
Harald Hoyer ab11ed
+            elif [ "$ethname" = "$teammaster" ] ; then
Harald Hoyer ab11ed
+                DO_TEAM_SETUP=yes ifup $teammaster -m
Harald Hoyer ab11ed
             else
Harald Hoyer ab11ed
                 linkup $ethname
Harald Hoyer ab11ed
             fi
Harald Hoyer ab11ed
@@ -235,6 +241,8 @@ if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then
Harald Hoyer ab11ed
     modprobe 8021q
Harald Hoyer ab11ed
     if [ "$phydevice" = "$bondname" ] ; then
Harald Hoyer ab11ed
         DO_BOND_SETUP=yes ifup $phydevice -m
Harald Hoyer ab11ed
+    elif [ "$phydevice" = "$teammaster" ] ; then
Harald Hoyer ab11ed
+        DO_TEAM_SETUP=yes ifup $phydevice -m
Harald Hoyer ab11ed
     else
Harald Hoyer ab11ed
         linkup "$phydevice"
Harald Hoyer ab11ed
     fi