]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-common: Do not use raw socket when ENABLE_PCAP is defined
authorMartin Schwenke <martin@meltin.net>
Mon, 8 Aug 2022 01:30:15 +0000 (11:30 +1000)
committerJule Anger <janger@samba.org>
Tue, 29 Aug 2023 09:35:11 +0000 (09:35 +0000)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit ad445abebdea55f71b0c79eb31c0e6b0aee06763)

ctdb/common/system_socket.c

index 13e346a8866b9b49c4f5a0eaa538e0b7abe87ee9..ced2b17fc211604afe01497f596ccd5d37d2d12a 100644 (file)
@@ -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 <pcap.h>
 
@@ -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) */