ctdb-common: Replace pcap_open_live() by lower level calls
commitffc2ae616d8fab7528fbdfd8c6b94c5b9a0e3a7c
authorMartin Schwenke <mschwenke@ddn.com>
Tue, 15 Aug 2023 00:57:59 +0000 (15 10:57 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 15 Aug 2023 09:49:38 +0000 (15 09:49 +0000)
tree37ed201c3b1db5594a718fe8c2b24bac62bade5f
parentd87041d8968e91db9d257445321b85693303f95e
ctdb-common: Replace pcap_open_live() by lower level calls

A subsequent commit will insert an additional call before
pcap_activate().

This sequence of calls is taken from the source for pcap_open_live(),
so there should be no change in behaviour.

Given the defaults set by pcap_create_common(), it would be possible
to omit the calls to pcap_set_promisc() and pcap_set_timeout().
However, those defaults don't seem to be well documented, so continue
to explicitly set everything that was set before.

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>
ctdb/common/system_socket.c