summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-04-13 08:40:32 +0000
committermpi <mpi@openbsd.org>2015-04-13 08:40:32 +0000
commitd8118eef578d741101501bd8c308457b9c29650c (patch)
tree179f450f82a172ee69d1235c0876ed16049ad027 /sys
parentcorrect multiplication idiom during xreallocarray, and expand appendnum (diff)
downloadwireguard-openbsd-d8118eef578d741101501bd8c308457b9c29650c.tar.xz
wireguard-openbsd-d8118eef578d741101501bd8c308457b9c29650c.zip
ether_input() should not longer be called directly so convert to
if_input(). Needed for the upcoming pseudo-driver integration work. ok dlg@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_vxlan.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index 9e2619e099c..4ffa46ec6a7 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vxlan.c,v 1.23 2015/04/07 10:46:20 mpi Exp $ */
+/* $OpenBSD: if_vxlan.c,v 1.24 2015/04/13 08:40:32 mpi Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
@@ -468,6 +468,7 @@ int
vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen,
struct sockaddr *srcsa)
{
+ struct mbuf_list ml = MBUF_LIST_INITIALIZER();
struct vxlan_softc *sc = NULL;
struct vxlan_header v;
u_int32_t vni;
@@ -506,7 +507,6 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen,
found:
m_adj(m, skip);
ifp = &sc->sc_ac.ac_if;
- m->m_pkthdr.rcvif = ifp;
if ((eh = mtod(m, struct ether_header *)) == NULL)
return (EINVAL);
@@ -525,19 +525,14 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen,
!ETHER_IS_MULTICAST(eh->ether_dhost))
m->m_flags &= ~M_MCAST;
-#if NBPFILTER > 0
- if (ifp->if_bpf)
- bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN);
-#endif
-
- m_adj(m, ETHER_HDR_LEN);
-
#if NPF > 0
pf_pkt_addr_changed(m);
#endif
ifp->if_ipackets++;
- ether_input(m, eh);
+ ml_enqueue(&ml, m);
+
+ if_input(ifp, &ml);
/* success */
return (1);