From: mpi Date: Mon, 13 Apr 2015 08:40:32 +0000 (+0000) Subject: ether_input() should not longer be called directly so convert to X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d8118eef578d741101501bd8c308457b9c29650c;p=openbsd ether_input() should not longer be called directly so convert to if_input(). Needed for the upcoming pseudo-driver integration work. ok dlg@ --- 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 @@ -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);