ipv6: drop unused "dev" arg of icmpv6_send()
authorAlexey Dobriyan <adobriyan@gmail.com>
Thu, 18 Feb 2010 08:25:24 +0000 (08:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2010 22:30:17 +0000 (14:30 -0800)
Dunno, what was the idea, it wasn't used for a long time.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 files changed:
drivers/infiniband/ulp/ipoib/ipoib_cm.c
include/linux/icmpv6.h
net/ipv4/ip_gre.c
net/ipv6/exthdrs.c
net/ipv6/icmp.c
net/ipv6/ip6_input.c
net/ipv6/ip6_output.c
net/ipv6/ip6_tunnel.c
net/ipv6/mip6.c
net/ipv6/netfilter/ip6t_REJECT.c
net/ipv6/reassembly.c
net/ipv6/route.c
net/ipv6/sit.c
net/ipv6/tunnel6.c
net/ipv6/udp.c
net/ipv6/xfrm6_output.c
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_xmit.c

index 30bdf427ee6d099b907f13ffe0d05dfa9d53c39a..83a7751c38d63fb5855708482016a6aae70f6719 100644 (file)
@@ -1374,7 +1374,7 @@ static void ipoib_cm_skb_reap(struct work_struct *work)
                        icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
                else if (skb->protocol == htons(ETH_P_IPV6))
-                       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, priv->dev);
+                       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
 #endif
                dev_kfree_skb_any(skb);
 
index c0d8357917e20eec58ba133efc4390aa66193340..4c4c74ec5987b552ea92afe9e195b53493797ebe 100644 (file)
@@ -174,8 +174,7 @@ struct icmp6_filter {
 
 extern void                            icmpv6_send(struct sk_buff *skb,
                                                    u8 type, u8 code,
-                                                   __u32 info, 
-                                                   struct net_device *dev);
+                                                   __u32 info);
 
 extern int                             icmpv6_init(void);
 extern int                             icmpv6_err_convert(u8 type, u8 code,
index a2a5983dbf039b5304e1a76a433462cbf5bc8094..c0c5274d02719831b2b3cd9d15488a1119d8a384 100644 (file)
@@ -793,7 +793,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
                }
 
                if (mtu >= IPV6_MIN_MTU && mtu < skb->len - tunnel->hlen + gre_hlen) {
-                       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev);
+                       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                        ip_rt_put(rt);
                        goto tx_error;
                }
index 4bac362b1335631df954b296023f7bb4befd9f14..074f2c084f9fdf536212298e3864d20b8f3ca1a2 100644 (file)
@@ -481,7 +481,7 @@ looped_back:
                        IP6_INC_STATS_BH(net, ip6_dst_idev(skb_dst(skb)),
                                         IPSTATS_MIB_INHDRERRORS);
                        icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT,
-                                   0, skb->dev);
+                                   0);
                        kfree_skb(skb);
                        return -1;
                }
index 9a37379d741acf42b05e08bb3c43156f4031d814..eb9abe24bdf0b1e277724958cfd113280936048e 100644 (file)
@@ -114,7 +114,7 @@ static __inline__ void icmpv6_xmit_unlock(struct sock *sk)
  */
 void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos)
 {
-       icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev);
+       icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos);
        kfree_skb(skb);
 }
 
@@ -300,8 +300,7 @@ static inline void mip6_addr_swap(struct sk_buff *skb) {}
 /*
  *     Send an ICMP message in response to a packet in error
  */
-void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
-                struct net_device *dev)
+void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
 {
        struct net *net = dev_net(skb->dev);
        struct inet6_dev *idev = NULL;
index 237e2dba6e944772e27e908188d7531e03744b7d..e28f9203deca46ecaf03958ea3c0483c79f54849 100644 (file)
@@ -216,8 +216,7 @@ resubmit:
                                IP6_INC_STATS_BH(net, idev,
                                                 IPSTATS_MIB_INUNKNOWNPROTOS);
                                icmpv6_send(skb, ICMPV6_PARAMPROB,
-                                           ICMPV6_UNK_NEXTHDR, nhoff,
-                                           skb->dev);
+                                           ICMPV6_UNK_NEXTHDR, nhoff);
                        }
                } else
                        IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS);
index eb6d09728633a02c9a8476f48d69847edb45bb0c..1a5fe9ad1947945315404346daf5e2de97fbee12 100644 (file)
@@ -267,7 +267,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
        if (net_ratelimit())
                printk(KERN_DEBUG "IPv6: sending pkt_too_big to self\n");
        skb->dev = dst->dev;
-       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
+       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
        IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_FRAGFAILS);
        kfree_skb(skb);
        return -EMSGSIZE;
@@ -441,8 +441,7 @@ int ip6_forward(struct sk_buff *skb)
        if (hdr->hop_limit <= 1) {
                /* Force OUTPUT device used as source address */
                skb->dev = dst->dev;
-               icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT,
-                           0, skb->dev);
+               icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, 0);
                IP6_INC_STATS_BH(net,
                                 ip6_dst_idev(dst), IPSTATS_MIB_INHDRERRORS);
 
@@ -504,7 +503,7 @@ int ip6_forward(struct sk_buff *skb)
                        goto error;
                if (addrtype & IPV6_ADDR_LINKLOCAL) {
                        icmpv6_send(skb, ICMPV6_DEST_UNREACH,
-                               ICMPV6_NOT_NEIGHBOUR, 0, skb->dev);
+                                   ICMPV6_NOT_NEIGHBOUR, 0);
                        goto error;
                }
        }
@@ -512,7 +511,7 @@ int ip6_forward(struct sk_buff *skb)
        if (skb->len > dst_mtu(dst)) {
                /* Again, force OUTPUT device used as source address */
                skb->dev = dst->dev;
-               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst_mtu(dst), skb->dev);
+               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst_mtu(dst));
                IP6_INC_STATS_BH(net,
                                 ip6_dst_idev(dst), IPSTATS_MIB_INTOOBIGERRORS);
                IP6_INC_STATS_BH(net,
@@ -627,7 +626,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
         */
        if (!skb->local_df) {
                skb->dev = skb_dst(skb)->dev;
-               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
+               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
                              IPSTATS_MIB_FRAGFAILS);
                kfree_skb(skb);
index 9b02492d8706d98abca896199f7c021760b0e8f0..138980eec214df5aca51a2933a9b901f6606e231 100644 (file)
@@ -622,7 +622,7 @@ ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                if (rt && rt->rt6i_dev)
                        skb2->dev = rt->rt6i_dev;
 
-               icmpv6_send(skb2, rel_type, rel_code, rel_info, skb2->dev);
+               icmpv6_send(skb2, rel_type, rel_code, rel_info);
 
                if (rt)
                        dst_release(&rt->u.dst);
@@ -1014,7 +1014,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
                tel = (struct ipv6_tlv_tnl_enc_lim *)&skb_network_header(skb)[offset];
                if (tel->encap_limit == 0) {
                        icmpv6_send(skb, ICMPV6_PARAMPROB,
-                                   ICMPV6_HDR_FIELD, offset + 2, skb->dev);
+                                   ICMPV6_HDR_FIELD, offset + 2);
                        return -1;
                }
                encap_limit = tel->encap_limit - 1;
@@ -1033,7 +1033,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
        err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu);
        if (err != 0) {
                if (err == -EMSGSIZE)
-                       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev);
+                       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                return -1;
        }
 
index f797e8c6f3b36de616de064616e43c22fa70a536..2794b6002836f446c4c6fb9835316d9ee61bba51 100644 (file)
@@ -56,7 +56,7 @@ static inline void *mip6_padn(__u8 *data, __u8 padlen)
 
 static inline void mip6_param_prob(struct sk_buff *skb, u8 code, int pos)
 {
-       icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev);
+       icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos);
 }
 
 static int mip6_mh_len(int type)
index 8311ca31816aed8355a7ead992ed42d11ca4a638..dd8afbaf00a8fe84ee317087e1c4e7dc3703ee34 100644 (file)
@@ -169,7 +169,7 @@ send_unreach(struct net *net, struct sk_buff *skb_in, unsigned char code,
        if (hooknum == NF_INET_LOCAL_OUT && skb_in->dev == NULL)
                skb_in->dev = net->loopback_dev;
 
-       icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0, NULL);
+       icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0);
 }
 
 static unsigned int
index b2847ed6a7d9c277110510f7c474389645d2ce68..a555156e9779edd2b3ea89314689d5c2e54de1af 100644 (file)
@@ -228,7 +228,7 @@ static void ip6_frag_expire(unsigned long data)
           pointer directly, device might already disappeared.
         */
        fq->q.fragments->dev = dev;
-       icmpv6_send(fq->q.fragments, ICMPV6_TIME_EXCEED, ICMPV6_EXC_FRAGTIME, 0, dev);
+       icmpv6_send(fq->q.fragments, ICMPV6_TIME_EXCEED, ICMPV6_EXC_FRAGTIME, 0);
 out_rcu_unlock:
        rcu_read_unlock();
 out:
index 8500156f263720e5042286da5a9109496ed3902d..88c0a5c49ae877d898eeadb537cf0251dc3f4218 100644 (file)
@@ -909,7 +909,7 @@ static void ip6_link_failure(struct sk_buff *skb)
 {
        struct rt6_info *rt;
 
-       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, skb->dev);
+       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0);
 
        rt = (struct rt6_info *) skb_dst(skb);
        if (rt) {
@@ -1884,7 +1884,7 @@ static int ip6_pkt_drop(struct sk_buff *skb, u8 code, int ipstats_mib_noroutes)
                              ipstats_mib_noroutes);
                break;
        }
-       icmpv6_send(skb, ICMPV6_DEST_UNREACH, code, 0, skb->dev);
+       icmpv6_send(skb, ICMPV6_DEST_UNREACH, code, 0);
        kfree_skb(skb);
        return 0;
 }
index 96eb2d4641c4566274b9a0eabdf18c4ad2816b72..b1eea811be48c1f73b3a6e727193a3a04435245e 100644 (file)
@@ -743,7 +743,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
                        skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu);
 
                if (skb->len > mtu) {
-                       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev);
+                       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                        ip_rt_put(rt);
                        goto tx_error;
                }
index 51e2832d13a661ee862b0ec0cd2e200bc2f5c7dd..e17bc1dfc1a4c7597dc15886a8d285f362066e22 100644 (file)
@@ -98,7 +98,7 @@ static int tunnel6_rcv(struct sk_buff *skb)
                if (!handler->handler(skb))
                        return 0;
 
-       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, skb->dev);
+       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
 
 drop:
        kfree_skb(skb);
@@ -116,7 +116,7 @@ static int tunnel46_rcv(struct sk_buff *skb)
                if (!handler->handler(skb))
                        return 0;
 
-       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, skb->dev);
+       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
 
 drop:
        kfree_skb(skb);
index a7af9d68cd6c3c5db4d211cc5f061303b103f7f6..52b8347ae3b2a0cd3c954cb44812ba71b676410c 100644 (file)
@@ -680,12 +680,11 @@ static inline int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh,
 int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
                   int proto)
 {
+       struct net *net = dev_net(skb->dev);
        struct sock *sk;
        struct udphdr *uh;
-       struct net_device *dev = skb->dev;
        struct in6_addr *saddr, *daddr;
        u32 ulen = 0;
-       struct net *net = dev_net(skb->dev);
 
        if (!pskb_may_pull(skb, sizeof(struct udphdr)))
                goto short_packet;
@@ -744,7 +743,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
                UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS,
                                proto == IPPROTO_UDPLITE);
 
-               icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev);
+               icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
 
                kfree_skb(skb);
                return 0;
index c4f4eef032a3dccfb4cebfbc3a2f72bcf231872f..0c92112dcba3754f6eb7b468970bbabbf2021acc 100644 (file)
@@ -38,7 +38,7 @@ static int xfrm6_tunnel_check_size(struct sk_buff *skb)
 
        if (!skb->local_df && skb->len > mtu) {
                skb->dev = dst->dev;
-               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
+               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                ret = -EMSGSIZE;
        }
 
index 72e96d823ebfcbb00c85425e63776302c9c28b20..44590887a92cfdfb7ed662d47b532456d68ceb3d 100644 (file)
@@ -515,8 +515,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
         */
 #ifdef CONFIG_IP_VS_IPV6
        if (svc->af == AF_INET6)
-               icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0,
-                           skb->dev);
+               icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
        else
 #endif
                icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
@@ -1048,7 +1047,7 @@ ip_vs_out(unsigned int hooknum, struct sk_buff *skb,
                                                icmpv6_send(skb,
                                                            ICMPV6_DEST_UNREACH,
                                                            ICMPV6_PORT_UNREACH,
-                                                           0, skb->dev);
+                                                           0);
                                        else
 #endif
                                                icmp_send(skb,
index 30b3189bd29c9aa982d2bf2e1a5ba9d7e0309cdd..223b5018c7dc658d876f4b3c749d1377b57931b4 100644 (file)
@@ -311,7 +311,7 @@ ip_vs_bypass_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
        mtu = dst_mtu(&rt->u.dst);
        if (skb->len > mtu) {
                dst_release(&rt->u.dst);
-               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
+               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                IP_VS_DBG_RL("%s(): frag needed\n", __func__);
                goto tx_error;
        }
@@ -454,7 +454,7 @@ ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
        mtu = dst_mtu(&rt->u.dst);
        if (skb->len > mtu) {
                dst_release(&rt->u.dst);
-               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
+               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                IP_VS_DBG_RL_PKT(0, pp, skb, 0,
                                 "ip_vs_nat_xmit_v6(): frag needed for");
                goto tx_error;
@@ -672,7 +672,7 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
                skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu);
 
        if (mtu < ntohs(old_iph->payload_len) + sizeof(struct ipv6hdr)) {
-               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
+               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                dst_release(&rt->u.dst);
                IP_VS_DBG_RL("%s(): frag needed\n", __func__);
                goto tx_error;
@@ -814,7 +814,7 @@ ip_vs_dr_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
        /* MTU checking */
        mtu = dst_mtu(&rt->u.dst);
        if (skb->len > mtu) {
-               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
+               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                dst_release(&rt->u.dst);
                IP_VS_DBG_RL("%s(): frag needed\n", __func__);
                goto tx_error;
@@ -965,7 +965,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
        mtu = dst_mtu(&rt->u.dst);
        if (skb->len > mtu) {
                dst_release(&rt->u.dst);
-               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
+               icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
                IP_VS_DBG_RL("%s(): frag needed\n", __func__);
                goto tx_error;
        }