Skip to content
Snippets Groups Projects
Commit b7fadb12 authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Jo-Philipp Wich
Browse files

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: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
parent 909f0630
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,7 @@ service_running() { ...@@ -99,6 +99,7 @@ service_running() {
reload_service() { reload_service() {
running || return 1 running || return 1
$LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF
pause
unconfigure lldp custom-tlv unconfigure lldp custom-tlv
unconfigure system interface pattern unconfigure system interface pattern
unconfigure system description unconfigure system description
...@@ -108,7 +109,10 @@ reload_service() { ...@@ -108,7 +109,10 @@ reload_service() {
write_lldpd_conf write_lldpd_conf
$LLDPCLI -u $LLDPSOCKET -c $LLDPD_CONF -c $LLDPD_CONFS_DIR &> /dev/null $LLDPCLI -u $LLDPSOCKET -c $LLDPD_CONF -c $LLDPD_CONFS_DIR &> /dev/null
# Broadcast update over the wire # Broadcast update over the wire
$LLDPCLI -u $LLDPSOCKET update &> /dev/null $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF
resume
update
EOF
return 0 return 0
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment