From 25621beab4fd2b409d811b7f3000158ef1c20dae Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Thu, 8 Dec 2016 13:25:39 +0800 Subject: [PATCH] reaver: use 65536 as snaplen with pcap It should fix issue #3333. The patch was formed with help from t6x/reaver-wps-fork-t6x#101 Signed-off-by: Yousong Zhou --- net/reaver/Makefile | 2 +- .../patches/0101-pcap-use-65536-as-snaplen.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch diff --git a/net/reaver/Makefile b/net/reaver/Makefile index 7700c9ea3..1a499de7c 100644 --- a/net/reaver/Makefile +++ b/net/reaver/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=reaver PKG_VERSION:=1.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Yousong Zhou PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch b/net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch new file mode 100644 index 000000000..03f43182f --- /dev/null +++ b/net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch @@ -0,0 +1,11 @@ +--- a/src/init.c.orig 2016-12-08 13:23:17.386891467 +0800 ++++ b/src/init.c 2016-12-08 13:23:20.850892551 +0800 +@@ -121,7 +121,7 @@ pcap_t *capture_init(char *capture_sourc + pcap_t *handle = NULL; + char errbuf[PCAP_ERRBUF_SIZE] = { 0 }; + +- handle = pcap_open_live(capture_source, BUFSIZ, 1, 0, errbuf); ++ handle = pcap_open_live(capture_source, 65536, 1, 0, errbuf); + if(!handle) + { + handle = pcap_open_offline(capture_source, errbuf);