]> git.ipfire.org Git - thirdparty/openwrt.git/commit
lldpd: fix reload bug: advertisements shall default to on 15299/head
authorPaul Donald <newtwen+github@gmail.com>
Mon, 22 Apr 2024 13:17:33 +0000 (15:17 +0200)
committerRobert Marko <robimarko@gmail.com>
Tue, 17 Sep 2024 10:36:03 +0000 (12:36 +0200)
commite3bb35811e8d92a5c9aaee7549e3ddea32751d8c
tree123fa251b533418f5ddc3d9a2c4aa6aa4d47a595
parent0b48b832a945e7153b0028e7b08098e7d6a6ee4a
lldpd: fix reload bug: advertisements shall default to on

Because these capability advertisements default to on in lldpd, they
became absent at reload, and not restart, due to how the reload logic
works ( keep daemon running, send unconfigured and then the new config
via socket ), and it was not evident unless you happened to be looking
for it (e.g. via pcap or tcpdump). It was also not evident from the
manpage ( have now sent patches upstream ).

At reload time, the unconfigure logic disabled them unless they were
explicitly enabled (compare with other settings where 'unconfigure' just
resets them). Now they default to on/enabled at init time, and are
explicitly 'unconfigure'd at startup if the user disables them via:

lldp_mgmt_addr_advertisements=0
lldp_capability_advertisements=0

In other words: explicit is necessary to disable the advertisements.

The same applies to 'configure system capabilities enabled'. Technically
'unconfigure'd is the default but now it is explicit at reload.

Tested on: 23.05.3

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 708101c1412c42c7fb1d838024513a34424c50ff)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/network/services/lldpd/Makefile
package/network/services/lldpd/files/lldpd.init