Hi, recent iproute2 supports bridge handling. # ip add link test type bridge # ip link set eth0 master test # brctl show bridge name bridge id STP enabled interfaces test 8000.3c970e14ba8e no eth0 # ip link set eth0 nomaster # ip link del test So like we retired tunctl we can now retire brctl... What do you think?
I would support this.
Since VLAN handling has been migrated from vconfig to iproute2, I would suggest anyone looking into this, to look at /lib/rc/net/vlan.sh for ideas. The file needing to be changed is /lib/rc/net/bridge.sh . Just in case somebody not related to openrc wants to give it a go, thats where you look :-)
If brctl_$IFVAR is set, we need to either convert it ourselves, or throw an error.
I wrote an implementation to prefer iproute2 if it's new enough, and fall back to brctl otherwise. It was merged here: https://github.com/gentoo/netifrc/commit/c150fab20c16adc3d51ab8555a13c240f844c2e3 I'll leave it up to robbat2 to close this bug once he's made a release with the change.
Hi! Great work! however, I do not think that emulating the brctl is the right way to go, keeping this legacy for eternity. Like many other options (such as tuntap) we have utility specific configuration which differ, most of settings are not required. The following is brctl specific: brctl_$name= When using iproute should be: iproute2_$name= There is also no reason to emulate the sysfs parameters as we already have: """ # You can also configure the bridge or bridge members via sysfs on 2.6 kernels # or newer. See the kernel bridge documentation for a description of these # options. #stp_state_br0="0" #forward_delay_br0="10" #hairpin_mode_eth0="1" """ So patch should be similar to tuntap selecting openvpn, tunctl, iproute2, notice there is no emulation there. Thanks!
Hi, I submitted a different simpler aproach[1]. --- Hello, This revert the great work of Doug Freed in favour of a simpler approach. The approach Doug has taken is to emulate the legacy brctl, while we usually do not emulate legacy utilities specific behaviour in netifrc see tuntap or wireless. So as much as I appreciate the work, I think a simpler method that leverage the new sysfs interface and enable removal of brctl in future without pushing it into newer installations is better for netifrc. Thanks, Alon --- [1] https://github.com/gentoo/netifrc/pull/15
Since this has been merged in back in november, would it be possible to get a new release, so people can start using it? :)
Released and stable in netifrc-0.5.1