aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2016-01-05 09:40:22 +0200
committerJo-Philipp Wich <jo@mein.io>2016-10-31 12:51:15 +0100
commitb7fadb12b76a471d66dfd3266ad0af2177914057 (patch)
treebae9664aad9352795277dbac22d1859a9ad4a462 /package/network/services
parent909f0630663d7ae1471c76154516e3299992a150 (diff)
downloadupstream-b7fadb12b76a471d66dfd3266ad0af2177914057.tar.gz
upstream-b7fadb12b76a471d66dfd3266ad0af2177914057.tar.bz2
upstream-b7fadb12b76a471d66dfd3266ad0af2177914057.zip
lldpd: freeze execution of lldpd during reload
During reload, we could send invalid information to the other side and confuse it. That's why, during reload we'll pause execution, do the reconfig and resume + update when reload is done. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/lldpd/files/lldpd.init6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 8fe0a47cdc..4e9efcae0d 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -99,6 +99,7 @@ service_running() {
reload_service() {
running || return 1
$LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF
+ pause
unconfigure lldp custom-tlv
unconfigure system interface pattern
unconfigure system description
@@ -108,7 +109,10 @@ reload_service() {
write_lldpd_conf
$LLDPCLI -u $LLDPSOCKET -c $LLDPD_CONF -c $LLDPD_CONFS_DIR &> /dev/null
# Broadcast update over the wire
- $LLDPCLI -u $LLDPSOCKET update &> /dev/null
+ $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF
+ resume
+ update
+ EOF
return 0
}