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).
This commit is contained in:
bouyer 2005-06-10 10:28:17 +00:00
parent 11e42a915f
commit 5ce57a0010
1 changed files with 5 additions and 2 deletions

View File

@ -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 @@ tap_dev_write(int unit, struct uio *uio, int flags)
struct ifnet *ifp;
struct mbuf *m, **mp;
int error = 0;
int s;
if (sc == NULL)
return (ENXIO);
@ -959,7 +960,9 @@ tap_dev_write(int unit, struct uio *uio, int flags)
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m);
#endif
s =splnet();
(*ifp->if_input)(ifp, m);
splx(s);
return (0);
}