]> git.ipfire.org Git - thirdparty/lldpd.git/commit
interfaces: only register protocol handler for LLDP when only LLDP enabled
authorVincent Bernat <vincent@bernat.ch>
Tue, 1 Oct 2019 04:18:52 +0000 (06:18 +0200)
committerVincent Bernat <vincent@bernat.ch>
Tue, 1 Oct 2019 05:21:40 +0000 (07:21 +0200)
commitfc5526dae75fa1e182fe46cef01045226cd92b36
tree0b9411082bac48267a76cd363d3424182af61c5a
parentfc8164d80bc937b542f715f74739b9c1749b9069
interfaces: only register protocol handler for LLDP when only LLDP enabled

On Linux, the drop counter is increased on unhandled packets. We are
using a raw socket with ETH_P_ALL, so we get a copy of the packet. The
original packet is ultimately dropped later and this increases the
drop counter associated to the interface on Linux.

When listening only to LLDP, use ETH_P_LLDP instead of ETH_P_ALL to
avoid this.

Fix #296.
NEWS
src/daemon/interfaces-bpf.c
src/daemon/interfaces-linux.c
src/daemon/lldpd.h
src/daemon/priv-bsd.c
src/daemon/priv-linux.c
src/daemon/priv.c