Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net consider BPF_ABS, BPF_IND and BPF_MSH as they used t...



details:   https://anonhg.NetBSD.org/src/rev/3e0355cf9705
branches:  trunk
changeset: 759301:3e0355cf9705
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Dec 05 09:42:20 2010 +0000

description:
consider BPF_ABS, BPF_IND and BPF_MSH as they used to be in rev 1.37.

this fixes dhclient, and i'm told dhcpcd as well.


this patch from skrll%netbsd.org@localhost, tested by me.

diffstat:

 sys/net/bpf_filter.c |  18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diffs (46 lines):

diff -r 28abaa3c7e3b -r 3e0355cf9705 sys/net/bpf_filter.c
--- a/sys/net/bpf_filter.c      Sun Dec 05 09:09:39 2010 +0000
+++ b/sys/net/bpf_filter.c      Sun Dec 05 09:42:20 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf_filter.c,v 1.39 2010/12/05 08:45:46 mrg Exp $      */
+/*     $NetBSD: bpf_filter.c,v 1.40 2010/12/05 09:42:20 mrg Exp $      */
 
 /*-
  * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.39 2010/12/05 08:45:46 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.40 2010/12/05 09:42:20 mrg Exp $");
 
 #if 0
 #if !(defined(lint) || defined(KERNEL))
@@ -484,11 +484,7 @@
                case BPF_LD:
                case BPF_LDX:
                        switch (BPF_MODE(p->code)) {
-                       case BPF_IMM:
-                               break;
-                       case BPF_ABS:
-                       case BPF_IND:
-                       case BPF_MSH:
+                       case BPF_MEM:
                                /*
                                 * There's no maximum packet data size
                                 * in userland.  The runtime packet length
@@ -503,10 +499,10 @@
                                        return 0;
 #endif
                                break;
-                       case BPF_MEM:
-                               if (p->k >= BPF_MEMWORDS)
-                                       return 0;
-                               break;
+                       case BPF_ABS:
+                       case BPF_IND:
+                       case BPF_MSH:
+                       case BPF_IMM:
                        case BPF_LEN:
                                break;
                        default:



Home | Main Index | Thread Index | Old Index