Fix bridge, vlan and bonding modules to work together, #174792.
This commit is contained in:
parent
f657d87b99
commit
e635e16464
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
17 Apr 2007; Roy Marples <uberlord@gentoo.org>:
|
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.
|
env vars ECOLOR_GOOD and friends now override our hardcoded builtins.
|
||||||
|
|
||||||
16 Apr 2007; Mike Frysinger <vapier@gentoo.org>:
|
16 Apr 2007; Mike Frysinger <vapier@gentoo.org>:
|
||||||
|
@ -15,7 +15,7 @@ _is_bond() {
|
|||||||
bonding_pre_start() {
|
bonding_pre_start() {
|
||||||
local s= slaves=
|
local s= slaves=
|
||||||
|
|
||||||
eval $(_get_array "slaves_${IFACE}")
|
eval $(_get_array "slaves_${IFVAR}")
|
||||||
[ $# = "0" ] && return 0
|
[ $# = "0" ] && return 0
|
||||||
|
|
||||||
# Load the kernel module if required
|
# Load the kernel module if required
|
||||||
|
@ -56,7 +56,8 @@ bridge_pre_start() {
|
|||||||
eval set -- ${ports}
|
eval set -- ${ports}
|
||||||
for x in "$@" ; do
|
for x in "$@" ; do
|
||||||
ebegin "${x}"
|
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
|
ifconfig "${x}" -promisc 2>/dev/null
|
||||||
eend 1
|
eend 1
|
||||||
return 1
|
return 1
|
||||||
@ -66,6 +67,9 @@ bridge_pre_start() {
|
|||||||
eoutdent
|
eoutdent
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Bring up the bridge
|
||||||
|
_up
|
||||||
}
|
}
|
||||||
|
|
||||||
bridge_post_stop() {
|
bridge_post_stop() {
|
||||||
|
@ -11,7 +11,8 @@ _config_vars="$_config_vars vlans"
|
|||||||
|
|
||||||
_is_vlan() {
|
_is_vlan() {
|
||||||
[ ! -d /proc/net/vlan ] && return 1
|
[ ! -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() {
|
_get_vlans() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user