Skip to content

Instantly share code, notes, and snippets.

@stintel
Created April 25, 2021 19:58
Show Gist options
  • Save stintel/33054b2e5f6f496014beca9d6b92b02b to your computer and use it in GitHub Desktop.
Save stintel/33054b2e5f6f496014beca9d6b92b02b to your computer and use it in GitHub Desktop.
stdin
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