aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorSyrone Wong <wong.syrone@gmail.com>2018-07-26 22:46:39 +0800
committerJohn Crispin <john@phrozen.org>2018-07-27 11:17:20 +0200
commit7dfd72dffff914b8d9cc941c62019004532c566f (patch)
treeda60287bc0844f145f2421215de4ae679a611b34 /package
parent4d57c696b1504bc672416b9ba27eab4e1729b622 (diff)
downloadupstream-7dfd72dffff914b8d9cc941c62019004532c566f.tar.gz
upstream-7dfd72dffff914b8d9cc941c62019004532c566f.tar.bz2
upstream-7dfd72dffff914b8d9cc941c62019004532c566f.zip
ead: use new protocol setting API since libpcap 1.9.0
Dropped the protocol API specific symbol: HAS_PROTO_EXTENSION and switch to the official API Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
Diffstat (limited to 'package')
-rw-r--r--package/network/services/ead/src/ead.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/package/network/services/ead/src/ead.c b/package/network/services/ead/src/ead.c
index 46a4625b6d..ad97c543c5 100644
--- a/package/network/services/ead/src/ead.c
+++ b/package/network/services/ead/src/ead.c
@@ -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);