diff options
-rw-r--r-- | sys/net/bpf.c | 4 | ||||
-rw-r--r-- | sys/net/if.c | 12 | ||||
-rw-r--r-- | sys/net/if_pppoe.c | 6 | ||||
-rw-r--r-- | sys/net/if_var.h | 4 | ||||
-rw-r--r-- | sys/net/pf.c | 6 | ||||
-rw-r--r-- | sys/net/pipex.c | 5 | ||||
-rw-r--r-- | sys/net/ppp_tty.c | 4 | ||||
-rw-r--r-- | sys/netinet/if_ether.c | 10 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 6 | ||||
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 3 | ||||
-rw-r--r-- | sys/netinet6/nd6.c | 4 | ||||
-rw-r--r-- | sys/netmpls/mpls_input.c | 4 | ||||
-rw-r--r-- | sys/netmpls/mpls_output.c | 4 |
13 files changed, 31 insertions, 41 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index a541aaa87ef..bcca3ea28f9 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.126 2015/09/12 20:26:06 mpi Exp $ */ +/* $OpenBSD: bpf.c,v 1.127 2015/09/13 17:53:44 mpi Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -556,7 +556,7 @@ bpfwrite(dev_t dev, struct uio *uio, int ioflag) dst.ss_family = pseudo_AF_HDRCMPLT; s = splsoftnet(); - error = if_output(ifp, m, (struct sockaddr *)&dst, NULL); + error = ifp->if_output(ifp, m, (struct sockaddr *)&dst, NULL); splx(s); /* * The driver frees the mbuf. diff --git a/sys/net/if.c b/sys/net/if.c index b8688ebfe86..f6dc8144926 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.378 2015/09/13 10:33:34 dlg Exp $ */ +/* $OpenBSD: if.c,v 1.379 2015/09/13 17:53:44 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -685,16 +685,6 @@ if_input_local(struct ifnet *ifp, struct mbuf *m, sa_family_t af) return (0); } -int -if_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, - struct rtentry *rt) -{ - if (rt != NULL && ISSET(rt->rt_flags, RTF_LOCAL)) - return (if_input_local(lo0ifp, m, dst->sa_family)); - - return (ifp->if_output(ifp, m, dst, rt)); -} - struct ifih { struct srpl_entry ifih_next; int (*ifih_input)(struct ifnet *, struct mbuf *, diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c index 718b2630dfc..33aab112b62 100644 --- a/sys/net/if_pppoe.c +++ b/sys/net/if_pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppoe.c,v 1.47 2015/09/12 20:26:06 mpi Exp $ */ +/* $OpenBSD: if_pppoe.c,v 1.48 2015/09/13 17:53:44 mpi Exp $ */ /* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */ /* @@ -883,7 +883,7 @@ pppoe_output(struct pppoe_softc *sc, struct mbuf *m) m->m_pkthdr.ph_rtableid = sc->sc_eth_if->if_rdomain; sc->sc_sppp.pp_if.if_opackets++; - return if_output(sc->sc_eth_if, m, &dst, NULL); + return sc->sc_eth_if->if_output(sc->sc_eth_if, m, &dst, NULL); } /* The ioctl routine. */ @@ -1383,7 +1383,7 @@ pppoe_send_padt(struct ifnet *outgoing_if, u_int session, const u_int8_t *dest) /* encapsulated packet is forced into rdomain of physical interface */ m0->m_pkthdr.ph_rtableid = outgoing_if->if_rdomain; - return if_output(outgoing_if, m0, &dst, NULL); + return outgoing_if->if_output(outgoing_if, m0, &dst, NULL); } #ifdef PPPOE_SERVER diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 901fc3e26e2..021a8c5e89b 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_var.h,v 1.42 2015/09/13 09:58:03 kettenis Exp $ */ +/* $OpenBSD: if_var.h,v 1.43 2015/09/13 17:53:44 mpi Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -407,8 +407,6 @@ void if_start(struct ifnet *); int if_enqueue(struct ifnet *, struct mbuf *); void if_input(struct ifnet *, struct mbuf_list *); int if_input_local(struct ifnet *, struct mbuf *, sa_family_t); -int if_output(struct ifnet *, struct mbuf *, struct sockaddr *, - struct rtentry *); void ether_ifattach(struct ifnet *); void ether_ifdetach(struct ifnet *); diff --git a/sys/net/pf.c b/sys/net/pf.c index b44193ccdf4..fe629518f7e 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.943 2015/09/12 20:26:06 mpi Exp $ */ +/* $OpenBSD: pf.c,v 1.944 2015/09/13 17:53:44 mpi Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -5575,7 +5575,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, ipstat.ips_outswcsum++; ip->ip_sum = in_cksum(m0, ip->ip_hl << 2); } - error = if_output(ifp, m0, sintosa(dst), NULL); + error = ifp->if_output(ifp, m0, sintosa(dst), NULL); goto done; } @@ -5604,7 +5604,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, m1 = m0->m_nextpkt; m0->m_nextpkt = 0; if (error == 0) - error = if_output(ifp, m0, sintosa(dst), NULL); + error = ifp->if_output(ifp, m0, sintosa(dst), NULL); else m_freem(m0); } diff --git a/sys/net/pipex.c b/sys/net/pipex.c index 7cab82bb64e..38953e079f6 100644 --- a/sys/net/pipex.c +++ b/sys/net/pipex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pipex.c,v 1.79 2015/09/12 20:26:07 mpi Exp $ */ +/* $OpenBSD: pipex.c,v 1.80 2015/09/13 17:53:44 mpi Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -1431,7 +1431,8 @@ pipex_pppoe_output(struct mbuf *m0, struct pipex_session *session) session->stat.opackets++; session->stat.obytes += len; - if_output(over_ifp, m0, (struct sockaddr *)&session->peer, NULL); + over_ifp->if_output(over_ifp, m0, (struct sockaddr *)&session->peer, + NULL); } #endif /* PIPEX_PPPOE */ diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index c44b8c3f818..cff9ca70206 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ppp_tty.c,v 1.37 2015/09/12 20:26:07 mpi Exp $ */ +/* $OpenBSD: ppp_tty.c,v 1.38 2015/09/13 17:53:44 mpi Exp $ */ /* $NetBSD: ppp_tty.c,v 1.12 1997/03/24 21:23:10 christos Exp $ */ /* @@ -381,7 +381,7 @@ pppwrite(struct tty *tp, struct uio *uio, int flag) bcopy(mtod(m0, u_char *), dst.sa_data, PPP_HDRLEN); m0->m_data += PPP_HDRLEN; m0->m_len -= PPP_HDRLEN; - return if_output(&sc->sc_if, m0, &dst, NULL); + return sc->sc_if.if_output(&sc->sc_if, m0, &dst, NULL); } /* diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index d21b99ba151..c59fd2aed47 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.167 2015/09/13 10:42:32 dlg Exp $ */ +/* $OpenBSD: if_ether.c,v 1.168 2015/09/13 17:53:44 mpi Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -309,7 +309,7 @@ arprequest(struct ifnet *ifp, u_int32_t *sip, u_int32_t *tip, u_int8_t *enaddr) sa.sa_family = pseudo_AF_HDRCMPLT; sa.sa_len = sizeof(sa); m->m_flags |= M_BCAST; - if_output(ifp, m, &sa, NULL); + ifp->if_output(ifp, m, &sa, NULL); } /* @@ -709,7 +709,7 @@ in_arpinput(struct mbuf *m) mh = ml_dequeue(&la->la_ml); la_hold_total--; - if_output(ifp, mh, rt_key(rt), rt); + ifp->if_output(ifp, mh, rt_key(rt), rt); if (ml_len(&la->la_ml) == len) { /* mbuf is back in queue. Discard. */ @@ -759,7 +759,7 @@ out: eh->ether_type = htons(ETHERTYPE_ARP); sa.sa_family = pseudo_AF_HDRCMPLT; sa.sa_len = sizeof(sa); - if_output(ifp, m, &sa, NULL); + ifp->if_output(ifp, m, &sa, NULL); if_put(ifp); return; } @@ -974,7 +974,7 @@ revarprequest(struct ifnet *ifp) sa.sa_family = pseudo_AF_HDRCMPLT; sa.sa_len = sizeof(sa); m->m_flags |= M_BCAST; - if_output(ifp, m, &sa, NULL); + ifp->if_output(ifp, m, &sa, NULL); } #ifdef NFSCLIENT diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 5ca69d5a69e..bc74c99f3e6 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.297 2015/09/13 13:57:07 mpi Exp $ */ +/* $OpenBSD: ip_output.c,v 1.298 2015/09/13 17:53:44 mpi Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -569,7 +569,7 @@ sendit: ip->ip_sum = in_cksum(m, hlen); } - error = if_output(ifp, m, sintosa(dst), ro->ro_rt); + error = ifp->if_output(ifp, m, sintosa(dst), ro->ro_rt); goto done; } @@ -609,7 +609,7 @@ sendit: m0 = m->m_nextpkt; m->m_nextpkt = 0; if (error == 0) - error = if_output(ifp, m, sintosa(dst), ro->ro_rt); + error = ifp->if_output(ifp, m, sintosa(dst), ro->ro_rt); else m_freem(m); } diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index f3ace76f084..0474319fc53 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1581,7 +1581,8 @@ phyint_send6(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m) * We just call if_output instead of nd6_output here, since * we need no ND for a multicast forwarded packet...right? */ - error = if_output(ifp, mb_copy, sin6tosa(&ro.ro_dst), NULL); + error = ifp->if_output(ifp, mb_copy, sin6tosa(&ro.ro_dst), + NULL); #ifdef MRT6DEBUG if (mrt6debug & DEBUG_XMIT) log(LOG_DEBUG, "phyint_send6 on mif %d err %d\n", diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 2842448b384..d735e511f4f 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.152 2015/09/12 20:50:17 mpi Exp $ */ +/* $OpenBSD: nd6.c,v 1.153 2015/09/13 17:53:44 mpi Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -1692,7 +1692,7 @@ nd6_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr_in6 *dst, return (0); sendpkt: - return (if_output(ifp, m, sin6tosa(dst), rt)); + return (ifp->if_output(ifp, m, sin6tosa(dst), rt)); bad: m_freem(m); diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c index 1b8243ec991..3499087c275 100644 --- a/sys/netmpls/mpls_input.c +++ b/sys/netmpls/mpls_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpls_input.c,v 1.48 2015/09/12 20:26:07 mpi Exp $ */ +/* $OpenBSD: mpls_input.c,v 1.49 2015/09/13 17:53:44 mpi Exp $ */ /* * Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org> @@ -240,7 +240,7 @@ do_v6: } #endif if (ifp->if_type == IFT_MPLSTUNNEL) { - if_output(ifp, m, rt_key(rt), rt); + ifp->if_output(ifp, m, rt_key(rt), rt); goto done; } diff --git a/sys/netmpls/mpls_output.c b/sys/netmpls/mpls_output.c index 6d21a76b86f..53054ac2d36 100644 --- a/sys/netmpls/mpls_output.c +++ b/sys/netmpls/mpls_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpls_output.c,v 1.23 2015/09/12 20:26:07 mpi Exp $ */ +/* $OpenBSD: mpls_output.c,v 1.24 2015/09/13 17:53:44 mpi Exp $ */ /* * Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org> @@ -58,7 +58,7 @@ mpls_output(struct ifnet *ifp0, struct mbuf *m, struct sockaddr *dst, if (rt0 == NULL || (dst->sa_family != AF_INET && dst->sa_family != AF_INET6 && dst->sa_family != AF_MPLS)) { if (!ISSET(ifp->if_xflags, IFXF_MPLS)) - return (if_output(ifp, m, dst, rt0)); + return (ifp->if_output(ifp, m, dst, rt0)); else return (ifp->if_ll_output(ifp, m, dst, rt0)); } |