mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
dc7b48c404
Fix a problem where ctdb_killtcp (almost always) fails to capture packets with --enable-pcap and libpcap ≥ 1.9.1. The problem is due to a gradual change in libpcap semantics when using pcap_get_selectable_fd(3PCAP) to get a file descriptor and then using that file descriptor in non-blocking mode. pcap_set_immediate_mode(3PCAP) says: pcap_set_immediate_mode() sets whether immediate mode should be set on a capture handle when the handle is activated. In immediate mode, packets are always delivered as soon as they arrive, with no buffering. and On Linux, with previous releases of libpcap, capture devices are always in immediate mode; however, in 1.5.0 and later, they are, by default, not in immediate mode, so if pcap_set_immediate_mode() is available, it should be used. However, it wasn't until libpcap commit 2ade7676101366983bd4f86bc039ffd25da8c126 (before libpcap 1.9.1) that it became a requirement to use pcap_set_immediate_mode(), even with a timeout of 0. More explanation in this libpcap issue comment: https://github.com/the-tcpdump-group/libpcap/issues/860#issuecomment-541204548 Do a configure check for pcap_set_immediate_mode() even though it has existed for 10 years. It is easy enough. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15451 Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Tue Aug 15 10:53:52 UTC 2023 on atb-devel-224 |
||
---|---|---|
.. | ||
cmdline.c | ||
cmdline.h | ||
comm.c | ||
comm.h | ||
common.h | ||
conf_tool.c | ||
conf_tool.h | ||
conf.c | ||
conf.h | ||
ctdb_io.c | ||
ctdb_ltdb.c | ||
ctdb_util.c | ||
db_hash.c | ||
db_hash.h | ||
event_script.c | ||
event_script.h | ||
hash_count.c | ||
hash_count.h | ||
line.c | ||
line.h | ||
logging_conf.c | ||
logging_conf.h | ||
logging.c | ||
logging.h | ||
path_tool.c | ||
path_tool.h | ||
path.c | ||
path.h | ||
pidfile.c | ||
pidfile.h | ||
pkt_read.c | ||
pkt_read.h | ||
pkt_write.c | ||
pkt_write.h | ||
rb_tree.c | ||
rb_tree.h | ||
reqid.c | ||
reqid.h | ||
run_event.c | ||
run_event.h | ||
run_proc.c | ||
run_proc.h | ||
sock_client.c | ||
sock_client.h | ||
sock_daemon.c | ||
sock_daemon.h | ||
sock_io.c | ||
sock_io.h | ||
srvid.c | ||
srvid.h | ||
system_socket.c | ||
system_socket.h | ||
system.c | ||
system.h | ||
tmon.c | ||
tmon.h | ||
tunable.c | ||
tunable.h |