From: guy Date: Wed, 13 Sep 2006 07:02:15 +0000 (+0000) Subject: Propagate from the main branch: X-Git-Tag: libpcap-0.9.5~6 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/bc6f4cb8a61b5c60a8027b34b5e680977ab6ac4a Propagate from the main branch: revision 1.265 date: 2006-03-16 08:42:14 +0000; author: hannes; state: Exp; lines: +3 -2 OR_PACKET should match at the beginning of the packet and not at the beginning of the packet plus variable-length link-layer --- diff --git a/gencode.c b/gencode.c index 1c4e2ddf..81da02ef 100644 --- a/gencode.c +++ b/gencode.c @@ -21,7 +21,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.221.2.40 2006-09-13 06:57:07 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.221.2.41 2006-09-13 07:02:15 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -1287,7 +1287,8 @@ gen_load_a(offrel, offset, size) switch (offrel) { case OR_PACKET: - s = gen_load_llrel(offset, size); + s = new_stmt(BPF_LD|BPF_ABS|size); + s->s.k = offset; break; case OR_LINK: