[OpenWrt-Devel] [PATCH 2/2] ead: use new protocol setting API since libpcap 1.9.0
wong.syrone at gmail.com
wong.syrone at gmail.com
Thu Jul 26 10:46:39 EDT 2018
From: Syrone Wong <wong.syrone at gmail.com>
Dropped the protocol API specific symbol: HAS_PROTO_EXTENSION and
switch to the official API
Signed-off-by: Syrone Wong <wong.syrone at gmail.com>
---
package/network/services/ead/src/ead.c | 4 +---
1 file changed, 1 insertion(+), 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);
--
2.18.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list