New: creation of bridge interface via interfaces does not work
https://bugs.busybox.net/show_bug.cgi?id=13466
Bug ID: 13466
Summary: creation of bridge interface via interfaces does not
work
Product: buildroot
Version: 2020.11.1
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: frank-w at public-files.de
CC: buildroot at uclibc.org
Target Milestone: ---
Hi,
i try to add bridge-interface via interfaces file (overlay_rootfs), but i got only an error on bootup.
Cannot find device "br0"
bridge-related part of interfaces-file (config of lan0 also there and this works)
auto lan1
iface lan1 inet manual
auto lan2
iface lan2 inet manual
auto br0
iface br0 inet static
address 192.168.40.1
netmask 255.255.255.0
bridge_ports lan1 lan2
bridge_fd 5
bridge_stp noalso posted a question at stack-overflow because this is maybe no bug as it looks like for me
https://unix.stackexchange.com/questions/629714/buildroot-adding-bridge-via-interfaces
of course i have added bridge-utils package and can add the bridge manually, but not via /etc/network/interfaces file
regards Frank
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 13466] creation of bridge interface via interfaces does not work
https://bugs.busybox.net/show_bug.cgi?id=13466
--- Comment #1 from Ryan Barnett <[email protected]> --- Hello,
The supports for bridges in the /etc/network/interfaces file is provide by Debian through the combination of having two packages installed: bridge-utils and ifupdown. Debian has customized bridge-utils package to provide support for bridge syntax in the /etc/network/interfaces file with the ifupdown package.
On Debian based distributions, the syntax for bridge in /etc/network/interfaces is accomplished utilizing if-pre-up.d/bridge and if-post-down.d/bridge hooks as seen from the list of the Debian package files [1].
Buildroot utilizes the official bridge-utils source from kernel.org which does not contain any of these ifupdown hooks [2].
In order to support this syntax utilizing buildroot, I'd recommend that the full version of ifupdown be built. Support for the bridge hooks could be added by utilizing a BR2_ROOTFS_OVERLAY [3] which installs the hooks for bridge support in the /etc/network/if-pre-up.d/ and fi-post-down.d/ hook locations utilizing the Debian source [4]
Thanks,
-Ryan
[1] - https://packages.debian.org/stretch/amd64/bridge-utils/filelist
[2] -
https://git.busybox.net/buildroot/tree/package/bridge-utils/bridge-utils.mk#n9
[3] - https://buildroot.org/downloads/manual/manual.html#rootfs-custom
[4] - https://sources.debian.org/src/bridge-utils/1.6-2/debian/ifupdown.sh/
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 13466] creation of bridge interface via interfaces does not work
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=13466
--- Comment #2 from Frank Wunderlich <[email protected]> --- hi, i've added bridge-utils.sh and ifupdown.sh to /lib/bridge-utils (like it's done in rules of package) including sylinks in /etc/network/if-pre-up.d and if-post-down.d
# ls -l /lib/bridge-utils/ total 16 -rwxr-xr-x 1 root root 1621 Feb 18 14:57 bridge-utils.sh -rwxr-xr-x 1 root root 5307 Feb 18 14:57 ifupdown.sh
# ls -l /etc/network/if-post-down.d/bridge lrwxrwxrwx 1 root root 29 Feb 28 17:51 /etc/network/if-post-down.d/bridge -> /lib/bridge-utils/ifupdown.sh # ls -l /etc/network/if-pre-up.d/bridge lrwxrwxrwx 1 root root 29 Feb 28 17:51 /etc/network/if-pre-up.d/bridge -> /lib/bridge-utils/ifupdown.sh #
and added BR2_PACKAGE_IFUPDOWN to my config...
but it seems not working, i guess the hooks are not picked up by anything
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 13466] creation of bridge interface via interfaces does not work
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=13466
--- Comment #3 from Frank Wunderlich <[email protected]> --- no more idea?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 13466] creation of bridge interface via interfaces does not work
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=13466
--- Comment #4 from Arınç ÜNAL <[email protected]> --- I made it work. The brctl check on ifupdown.sh needed to be changed to /usr/sbin/brctl.
I only needed to install bridge-utils. No need for the ifupdown package. Bridge VLAN filtering won't work if iproute2 is not installed. BusyBox's ip command does not support that.
My current rootfs overlay looks like this:
rootfsOverlay
├── etc
│ └── network
│ ├── if-down.d
│ │ └── bridge -> /lib/bridge-utils/ifupdown.sh
│ ├── if-post-down.d
│ │ └── bridge -> /lib/bridge-utils/ifupdown.sh
│ ├── if-pre-up.d
│ │ └── bridge -> /lib/bridge-utils/ifupdown.sh
│ └── interfaces
└── lib
└── bridge-utils
├── bridge-utils.sh
└── ifupdown.shI'm planning to work on the scripts a little to replace brctl with ip so it would be usable without requiring any other packages to be installed.
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 13466] creation of bridge interface via interfaces does not work
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=13466
Yann E. MORIN <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |MOVED
CC| |[email protected]--- Comment #5 from Yann E. MORIN <[email protected]> --- Thank you for your report.
The issue tracker for the Buildroot project has been moved to the Gitlab.com issue tracker:
https://gitlab.com/buildroot.org/buildroot/-/issues
We are taking this opportunity to close old issues in this old tracker. If you believe your issue is still relevant, please open one in the new issue tracker.
Thank you!
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot