[PATCH] ifupdown: basic support for bridge_ports

Joachim Wiberg troglobit at gmail.com
Sat Jan 16 18:57:43 UTC 2021


On Sat, Jan 16, 2021 at 18:06, Alexander Vickberg <wickbergster at gmail.com> wrote:
> Hello,

Hi,

> I'm not sure if you're aware but Debian didn't have this functionality
> inside ifupdown. They instead handled the bridge interface configuration
> with if-pre-up/if-post-down shell scripts [1].

Yes, I'm aware.

> I added those to one of my systems to handle bridge configurations
> from /etc/network/interfaces. This was some time ago so I can't recall
> all the details but if I remember correctly those scripts used some
> argument to brctl which was not available in busybox brctl.

I did some work myself on this and there sure were a few commands
missing before.  Today however, we have better compat with std brctl,
and the only command I see missing is:

    hairpin   	<bridge> <port> {on|off}	turn hairpin on/off

which should not be too much work to support.  If that turns out to
be a blocker for merging this, then I can definitely look into it.

> In my case I ended up using the original brctl util as a quick way to
> get it running. Anyway, my concern here is that this patch will
> probably interfere with using the Debian scripts so my question is if
> busybox brctl should be made more compatible with the original util
> instead and then by extension the bridge handling scripts too?

There are other use-cases for bridges and /etc/network/interfaces
outside of Debian based systems.  For small embedded systems with
hardware switches this support would be great and also reduce the
overhead of having anything else installed to get up and running.

The bridge_ports code in this patch is currently enabled only when
ENABLE_BRCTL, but I can of course complement that with an ifupdown
feature flag, e.g., CONFIG_FEATURE_IFUPDOWN_BRIDGE_SUPPORT, which
should then be disabled by default and by Debian.


Best regards
 /Joachim
 


More information about the busybox mailing list