-/* $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>
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;
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);
!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);