From: Martin Schwenke Date: Mon, 8 Aug 2022 01:30:15 +0000 (+1000) Subject: ctdb-common: Do not use raw socket when ENABLE_PCAP is defined X-Git-Tag: samba-4.17.11~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=197f86f9a1c3d7e5e6e4ed6df75288f9847ee3d8;p=thirdparty%2Fsamba.git ctdb-common: Do not use raw socket when ENABLE_PCAP is defined Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit ad445abebdea55f71b0c79eb31c0e6b0aee06763) --- diff --git a/ctdb/common/system_socket.c b/ctdb/common/system_socket.c index 13e346a8866..ced2b17fc21 100644 --- a/ctdb/common/system_socket.c +++ b/ctdb/common/system_socket.c @@ -864,7 +864,7 @@ static int tcp6_extract(const uint8_t *ip_pkt, * wscript has checked to make sure that pcap is available if needed. */ -#ifdef HAVE_AF_PACKET +#if defined(HAVE_AF_PACKET) && !defined(ENABLE_PCAP) /* * This function is used to open a raw socket to capture from @@ -963,7 +963,7 @@ int ctdb_sys_read_tcp_packet(int s, void *private_data, return ENOMSG; } -#else /* HAVE_AF_PACKET */ +#else /* defined(HAVE_AF_PACKET) && !defined(ENABLE_PCAP) */ #include @@ -1043,4 +1043,4 @@ int ctdb_sys_read_tcp_packet(int s, return ENOMSG; } -#endif /* HAVE_AF_PACKET */ +#endif /* defined(HAVE_AF_PACKET) && !defined(ENABLE_PCAP) */