summaryrefslogtreecommitdiffstats
path: root/0013-ifup.sh-Add-support-for-bridge-over-team-and-vlan-ta.patch
blob: eaee22e461e8160dcabbee18def23a10fe02ff02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From a55f910cf6f13e1a6d9d5be769297ee3ecc64bb9 Mon Sep 17 00:00:00 2001
From: WANG Chao <chaowang@redhat.com>
Date: Mon, 1 Apr 2013 20:34:40 +0800
Subject: [PATCH] ifup.sh: Add support for bridge over team and vlan tagged
 team

Team is the same network stack as bonding. Therefore give ifup the ability to
handle bridge over team and vlan tagged team as bonding too.

Signed-off-by: WANG Chao <chaowang@redhat.com>
---
 modules.d/40network/ifup.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 582278f..815ab64 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -46,6 +46,8 @@ if [ -e /tmp/bridge.info ]; then
         if [ "$netif" = "$ethname" ]; then
             if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
                 : # We need to really setup bond (recursive call)
+            elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
+                : # We need to really setup team (recursive call)
             else
                 netif="$bridgename"
                 use_bridge='true'
@@ -59,6 +61,8 @@ if [ -e /tmp/vlan.info ]; then
     if [ "$netif" = "$phydevice" ]; then
         if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
             : # We need to really setup bond (recursive call)
+        elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
+            : # We need to really setup team (recursive call)
         else
             netif="$vlanname"
             use_vlan='true'
@@ -212,6 +216,8 @@ if [ -e /tmp/bridge.info ]; then
         for ethname in $ethnames ; do
             if [ "$ethname" = "$bondname" ] ; then
                 DO_BOND_SETUP=yes ifup $bondname -m
+            elif [ "$ethname" = "$teammaster" ] ; then
+                DO_TEAM_SETUP=yes ifup $teammaster -m
             else
                 linkup $ethname
             fi
@@ -235,6 +241,8 @@ if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then
     modprobe 8021q
     if [ "$phydevice" = "$bondname" ] ; then
         DO_BOND_SETUP=yes ifup $phydevice -m
+    elif [ "$phydevice" = "$teammaster" ] ; then
+        DO_TEAM_SETUP=yes ifup $phydevice -m
     else
         linkup "$phydevice"
     fi