mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-18 18:01:23 +00:00
64 lines
2.0 KiB
Diff
64 lines
2.0 KiB
Diff
From 4b8fbdd73b3da67eeffd9612642218a1b9dc417d Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Fri, 4 Dec 2020 16:29:35 +0100
|
|
Subject: [PATCH 01/18] 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 | 6 +++++-
|
|
2 files changed, 5 insertions(+), 17 deletions(-)
|
|
|
|
diff --git a/package/network/services/lldpd/files/lldpd.config b/package/network/services/lldpd/files/lldpd.config
|
|
index 5e7c51ba7e..b37dda87bf 100644
|
|
--- a/package/network/services/lldpd/files/lldpd.config
|
|
+++ b/package/network/services/lldpd/files/lldpd.config
|
|
@@ -1,20 +1,4 @@
|
|
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 "lan"
|
|
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
|
|
index 7a5b25e016..4f613ec664 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
|
|
@@ -37,7 +41,7 @@ write_lldpd_conf()
|
|
local iface ifnames=""
|
|
for iface in $ifaces; do
|
|
local ifname=""
|
|
- if network_get_device ifname "$iface" || [ -e "/sys/class/net/$iface" ]; then
|
|
+ if [ -e "/sys/class/net/$iface" ]; then
|
|
append ifnames "${ifname:-$iface}" ","
|
|
fi
|
|
done
|
|
--
|
|
2.25.1
|
|
|