Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 457952 - networking: support bridge via iproute2
Summary: networking: support bridge via iproute2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: netifrc (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: netifrc Team
URL:
Whiteboard: netifrc:bridge
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2013-02-17 12:02 UTC by Alon Bar-Lev (RETIRED)
Modified: 2017-06-29 14:50 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alon Bar-Lev (RETIRED) gentoo-dev 2013-02-17 12:02:48 UTC
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?
Comment 1 William Hubbs gentoo-dev 2013-02-28 23:37:17 UTC
I would support this.
Comment 2 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2013-04-07 19:44:23 UTC
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 :-)
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-08-28 20:17:09 UTC
If brctl_$IFVAR is set, we need to either convert it ourselves, or throw an error.
Comment 4 dwfreed 2015-07-08 23:37:41 UTC
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.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2015-07-09 08:02:43 UTC
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!
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2015-07-10 09:40:27 UTC
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
Comment 7 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2016-04-02 08:12:47 UTC
Since this has been merged in back in november, would it be possible to get a new release, so people can start using it? :)
Comment 8 Brian Evans (RETIRED) gentoo-dev 2017-06-29 14:50:28 UTC
Released and stable in netifrc-0.5.1