Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30688 - support for bridging in /etc/init.d/net.eth script
Summary: support for bridging in /etc/init.d/net.eth script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 66472
  Show dependency tree
 
Reported: 2003-10-08 12:23 UTC by Andrea Dainese
Modified: 2004-11-08 10:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
new init script that handles bonding and bridging as well as better vlans. (net.eth0.txt,6.21 KB, text/plain)
2003-10-20 02:47 UTC, Phil Sorber
Details
same thing with a 1 line fix for vlans on bonds. (net.eth0.txt,6.24 KB, text/plain)
2003-10-20 04:23 UTC, Phil Sorber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Dainese 2003-10-08 12:23:38 UTC
The /etc/init.d/net.eth script support eth and vlan interfaces, but not bridge 
interfaces. 
You can apply this patch to fix the script, and configure in /etc/conf.d/net file: 
iface_br0="0.0.0.0" # or configure with an ip address 
iface_br0_bridges="eth1 eth2" # configure a bridge interfaces with eth1 and eth2 
 
bash-2.05b$ cat net.iface.diff 
25a26,30 
>       if [ -n "${bridges}" -a \! -x /sbin/brctl ] 
>       then 
>               eerror "For Bridging (802.1d) support, emerge net-misc/bridge-utils" 
>               return 1 
>       fi 
36a42 
>       bridges="$(eval echo \$\{iface_${IFACE}_bridges\})" 
46a53,56 
>       if [ ! -z "${bridges}" ] 
>       then 
>               /sbin/brctl addbr ${IFACE} 
>       fi 
190a201,204 
>       if [ ! -z "${bridges}" ] 
>         then 
>                 /sbin/brctl delbr ${IFACE} 
>         fi 
200a215,219 
>       for bridge in ${bridges} 
>       do 
>               /sbin/brctl addif ${IFACE} ${bridge} >/dev/null 
>               /sbin/ifconfig ${bridge} 0.0.0.0 up 
>       done 
210a230,234 
>       for bridge in ${bridges} 
>       do 
>               /sbin/ifconfig ${bridge} down 
>               /sbin/brctl delif ${IFACE} ${bridge} >/dev/null 
>       done 
bash-2.05b$ 
 

Reproducible: Always
Steps to Reproduce:
NA 
Actual Results:  
The script doesn't configure a bridge interface 

Expected Results:  
With my patch you can configure a bridge interface like vlan interface
Comment 1 Kurt Lieber (RETIRED) gentoo-dev 2003-10-08 12:31:01 UTC
incorrect product. kicking back to bug-wranglers.
Comment 2 Phil Sorber 2003-10-20 02:47:27 UTC
Created attachment 19521 [details]
new init script that handles bonding and bridging as well as better vlans.
Comment 3 Phil Sorber 2003-10-20 02:52:41 UTC
I have added support for briding and bonding out of neccesity. i also made
the vlan support a little more robust. i still need support for multiple
gateways. the syntax used is confusing and i don't know bash well enough
to fix this. also, i didn't include "full" support for the bridge options
as they can get very complex. honestly, i'd still like to see a complete
overhaul of the network init system as i mentioned in bug # 25861.

this also seems to solve bug # 21418 which is a dup.
Comment 4 Phil Sorber 2003-10-20 04:23:51 UTC
Created attachment 19526 [details]
same thing with a 1 line fix for vlans on bonds.
Comment 5 Roy Marples (RETIRED) gentoo-dev 2004-11-08 02:55:47 UTC
We have bridge and vlan support working together in CVS now

This will be in baselayout-1.11.6
Comment 6 Roy Marples (RETIRED) gentoo-dev 2004-11-08 10:59:50 UTC
Fixed in baselayout-1.11.6