Source-Changes-HG archive

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

[src/trunk]: src/sys/net call (ifp->if_input) at splnet(). ifp->if_input poin...



details:   https://anonhg.NetBSD.org/src/rev/f717370310cb
branches:  trunk
changeset: 581920:f717370310cb
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Jun 10 10:28:17 2005 +0000

description:
call (ifp->if_input) at splnet(). ifp->if_input points to ether_input()
which doesn't raise the IPL itself in all cases.
Should also fix PR 29546 (the pkgsrc kernel module needs to be updated).

diffstat:

 sys/net/if_tap.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 12cc49d872fd -r f717370310cb sys/net/if_tap.c
--- a/sys/net/if_tap.c  Fri Jun 10 08:06:33 2005 +0000
+++ b/sys/net/if_tap.c  Fri Jun 10 10:28:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tap.c,v 1.8 2005/05/17 04:14:58 christos Exp $      */
+/*     $NetBSD: if_tap.c,v 1.9 2005/06/10 10:28:17 bouyer Exp $        */
 
 /*
  *  Copyright (c) 2003, 2004 The NetBSD Foundation.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.8 2005/05/17 04:14:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.9 2005/06/10 10:28:17 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bpfilter.h"
@@ -919,6 +919,7 @@
        struct ifnet *ifp;
        struct mbuf *m, **mp;
        int error = 0;
+       int s;
 
        if (sc == NULL)
                return (ENXIO);
@@ -959,7 +960,9 @@
        if (ifp->if_bpf)
                bpf_mtap(ifp->if_bpf, m);
 #endif
+       s =splnet();
        (*ifp->if_input)(ifp, m);
+       splx(s);
 
        return (0);
 }



Home | Main Index | Thread Index | Old Index