ctdb-common: Replace pcap_open_live() by lower level calls
authorMartin Schwenke <mschwenke@ddn.com>
Tue, 15 Aug 2023 00:57:59 +0000 (10:57 +1000)
committerJule Anger <janger@samba.org>
Tue, 29 Aug 2023 08:25:12 +0000 (08:25 +0000)
commit58e7d6a945136fe9dd26810f4a22e48d9cf0943f
tree53b19160514298372afc01f0636cd1ffccfc6030
parent9f57371128d8ef40448651874857f445be6ed041
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>
(cherry picked from commit ffc2ae616d8fab7528fbdfd8c6b94c5b9a0e3a7c)
ctdb/common/system_socket.c