network: support vlan tagged bonding
PATCH 1/1 network: support vlan tagged bonding
From: Cong Wang <[email protected]>
This patch adds support of vlan tagged bonding, for example, bond0.2. In case of regression, I also tested bond0 and eth0.2, all work fine.
Cc Harald Hoyer <[email protected]>
Cc Dave Young <[email protected]>
Cc Vivek Goyal <[email protected]>
Signed-off-by Cong Wang <[email protected]>
--- modules.d/40network/ifup.sh | 8 ++++++-- modules.d/40network/net-genrules.sh | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-)
modules.d/40network/ifup.sh +6 -2
@@ -188,7 +188,7 @@ if [ -e /tmp/bridge.info ]; then brctl setfd $bridgename 0 for ethname in $ethnames ; do if [ "$ethname" = "$bondname" ] ; then - DO_BOND_SETUP=yes ifup $bondname + DO_BOND_SETUP=yes ifup $bondname -m else ip link set $ethname up fi
@@ -211,7 +211,11 @@ get_vid() { if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then modprobe 8021q - ip link set "$phydevice" up + if [ "$phydevice" = "$bondname" ] ; then + DO_BOND_SETUP=yes ifup $phydevice -m + else + ip link set "$phydevice" up + fi wait_for_if_up "$phydevice" ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname; echo $?)" fi
modules.d/40network/net-genrules.sh +3 -3
@@ -21,19 +21,19 @@ fix_bootif() { # bridge: attempt only the defined interface if [ -e /tmp/bridge.info ]; then . /tmp/bridge.info - IFACES=${ethnames%% *} + IFACES+=" ${ethnames%% *}" fi # bond: attempt only the defined interface (override bridge defines) if [ -e /tmp/bond.info ]; then . /tmp/bond.info # It is enough to fire up only one - IFACES=${bondslaves%% *} + IFACES+=" ${bondslaves%% *}" fi if [ -e /tmp/vlan.info ]; then . /tmp/vlan.info - IFACES=$phydevice + IFACES+=" $phydevice" fi ifup='/sbin/ifup $env{INTERFACE}'
Signature · 1 line
1.7.7.6
A message that is not in the archive (sent off-list or not yet received): 1340250275-24823-1-git-send-email-amwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Quoted 6 lines · Cong Wang
From: Cong Wang <[email protected]>
This patch adds support of vlan tagged bonding, for example, bond0.2. In case of regression, I also tested bond0 and eth0.2, all work fine.
Quoted 8 lines
Cc Harald Hoyer <[email protected]>Cc Dave Young <[email protected]>Cc Vivek Goyal <[email protected]>Signed-off-by Cong Wang <[email protected]>--- modules.d/40network/ifup.sh | 8 ++++++-- modules.d/40network/net-genrules.sh | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-)
Thanks.. pushed