diff options
author | 2015-09-11 08:17:06 +0000 | |
---|---|---|
committer | 2015-09-11 08:17:06 +0000 | |
commit | 09d936d6f345151d16059ae6ce2d007bb9e70246 (patch) | |
tree | ec1a8231014a9fa77d6bc4b753e1f8abee5ade11 | |
parent | Don't spoof GPT OpenBSD partitions. Simply record and use the first one (diff) | |
download | wireguard-openbsd-09d936d6f345151d16059ae6ce2d007bb9e70246.tar.xz wireguard-openbsd-09d936d6f345151d16059ae6ce2d007bb9e70246.zip |
Kill yet another argument to functions in IPv6. This time ip6_output's
ifpp - XXX: just for statistics
ifpp is always NULL in all callers so that statistic confirms ifpp is
dying
OK mpi@
-rw-r--r-- | sys/net/if_gif.c | 4 | ||||
-rw-r--r-- | sys/net/if_pfsync.c | 4 | ||||
-rw-r--r-- | sys/net/pf.c | 6 | ||||
-rw-r--r-- | sys/net/pipex.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_carp.c | 4 | ||||
-rw-r--r-- | sys/netinet/ipsec_output.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_input.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_output.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_subr.c | 4 | ||||
-rw-r--r-- | sys/netinet6/icmp6.c | 6 | ||||
-rw-r--r-- | sys/netinet6/ip6_divert.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 2 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 14 | ||||
-rw-r--r-- | sys/netinet6/ip6_var.h | 4 | ||||
-rw-r--r-- | sys/netinet6/mld6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/nd6_nbr.c | 6 | ||||
-rw-r--r-- | sys/netinet6/nd6_rtr.c | 4 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/udp6_output.c | 4 |
19 files changed, 40 insertions, 50 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 0d4eb4e8663..c30b65872bb 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.78 2015/09/01 21:24:04 bluhm Exp $ */ +/* $OpenBSD: if_gif.c,v 1.79 2015/09/11 08:17:06 claudio Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -235,7 +235,7 @@ gif_start(struct ifnet *ifp) * of inner packet, to achieve path MTU discovery for * encapsulated packets. */ - ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL, NULL); + ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL); break; #endif default: diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c index 998a7dfff4f..7d633dbb977 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.219 2015/06/16 11:09:39 mpi Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.220 2015/09/11 08:17:06 claudio Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -1804,7 +1804,7 @@ pfsync_undefer(struct pfsync_deferral *pd, int drop) #ifdef INET6 case AF_INET6: ip6_output(pd->pd_m, NULL, NULL, 0, - NULL, NULL, NULL); + NULL, NULL); break; #endif /* INET6 */ } diff --git a/sys/net/pf.c b/sys/net/pf.c index a52c5bf1dd6..833323b90e5 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.939 2015/09/10 08:28:31 mpi Exp $ */ +/* $OpenBSD: pf.c,v 1.940 2015/09/11 08:17:06 claudio Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2420,7 +2420,7 @@ pf_send_tcp(const struct pf_rule *r, sa_family_t af, break; #ifdef INET6 case AF_INET6: - ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL); + ip6_output(m, NULL, NULL, 0, NULL, NULL); break; #endif /* INET6 */ } @@ -5671,7 +5671,7 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, if (!r->rt) { m0->m_pkthdr.pf.flags |= PF_TAG_GENERATED; - ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL); + ip6_output(m0, NULL, NULL, 0, NULL, NULL); return; } diff --git a/sys/net/pipex.c b/sys/net/pipex.c index 91f19ab712b..e700f9bc5eb 100644 --- a/sys/net/pipex.c +++ b/sys/net/pipex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pipex.c,v 1.77 2015/09/11 07:42:35 claudio Exp $ */ +/* $OpenBSD: pipex.c,v 1.78 2015/09/11 08:17:06 claudio Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -1979,7 +1979,7 @@ pipex_l2tp_output(struct mbuf *m0, struct pipex_session *session) &session->peer.sin6, NULL); /* ip6->ip6_plen will be filled in ip6_output. */ - if (ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL) != 0) { + if (ip6_output(m0, NULL, NULL, 0, NULL, NULL) != 0) { PIPEX_DBG((session, LOG_DEBUG, "ip6_output failed.")); goto drop; } diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 96b44ff497d..3488407426d 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.267 2015/09/10 16:41:30 mikeb Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.268 2015/09/11 08:17:06 claudio Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -1174,7 +1174,7 @@ carp_send_ad(void *v) sc->sc_if.if_obytes += len; carpstats.carps_opackets6++; - error = ip6_output(m, NULL, NULL, 0, &sc->sc_im6o, NULL, NULL); + error = ip6_output(m, NULL, NULL, 0, &sc->sc_im6o, NULL); if (error) { if (error == ENOBUFS) carpstats.carps_onomem++; diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c index cbdb6e96808..91c319fd403 100644 --- a/sys/netinet/ipsec_output.c +++ b/sys/netinet/ipsec_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_output.c,v 1.60 2015/07/15 22:16:42 deraadt Exp $ */ +/* $OpenBSD: ipsec_output.c,v 1.61 2015/09/11 08:17:06 claudio Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -478,7 +478,7 @@ ipsp_process_done(struct mbuf *m, struct tdb *tdb) * We don't need massage, IPv6 header fields are always in * net endian. */ - return (ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL)); + return (ip6_output(m, NULL, NULL, 0, NULL, NULL)); #endif /* INET6 */ } return EINVAL; /* Not reached. */ diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 4493a24d6b7..f7c98b7f756 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.304 2015/09/10 13:36:44 bluhm Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.305 2015/09/11 08:17:06 claudio Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -4367,7 +4367,7 @@ syn_cache_respond(struct syn_cache *sc, struct mbuf *m) ro->ro_rt ? ro->ro_rt->rt_ifp : NULL); error = ip6_output(m, NULL /*XXX*/, (struct route_in6 *)ro, 0, - NULL, NULL, NULL); + NULL, NULL); break; #endif default: diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index f52ea666340..aa320da5cd9 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.113 2015/07/13 23:11:37 bluhm Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.114 2015/09/11 08:17:06 claudio Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -1116,7 +1116,7 @@ send: } error = ip6_output(m, tp->t_inpcb->inp_outputopts6, &tp->t_inpcb->inp_route6, - 0, NULL, NULL, tp->t_inpcb); + 0, NULL, tp->t_inpcb); break; #endif /* INET6 */ } diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index b547a77844a..b469c02d099 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.147 2015/09/01 21:24:04 bluhm Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.148 2015/09/11 08:17:06 claudio Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -404,7 +404,7 @@ tcp_respond(struct tcpcb *tp, caddr_t template, struct tcphdr *th0, ip6->ip6_plen = tlen - sizeof(struct ip6_hdr); ip6->ip6_plen = htons(ip6->ip6_plen); ip6_output(m, tp ? tp->t_inpcb->inp_outputopts6 : NULL, - (struct route_in6 *)ro, 0, NULL, NULL, + (struct route_in6 *)ro, 0, NULL, tp ? tp->t_inpcb : NULL); break; #endif /* INET6 */ diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index b5fd30e3042..d636b46c49d 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.c,v 1.166 2015/09/11 07:42:35 claudio Exp $ */ +/* $OpenBSD: icmp6.c,v 1.167 2015/09/11 08:17:06 claudio Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -1300,7 +1300,7 @@ icmp6_reflect(struct mbuf *m, size_t off) #if NPF > 0 pf_pkt_addr_changed(m); #endif - ip6_output(m, NULL, NULL, IPV6_MINMTU, NULL, NULL, NULL); + ip6_output(m, NULL, NULL, IPV6_MINMTU, NULL, NULL); return; bad: @@ -1789,7 +1789,7 @@ noredhdropt: m->m_pkthdr.csum_flags |= M_ICMP_CSUM_OUT; /* send the packet to outside... */ - ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL); + ip6_output(m, NULL, NULL, 0, NULL, NULL); icmp6stat.icp6s_outhist[ND_REDIRECT]++; diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c index 87ed5eebf1a..0349ded5abf 100644 --- a/sys/netinet6/ip6_divert.c +++ b/sys/netinet6/ip6_divert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_divert.c,v 1.37 2015/09/10 08:46:17 claudio Exp $ */ +/* $OpenBSD: ip6_divert.c,v 1.38 2015/09/11 08:17:06 claudio Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -167,7 +167,7 @@ divert6_output(struct inpcb *inp, struct mbuf *m, struct mbuf *nam, niq_enqueue(&ip6intrq, m); /* return error on q full? */ } else { error = ip6_output(m, NULL, &inp->inp_route6, - IP_ALLOWBROADCAST | IP_RAWOUTPUT, NULL, NULL, NULL); + IP_ALLOWBROADCAST | IP_RAWOUTPUT, NULL, NULL); } div6stat.divs_opackets++; diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 5b831ac9406..6d5856f930c 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1545,7 +1545,7 @@ phyint_send6(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m) im6o.im6o_hlim = ip6->ip6_hlim; im6o.im6o_loop = 1; error = ip6_output(mb_copy, NULL, &ro, IPV6_FORWARDING, &im6o, - NULL, NULL); + NULL); #ifdef MRT6DEBUG if (mrt6debug & DEBUG_XMIT) diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index acf2b1f5c98..c6d037fc50f 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.180 2015/09/10 09:11:11 mpi Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.181 2015/09/11 08:17:06 claudio Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -149,13 +149,10 @@ struct idgen32_ctx ip6_id_ctx; * type of "mtu": rt_rmx.rmx_mtu is u_long, ifnet.ifr_mtu is int, and * nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one, * which is rt_rmx.rmx_mtu. - * - * ifpp - XXX: just for statistics */ int ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro, - int flags, struct ip6_moptions *im6o, struct ifnet **ifpp, - struct inpcb *inp) + int flags, struct ip6_moptions *im6o, struct inpcb *inp) { struct ip6_hdr *ip6; struct ifnet *ifp; @@ -654,13 +651,6 @@ reroute: ip6->ip6_dst.s6_addr16[1] = 0; } - /* - * Fill the outgoing interface to tell the upper layer - * to increment per-interface statistics. - */ - if (ifpp) - *ifpp = ifp; - /* Determine path MTU. */ if ((error = ip6_getpmtu(ro_pmtu, ro, ifp, &finaldst, &mtu, &alwaysfrag)) != 0) diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index b02cd707b6d..3bfc659d52b 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_var.h,v 1.51 2014/12/17 09:57:13 mpi Exp $ */ +/* $OpenBSD: ip6_var.h,v 1.52 2015/09/11 08:17:06 claudio Exp $ */ /* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */ /* @@ -276,7 +276,7 @@ void ip6_forward(struct mbuf *, int); void ip6_mloopback(struct ifnet *, struct mbuf *, struct sockaddr_in6 *); int ip6_output(struct mbuf *, struct ip6_pktopts *, struct route_in6 *, int, - struct ip6_moptions *, struct ifnet **, struct inpcb *); + struct ip6_moptions *, struct inpcb *); int ip6_fragment(struct mbuf *, int, u_char, u_long); int ip6_ctloutput(int, struct socket *, int, int, struct mbuf **); int ip6_raw_ctloutput(int, struct socket *, int, int, struct mbuf **); diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index 8c428119f1f..0bca05f3e9d 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mld6.c,v 1.44 2015/09/10 09:10:42 claudio Exp $ */ +/* $OpenBSD: mld6.c,v 1.45 2015/09/11 08:17:06 claudio Exp $ */ /* $KAME: mld6.c,v 1.26 2001/02/16 14:50:35 itojun Exp $ */ /* @@ -464,6 +464,6 @@ mld6_sendpkt(struct in6_multi *in6m, int type, const struct in6_addr *dst) #endif icmp6stat.icp6s_outhist[type]++; - ip6_output(mh, &ip6_opts, NULL, ia6 ? 0 : IPV6_UNSPECSRC, &im6o, NULL, + ip6_output(mh, &ip6_opts, NULL, ia6 ? 0 : IPV6_UNSPECSRC, &im6o, NULL); } diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index a7a592eb3b4..1d7ea4a9f46 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_nbr.c,v 1.93 2015/09/09 15:51:40 mpi Exp $ */ +/* $OpenBSD: nd6_nbr.c,v 1.94 2015/09/11 08:17:06 claudio Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -534,7 +534,7 @@ nd6_ns_output(struct ifnet *ifp, struct in6_addr *daddr6, nd_ns->nd_ns_cksum = 0; m->m_pkthdr.csum_flags |= M_ICMP_CSUM_OUT; - ip6_output(m, NULL, &ro, dad ? IPV6_UNSPECSRC : 0, &im6o, NULL, NULL); + ip6_output(m, NULL, &ro, dad ? IPV6_UNSPECSRC : 0, &im6o, NULL); icmp6stat.icp6s_outhist[ND_NEIGHBOR_SOLICIT]++; if (ro.ro_rt) { /* we don't cache this route. */ @@ -1059,7 +1059,7 @@ nd6_na_output(struct ifnet *ifp, struct in6_addr *daddr6, nd_na->nd_na_cksum = 0; m->m_pkthdr.csum_flags |= M_ICMP_CSUM_OUT; - ip6_output(m, NULL, &ro, 0, &im6o, NULL, NULL); + ip6_output(m, NULL, &ro, 0, &im6o, NULL); icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT]++; if (ro.ro_rt) { /* we don't cache this route. */ diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 12b24966362..7b863667483 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_rtr.c,v 1.122 2015/09/10 09:17:16 claudio Exp $ */ +/* $OpenBSD: nd6_rtr.c,v 1.123 2015/09/11 08:17:06 claudio Exp $ */ /* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */ /* @@ -273,7 +273,7 @@ nd6_rs_output(struct ifnet* ifp, struct in6_ifaddr *ia6) ip6->ip6_plen = htons((u_short)icmp6len); s = splsoftnet(); - ip6_output(m, NULL, NULL, 0, &im6o, NULL, NULL); + ip6_output(m, NULL, NULL, 0, &im6o, NULL); splx(s); icmp6stat.icp6s_outhist[ND_ROUTER_SOLICIT]++; diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 6f337022c08..875eb3c7b7c 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip6.c,v 1.83 2015/09/11 07:42:35 claudio Exp $ */ +/* $OpenBSD: raw_ip6.c,v 1.84 2015/09/11 08:17:06 claudio Exp $ */ /* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */ /* @@ -478,7 +478,7 @@ rip6_output(struct mbuf *m, ...) #endif error = ip6_output(m, optp, &in6p->inp_route6, flags, - in6p->inp_moptions6, NULL, in6p); + in6p->inp_moptions6, in6p); if (so->so_proto->pr_protocol == IPPROTO_ICMPV6) { icmp6stat.icp6s_outhist[type]++; } else diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c index 67e0c0249cd..13e7f2249da 100644 --- a/sys/netinet6/udp6_output.c +++ b/sys/netinet6/udp6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp6_output.c,v 1.36 2015/09/11 07:42:35 claudio Exp $ */ +/* $OpenBSD: udp6_output.c,v 1.37 2015/09/11 08:17:06 claudio Exp $ */ /* $KAME: udp6_output.c,v 1.21 2001/02/07 11:51:54 itojun Exp $ */ /* @@ -232,7 +232,7 @@ udp6_output(struct inpcb *in6p, struct mbuf *m, struct mbuf *addr6, #endif error = ip6_output(m, optp, &in6p->inp_route6, - flags, in6p->inp_moptions6, NULL, in6p); + flags, in6p->inp_moptions6, in6p); goto releaseopt; release: |