aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-17 11:27:47 +0000
committerRoy Marples <roy@marples.name>2007-04-17 11:27:47 +0000
commite635e1646466d632250ac2ed9e0d3d3b86dfb4cf (patch)
tree13f3d7f4d8576120f856d7392aa4997a1a3dde84
parentf657d87b997f5b599d74a8f2eb6fef8dd6381550 (diff)
Fix bridge, vlan and bonding modules to work together, #174792.
-rw-r--r--ChangeLog1
-rw-r--r--net.Linux/bonding.sh2
-rw-r--r--net.Linux/bridge.sh6
-rw-r--r--net.Linux/vlan.sh3
4 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 68728bae..2a5a43b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
17 Apr 2007; Roy Marples <uberlord@gentoo.org>:
+ Fix bridge, vlan and bonding modules to work together, #174792.
env vars ECOLOR_GOOD and friends now override our hardcoded builtins.
16 Apr 2007; Mike Frysinger <vapier@gentoo.org>:
diff --git a/net.Linux/bonding.sh b/net.Linux/bonding.sh
index 36be943f..1f8b6377 100644
--- a/net.Linux/bonding.sh
+++ b/net.Linux/bonding.sh
@@ -15,7 +15,7 @@ _is_bond() {
bonding_pre_start() {
local s= slaves=
- eval $(_get_array "slaves_${IFACE}")
+ eval $(_get_array "slaves_${IFVAR}")
[ $# = "0" ] && return 0
# Load the kernel module if required
diff --git a/net.Linux/bridge.sh b/net.Linux/bridge.sh
index 89d5687e..a97e525a 100644
--- a/net.Linux/bridge.sh
+++ b/net.Linux/bridge.sh
@@ -56,7 +56,8 @@ bridge_pre_start() {
eval set -- ${ports}
for x in "$@" ; do
ebegin "${x}"
- if ! ifconfig "${x}" promisc up && brctl addif "${IFACE}" "${x}" ; then
+ ifconfig "${x}" promisc up
+ if ! brctl addif "${IFACE}" "${x}" ; then
ifconfig "${x}" -promisc 2>/dev/null
eend 1
return 1
@@ -66,6 +67,9 @@ bridge_pre_start() {
eoutdent
fi
)
+
+ # Bring up the bridge
+ _up
}
bridge_post_stop() {
diff --git a/net.Linux/vlan.sh b/net.Linux/vlan.sh
index 00a402bd..1542d4c0 100644
--- a/net.Linux/vlan.sh
+++ b/net.Linux/vlan.sh
@@ -11,7 +11,8 @@ _config_vars="$_config_vars vlans"
_is_vlan() {
[ ! -d /proc/net/vlan ] && return 1
- grep -q "^${IFACE}[[:space:]]+" /proc/net/vlan/config
+ [ -e /proc/net/vlan/"${IFACE}" ] && return 0
+ grep -Eq "^${IFACE}[[:space:]]+" /proc/net/vlan/config
}
_get_vlans() {