From: Jon Kohler Date: Thu, 10 Apr 2025 06:59:39 +0000 (-0700) Subject: daemon/priv: fix PACKET_IGNORE_OUTGOING X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=622a91144de4ae487ceebdb333863e9f660e0717;p=thirdparty%2Flldpd.git daemon/priv: fix PACKET_IGNORE_OUTGOING Switch from netpacket/packet.h to linux/if_packet.h to pick up both sockaddr_ll and PACKET_IGNORE_OUTGOING. Fixes case where PACKET_IGNORE_OUTGOING was compiled out due to ifdef conditional, which caused Linux zerocopy to break. Fixes #732 Signed-off-by: Jon Kohler --- diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index 67b61d91..467b654b 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h @@ -57,6 +57,7 @@ struct sockaddr_ll { #define PACKET_QDISC_BYPASS 20 #define PACKET_ROLLOVER_STATS 21 #define PACKET_FANOUT_DATA 22 +#define PACKET_IGNORE_OUTGOING 23 #define PACKET_FANOUT_HASH 0 #define PACKET_FANOUT_LB 1 diff --git a/src/daemon/priv-linux.c b/src/daemon/priv-linux.c index 9a6f90a4..b18f1620 100644 --- a/src/daemon/priv-linux.c +++ b/src/daemon/priv-linux.c @@ -26,7 +26,6 @@ #include #include #include -#include /* For sockaddr_ll */ #if defined(__clang__) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdocumentation" @@ -34,6 +33,7 @@ #include /* For BPF filtering */ #include #include +#include #include #if defined(__clang__) # pragma clang diagnostic pop