diff options
author | Peter Volkov <pva@gentoo.org> | 2008-09-16 13:36:44 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2008-09-16 13:36:44 +0000 |
commit | 0a7aee77e908ed97e2d41c09ca113808586e941a (patch) | |
tree | 6dd51d7218b1dd67e88579502cbb3f9e7b83cf7e /net-libs/libpcap/files | |
parent | Marked ~hppa (bug #234629). (diff) | |
download | gentoo-2-0a7aee77e908ed97e2d41c09ca113808586e941a.tar.gz gentoo-2-0a7aee77e908ed97e2d41c09ca113808586e941a.tar.bz2 gentoo-2-0a7aee77e908ed97e2d41c09ca113808586e941a.zip |
Added upstream patch to avoid msg "arptype 65534 not supported by libpcap", bug #229189, thank Toralf Förster for report. Added upstream patch to allow pcap_compile() to be called more than once.
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo i686)
Diffstat (limited to 'net-libs/libpcap/files')
-rw-r--r-- | net-libs/libpcap/files/libpcap-0.9.8-arptype-65534.patch | 31 | ||||
-rw-r--r-- | net-libs/libpcap/files/libpcap-0.9.8-pcap_compile.patch | 57 |
2 files changed, 88 insertions, 0 deletions
diff --git a/net-libs/libpcap/files/libpcap-0.9.8-arptype-65534.patch b/net-libs/libpcap/files/libpcap-0.9.8-arptype-65534.patch new file mode 100644 index 000000000000..7ad7f60aa9cc --- /dev/null +++ b/net-libs/libpcap/files/libpcap-0.9.8-arptype-65534.patch @@ -0,0 +1,31 @@ +Source: upstream developer Guy Harris +https://www.wireshark.org/lists/wireshark-users/200806/msg00206.html +Reason: avoid messages: arptype 65534 not supported by libpcap - falling back to cooked socket. + +Index: pcap-linux.c +=================================================================== +RCS file: /tcpdump/master/libpcap/pcap-linux.c,v +retrieving revision 1.148 +diff -c -r1.148 pcap-linux.c +*** pcap-linux.c 14 Apr 2008 21:04:51 -0000 1.148 +--- pcap-linux.c 24 Jun 2008 06:43:49 -0000 +*************** +*** 1539,1544 **** +--- 1539,1555 ---- + handle->linktype = DLT_LINUX_LAPD; + break; + ++ #ifndef ARPHRD_NONE ++ #define ARPHRD_NONE 0xFFFE ++ #endif ++ case ARPHRD_NONE: ++ /* ++ * No link-layer header; packets are just IP ++ * packets, so use DLT_RAW. ++ */ ++ handle->linktype = DLT_RAW; ++ break; ++ + default: + handle->linktype = -1; + break; diff --git a/net-libs/libpcap/files/libpcap-0.9.8-pcap_compile.patch b/net-libs/libpcap/files/libpcap-0.9.8-pcap_compile.patch new file mode 100644 index 000000000000..1691a75aaf15 --- /dev/null +++ b/net-libs/libpcap/files/libpcap-0.9.8-pcap_compile.patch @@ -0,0 +1,57 @@ +Source: upstream ... +> revision 1.291 +> date: 2007-10-26 00:44:56 +0000; author: guy; state: Exp; lines: +13 -1 +> Re-initialize the table of used registers, and the current register, +> before compiling an expression; pcap_compile() can be called more than +> once, and some registers can now be allocated and not freed in the +> process of code generation (for example, the register allocated to hold +> the length of a radiotap header, which can't be freed until we're +> finished generating all the code). + +Index: gencode.c +=================================================================== +RCS file: /tcpdump/master/libpcap/gencode.c,v +retrieving revision 1.290 +retrieving revision 1.291 +diff -c -r1.290 -r1.291 +*** gencode.c 5 Oct 2007 01:40:14 -0000 1.290 +--- gencode.c 26 Oct 2007 00:44:56 -0000 1.291 +*************** +*** 134,139 **** +--- 134,140 ---- + + static void init_linktype(pcap_t *); + ++ static void init_regs(void); + static int alloc_reg(void); + static void free_reg(int); + +*************** +*** 369,374 **** +--- 370,376 ---- + n_errors = 0; + root = NULL; + bpf_pcap = p; ++ init_regs(); + if (setjmp(top_ctx)) { + lex_cleanup(); + freechunks(); +*************** +*** 6045,6050 **** +--- 6047,6062 ---- + static int curreg; + + /* ++ * Initialize the table of used registers and the current register. ++ */ ++ static void ++ init_regs() ++ { ++ curreg = 0; ++ memset(regused, 0, sizeof regused); ++ } ++ ++ /* + * Return the next free register. + */ + static int |