ead: use new protocol setting API since libpcap 1.9.0
authorSyrone Wong <wong.syrone@gmail.com>
Thu, 26 Jul 2018 14:46:39 +0000 (22:46 +0800)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:47:36 +0000 (17:47 +0100)
Dropped the protocol API specific symbol: HAS_PROTO_EXTENSION and
switch to the official API

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
(backported from 7dfd72dffff914b8d9cc941c62019004532c566f)

package/network/services/ead/src/ead.c

index 46a4625b6d4400ab98072bb323eb450fac3ca6be..ad97c543c5d6df1c67d9c0c488f4cfb44df22ea9 100644 (file)
@@ -145,9 +145,7 @@ ead_open_pcap(const char *ifname, char *errbuf, bool rx)
        pcap_set_snaplen(p, PCAP_MRU);
        pcap_set_promisc(p, rx);
        pcap_set_timeout(p, PCAP_TIMEOUT);
-#ifdef HAS_PROTO_EXTENSION
-       pcap_set_protocol(p, (rx ? htons(ETH_P_IP) : 0));
-#endif
+       pcap_set_protocol_linux(p, (rx ? htons(ETH_P_IP) : 0));
        pcap_set_buffer_size(p, (rx ? 10 : 1) * PCAP_MRU);
        pcap_activate(p);
        set_recv_type(p, rx);