mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-17 17:31:27 +00:00
67 lines
2.2 KiB
Diff
67 lines
2.2 KiB
Diff
From 370c5dd8d4f2ee66b231062653d2de4c2f2ecd69 Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Fri, 4 Dec 2020 16:29:35 +0100
|
|
Subject: [PATCH 19/21] lldp: add TIP tweaks
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
.../network/services/lldpd/files/lldpd.config | 16 +---------------
|
|
package/network/services/lldpd/files/lldpd.init | 8 ++++++++
|
|
2 files changed, 9 insertions(+), 15 deletions(-)
|
|
|
|
diff --git a/package/network/services/lldpd/files/lldpd.config b/package/network/services/lldpd/files/lldpd.config
|
|
index 5e7c51ba7e..66a1bfa197 100644
|
|
--- a/package/network/services/lldpd/files/lldpd.config
|
|
+++ b/package/network/services/lldpd/files/lldpd.config
|
|
@@ -1,20 +1,6 @@
|
|
config lldpd config
|
|
- option enable_cdp 1
|
|
- option enable_fdp 1
|
|
- option enable_sonmp 1
|
|
- option enable_edp 1
|
|
-
|
|
option agentxsocket /var/run/agentx.sock
|
|
|
|
option lldp_class 4
|
|
- option lldp_location "2:FR:6:Commercial Rd:3:Roseville:19:4"
|
|
-
|
|
- # if empty, the distribution description is sent
|
|
- #option lldp_description "OpenWrt System"
|
|
- #option lldp_hostname "Modified Hostname"
|
|
-
|
|
- #option lldp_mgmt_ip "!192.168.1.1"
|
|
-
|
|
- # interfaces to listen on
|
|
- list interface "loopback"
|
|
+ list interface "wan"
|
|
list interface "lan"
|
|
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
|
|
index 7a5b25e016..8200556786 100644
|
|
--- a/package/network/services/lldpd/files/lldpd.init
|
|
+++ b/package/network/services/lldpd/files/lldpd.init
|
|
@@ -10,6 +10,10 @@ LLDPSOCKET=/var/run/lldpd.socket
|
|
LLDPD_CONF=/tmp/lldpd.conf
|
|
LLDPD_CONFS_DIR=/tmp/lldpd.d
|
|
|
|
+service_triggers() {
|
|
+ procd_add_reload_trigger lldpd
|
|
+}
|
|
+
|
|
find_release_info()
|
|
{
|
|
[ -s /etc/os-release ] && . /etc/os-release
|
|
@@ -38,6 +42,10 @@ write_lldpd_conf()
|
|
for iface in $ifaces; do
|
|
local ifname=""
|
|
if network_get_device ifname "$iface" || [ -e "/sys/class/net/$iface" ]; then
|
|
+ if [ -e "/sys/class/net/$ifname/bridge" -o -e "/sys/class/net/$ifname/lower_bridge" ] ; then
|
|
+ local ports=$(jsonfilter -i /etc/board.json -e "@.network.$iface.ifname")
|
|
+ [ "${ports// /,}" ] && ifname="${ports// /,}"
|
|
+ fi
|
|
append ifnames "${ifname:-$iface}" ","
|
|
fi
|
|
done
|
|
--
|
|
2.25.1
|
|
|