summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_umb.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-05-30 07:50:37 +0000
committermpi <mpi@openbsd.org>2017-05-30 07:50:37 +0000
commit3f9b99eed8cb819707ecac8b1cf3d4a747d087dc (patch)
treee569c3dcd1729610acb752abb8601825327fe130 /sys/dev/usb/if_umb.c
parentUse memmove() instead of memcpy(), buffers are overlapping. (diff)
downloadwireguard-openbsd-3f9b99eed8cb819707ecac8b1cf3d4a747d087dc.tar.xz
wireguard-openbsd-3f9b99eed8cb819707ecac8b1cf3d4a747d087dc.zip
Introduce ipv{4,6}_input(), two wrappers around IP queues.
This will help transitionning to an un-KERNEL_LOCK()ed IP forwarding path. Disucssed with bluhm@, ok claudio@
Diffstat (limited to 'sys/dev/usb/if_umb.c')
-rw-r--r--sys/dev/usb/if_umb.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c
index a7843ab0375..1fbf2ea9c15 100644
--- a/sys/dev/usb/if_umb.c
+++ b/sys/dev/usb/if_umb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_umb.c,v 1.13 2017/05/18 14:48:27 bluhm Exp $ */
+/* $OpenBSD: if_umb.c,v 1.14 2017/05/30 07:50:37 mpi Exp $ */
/*
* Copyright (c) 2016 genua mbH
@@ -768,7 +768,6 @@ umb_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
int
umb_input(struct ifnet *ifp, struct mbuf *m, void *cookie)
{
- struct niqueue *inq;
uint8_t ipv;
if ((ifp->if_flags & IFF_UP) == 0) {
@@ -789,12 +788,12 @@ umb_input(struct ifnet *ifp, struct mbuf *m, void *cookie)
ifp->if_ibytes += m->m_pkthdr.len;
switch (ipv) {
case 4:
- inq = &ipintrq;
- break;
+ ipv4_input(ifp, m);
+ return 1;
#ifdef INET6
case 6:
- inq = &ip6intrq;
- break;
+ ipv6_input(ifp, m);
+ return 1;
#endif /* INET6 */
default:
ifp->if_ierrors++;
@@ -803,7 +802,6 @@ umb_input(struct ifnet *ifp, struct mbuf *m, void *cookie)
m_freem(m);
return 1;
}
- niq_enqueue(inq, m);
return 1;
}