1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

ctdb-common: Do not use raw socket when ENABLE_PCAP is defined

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2022-08-08 11:30:15 +10:00 committed by Amitay Isaacs
parent c522f4f604
commit ad445abebd

View 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) */