Kill yet another argument to functions in IPv6. This time ip6_output
ifpp - XXX: just for statistics
ifpp is always NULL in all callers so that statistic confirms ifpp is
dying

-- 
:wq Claudio

Index: net/if_gif.c
===================================================================
RCS file: /cvs/src/sys/net/if_gif.c,v
retrieving revision 1.78
diff -u -p -r1.78 if_gif.c
--- net/if_gif.c        1 Sep 2015 21:24:04 -0000       1.78
+++ net/if_gif.c        11 Sep 2015 07:49:47 -0000
@@ -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:
Index: net/if_pfsync.c
===================================================================
RCS file: /cvs/src/sys/net/if_pfsync.c,v
retrieving revision 1.219
diff -u -p -r1.219 if_pfsync.c
--- net/if_pfsync.c     16 Jun 2015 11:09:39 -0000      1.219
+++ net/if_pfsync.c     11 Sep 2015 07:49:47 -0000
@@ -1804,7 +1804,7 @@ pfsync_undefer(struct pfsync_deferral *p
 #ifdef INET6
                        case AF_INET6:
                                ip6_output(pd->pd_m, NULL, NULL, 0,
-                                   NULL, NULL, NULL);
+                                   NULL, NULL);
                                break;
 #endif /* INET6 */
                        }
Index: net/pf.c
===================================================================
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.939
diff -u -p -r1.939 pf.c
--- net/pf.c    10 Sep 2015 08:28:31 -0000      1.939
+++ net/pf.c    11 Sep 2015 07:49:48 -0000
@@ -2420,7 +2420,7 @@ pf_send_tcp(const struct pf_rule *r, sa_
                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_rul
 
        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;
        }
 
Index: net/pipex.c
===================================================================
RCS file: /cvs/src/sys/net/pipex.c,v
retrieving revision 1.77
diff -u -p -r1.77 pipex.c
--- net/pipex.c 11 Sep 2015 07:42:35 -0000      1.77
+++ net/pipex.c 11 Sep 2015 07:49:48 -0000
@@ -1979,7 +1979,7 @@ pipex_l2tp_output(struct mbuf *m0, struc
                    &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;
                }
Index: netinet/ip_carp.c
===================================================================
RCS file: /cvs/src/sys/netinet/ip_carp.c,v
retrieving revision 1.267
diff -u -p -r1.267 ip_carp.c
--- netinet/ip_carp.c   10 Sep 2015 16:41:30 -0000      1.267
+++ netinet/ip_carp.c   11 Sep 2015 07:49:48 -0000
@@ -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++;
Index: netinet/ipsec_output.c
===================================================================
RCS file: /cvs/src/sys/netinet/ipsec_output.c,v
retrieving revision 1.60
diff -u -p -r1.60 ipsec_output.c
--- netinet/ipsec_output.c      15 Jul 2015 22:16:42 -0000      1.60
+++ netinet/ipsec_output.c      11 Sep 2015 07:49:48 -0000
@@ -478,7 +478,7 @@ ipsp_process_done(struct mbuf *m, struct
                 * 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. */
Index: netinet/tcp_input.c
===================================================================
RCS file: /cvs/src/sys/netinet/tcp_input.c,v
retrieving revision 1.304
diff -u -p -r1.304 tcp_input.c
--- netinet/tcp_input.c 10 Sep 2015 13:36:44 -0000      1.304
+++ netinet/tcp_input.c 11 Sep 2015 07:49:48 -0000
@@ -4367,7 +4367,7 @@ syn_cache_respond(struct syn_cache *sc, 
                                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:
Index: netinet/tcp_output.c
===================================================================
RCS file: /cvs/src/sys/netinet/tcp_output.c,v
retrieving revision 1.113
diff -u -p -r1.113 tcp_output.c
--- netinet/tcp_output.c        13 Jul 2015 23:11:37 -0000      1.113
+++ netinet/tcp_output.c        11 Sep 2015 07:49:48 -0000
@@ -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 */
        }
Index: netinet/tcp_subr.c
===================================================================
RCS file: /cvs/src/sys/netinet/tcp_subr.c,v
retrieving revision 1.147
diff -u -p -r1.147 tcp_subr.c
--- netinet/tcp_subr.c  1 Sep 2015 21:24:04 -0000       1.147
+++ netinet/tcp_subr.c  11 Sep 2015 07:49:48 -0000
@@ -404,7 +404,7 @@ tcp_respond(struct tcpcb *tp, caddr_t te
                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 */
Index: netinet6/icmp6.c
===================================================================
RCS file: /cvs/src/sys/netinet6/icmp6.c,v
retrieving revision 1.166
diff -u -p -r1.166 icmp6.c
--- netinet6/icmp6.c    11 Sep 2015 07:42:35 -0000      1.166
+++ netinet6/icmp6.c    11 Sep 2015 07:49:48 -0000
@@ -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]++;
 
Index: netinet6/ip6_divert.c
===================================================================
RCS file: /cvs/src/sys/netinet6/ip6_divert.c,v
retrieving revision 1.37
diff -u -p -r1.37 ip6_divert.c
--- netinet6/ip6_divert.c       10 Sep 2015 08:46:17 -0000      1.37
+++ netinet6/ip6_divert.c       11 Sep 2015 07:49:48 -0000
@@ -167,7 +167,7 @@ divert6_output(struct inpcb *inp, struct
                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++;
Index: netinet6/ip6_mroute.c
===================================================================
RCS file: /cvs/src/sys/netinet6/ip6_mroute.c,v
retrieving revision 1.88
diff -u -p -r1.88 ip6_mroute.c
--- netinet6/ip6_mroute.c       10 Sep 2015 09:09:03 -0000      1.88
+++ netinet6/ip6_mroute.c       11 Sep 2015 07:49:48 -0000
@@ -1545,7 +1545,7 @@ phyint_send6(struct ip6_hdr *ip6, struct
                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)
Index: netinet6/ip6_output.c
===================================================================
RCS file: /cvs/src/sys/netinet6/ip6_output.c,v
retrieving revision 1.180
diff -u -p -r1.180 ip6_output.c
--- netinet6/ip6_output.c       10 Sep 2015 09:11:11 -0000      1.180
+++ netinet6/ip6_output.c       11 Sep 2015 07:49:48 -0000
@@ -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;
@@ -653,13 +650,6 @@ reroute:
                        dst_scope = ip6->ip6_dst.s6_addr16[1];
                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,
Index: netinet6/ip6_var.h
===================================================================
RCS file: /cvs/src/sys/netinet6/ip6_var.h,v
retrieving revision 1.51
diff -u -p -r1.51 ip6_var.h
--- netinet6/ip6_var.h  17 Dec 2014 09:57:13 -0000      1.51
+++ netinet6/ip6_var.h  11 Sep 2015 07:49:48 -0000
@@ -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 **);
Index: netinet6/mld6.c
===================================================================
RCS file: /cvs/src/sys/netinet6/mld6.c,v
retrieving revision 1.44
diff -u -p -r1.44 mld6.c
--- netinet6/mld6.c     10 Sep 2015 09:10:42 -0000      1.44
+++ netinet6/mld6.c     11 Sep 2015 07:49:48 -0000
@@ -464,6 +464,6 @@ mld6_sendpkt(struct in6_multi *in6m, int
 #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);
 }
Index: netinet6/nd6_nbr.c
===================================================================
RCS file: /cvs/src/sys/netinet6/nd6_nbr.c,v
retrieving revision 1.93
diff -u -p -r1.93 nd6_nbr.c
--- netinet6/nd6_nbr.c  9 Sep 2015 15:51:40 -0000       1.93
+++ netinet6/nd6_nbr.c  11 Sep 2015 07:49:48 -0000
@@ -534,7 +534,7 @@ nd6_ns_output(struct ifnet *ifp, struct 
        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 
        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. */
Index: netinet6/nd6_rtr.c
===================================================================
RCS file: /cvs/src/sys/netinet6/nd6_rtr.c,v
retrieving revision 1.122
diff -u -p -r1.122 nd6_rtr.c
--- netinet6/nd6_rtr.c  10 Sep 2015 09:17:16 -0000      1.122
+++ netinet6/nd6_rtr.c  11 Sep 2015 07:49:49 -0000
@@ -273,7 +273,7 @@ nd6_rs_output(struct ifnet* ifp, struct 
        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]++;
Index: netinet6/raw_ip6.c
===================================================================
RCS file: /cvs/src/sys/netinet6/raw_ip6.c,v
retrieving revision 1.83
diff -u -p -r1.83 raw_ip6.c
--- netinet6/raw_ip6.c  11 Sep 2015 07:42:35 -0000      1.83
+++ netinet6/raw_ip6.c  11 Sep 2015 07:49:49 -0000
@@ -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
Index: netinet6/udp6_output.c
===================================================================
RCS file: /cvs/src/sys/netinet6/udp6_output.c,v
retrieving revision 1.36
diff -u -p -r1.36 udp6_output.c
--- netinet6/udp6_output.c      11 Sep 2015 07:42:35 -0000      1.36
+++ netinet6/udp6_output.c      11 Sep 2015 07:49:49 -0000
@@ -232,7 +232,7 @@ udp6_output(struct inpcb *in6p, struct m
 #endif
 
        error = ip6_output(m, optp, &in6p->inp_route6,
-           flags, in6p->inp_moptions6, NULL, in6p);
+           flags, in6p->inp_moptions6, in6p);
        goto releaseopt;
 
 release:

Reply via email to