]> The Tcpdump Group git mirrors - libpcap/commitdiff
Propagate from the main branch:
authorguy <guy>
Wed, 13 Sep 2006 07:02:15 +0000 (07:02 +0000)
committerguy <guy>
Wed, 13 Sep 2006 07:02:15 +0000 (07:02 +0000)
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

gencode.c

index 1c4e2ddf46df206e14f913fddcbea116b36626a0..81da02ef76d26ac90b0ba96c1c30fe6b0ed8e389 100644 (file)
--- 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: