]> git.ipfire.org Git - thirdparty/lldpd.git/commit
interfaces: only register protocol handler for LLDP when only LLDP enabled fix/eth_p_lldp 355/head
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 04:48:54 +0000 (06:48 +0200)
commit5e9de67980ce14ccf69e35709e1e301512da113c
tree2f38faed2fefd244b87fb2effd2e7d1f089683bd
parent5c969283279ef941136d6a1a2f427d2bfc1015a8
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