Created
April 25, 2021 19:58
-
-
Save stintel/33054b2e5f6f496014beca9d6b92b02b to your computer and use it in GitHub Desktop.
stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init | |
index 09a6e3e230f..b9786495513 100644 | |
--- a/package/network/services/lldpd/files/lldpd.init | |
+++ b/package/network/services/lldpd/files/lldpd.init | |
@@ -38,7 +38,13 @@ write_lldpd_conf() | |
for iface in $ifaces; do | |
local ifname="" | |
if network_get_device ifname "$iface" || [ -e "/sys/class/net/$iface" ]; then | |
- append ifnames "${ifname:-$iface}" "," | |
+ if [ -d "/sys/class/net/$ifname/bridge/" ]; then | |
+ for brport in "/sys/class/net/$ifname/brif/"*; do | |
+ append ifnames "$(basename $brport)" "," | |
+ done | |
+ else | |
+ append ifnames "${ifname:-$iface}" "," | |
+ fi | |
fi | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment