Commit 3ffe533c87281b68d469b279ff3a5056f9c75862
Committed by
David S. Miller
1 parent
bbef49daca
Exists in
master
and in
4 other branches
ipv6: drop unused "dev" arg of icmpv6_send()
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>
Showing 18 changed files with 33 additions and 39 deletions Side-by-side Diff
- 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
drivers/infiniband/ulp/ipoib/ipoib_cm.c
... | ... | @@ -1374,7 +1374,7 @@ |
1374 | 1374 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); |
1375 | 1375 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
1376 | 1376 | else if (skb->protocol == htons(ETH_P_IPV6)) |
1377 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, priv->dev); | |
1377 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | |
1378 | 1378 | #endif |
1379 | 1379 | dev_kfree_skb_any(skb); |
1380 | 1380 |
include/linux/icmpv6.h
net/ipv4/ip_gre.c
net/ipv6/exthdrs.c
net/ipv6/icmp.c
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | */ |
115 | 115 | void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos) |
116 | 116 | { |
117 | - icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); | |
117 | + icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos); | |
118 | 118 | kfree_skb(skb); |
119 | 119 | } |
120 | 120 | |
... | ... | @@ -300,8 +300,7 @@ |
300 | 300 | /* |
301 | 301 | * Send an ICMP message in response to a packet in error |
302 | 302 | */ |
303 | -void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, | |
304 | - struct net_device *dev) | |
303 | +void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) | |
305 | 304 | { |
306 | 305 | struct net *net = dev_net(skb->dev); |
307 | 306 | struct inet6_dev *idev = NULL; |
net/ipv6/ip6_input.c
... | ... | @@ -216,8 +216,7 @@ |
216 | 216 | IP6_INC_STATS_BH(net, idev, |
217 | 217 | IPSTATS_MIB_INUNKNOWNPROTOS); |
218 | 218 | icmpv6_send(skb, ICMPV6_PARAMPROB, |
219 | - ICMPV6_UNK_NEXTHDR, nhoff, | |
220 | - skb->dev); | |
219 | + ICMPV6_UNK_NEXTHDR, nhoff); | |
221 | 220 | } |
222 | 221 | } else |
223 | 222 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS); |
net/ipv6/ip6_output.c
... | ... | @@ -267,7 +267,7 @@ |
267 | 267 | if (net_ratelimit()) |
268 | 268 | printk(KERN_DEBUG "IPv6: sending pkt_too_big to self\n"); |
269 | 269 | skb->dev = dst->dev; |
270 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); | |
270 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | |
271 | 271 | IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_FRAGFAILS); |
272 | 272 | kfree_skb(skb); |
273 | 273 | return -EMSGSIZE; |
... | ... | @@ -441,8 +441,7 @@ |
441 | 441 | if (hdr->hop_limit <= 1) { |
442 | 442 | /* Force OUTPUT device used as source address */ |
443 | 443 | skb->dev = dst->dev; |
444 | - icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, | |
445 | - 0, skb->dev); | |
444 | + icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, 0); | |
446 | 445 | IP6_INC_STATS_BH(net, |
447 | 446 | ip6_dst_idev(dst), IPSTATS_MIB_INHDRERRORS); |
448 | 447 | |
... | ... | @@ -504,7 +503,7 @@ |
504 | 503 | goto error; |
505 | 504 | if (addrtype & IPV6_ADDR_LINKLOCAL) { |
506 | 505 | icmpv6_send(skb, ICMPV6_DEST_UNREACH, |
507 | - ICMPV6_NOT_NEIGHBOUR, 0, skb->dev); | |
506 | + ICMPV6_NOT_NEIGHBOUR, 0); | |
508 | 507 | goto error; |
509 | 508 | } |
510 | 509 | } |
... | ... | @@ -512,7 +511,7 @@ |
512 | 511 | if (skb->len > dst_mtu(dst)) { |
513 | 512 | /* Again, force OUTPUT device used as source address */ |
514 | 513 | skb->dev = dst->dev; |
515 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst_mtu(dst), skb->dev); | |
514 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst_mtu(dst)); | |
516 | 515 | IP6_INC_STATS_BH(net, |
517 | 516 | ip6_dst_idev(dst), IPSTATS_MIB_INTOOBIGERRORS); |
518 | 517 | IP6_INC_STATS_BH(net, |
... | ... | @@ -627,7 +626,7 @@ |
627 | 626 | */ |
628 | 627 | if (!skb->local_df) { |
629 | 628 | skb->dev = skb_dst(skb)->dev; |
630 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); | |
629 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | |
631 | 630 | IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), |
632 | 631 | IPSTATS_MIB_FRAGFAILS); |
633 | 632 | kfree_skb(skb); |
net/ipv6/ip6_tunnel.c
... | ... | @@ -622,7 +622,7 @@ |
622 | 622 | if (rt && rt->rt6i_dev) |
623 | 623 | skb2->dev = rt->rt6i_dev; |
624 | 624 | |
625 | - icmpv6_send(skb2, rel_type, rel_code, rel_info, skb2->dev); | |
625 | + icmpv6_send(skb2, rel_type, rel_code, rel_info); | |
626 | 626 | |
627 | 627 | if (rt) |
628 | 628 | dst_release(&rt->u.dst); |
... | ... | @@ -1014,7 +1014,7 @@ |
1014 | 1014 | tel = (struct ipv6_tlv_tnl_enc_lim *)&skb_network_header(skb)[offset]; |
1015 | 1015 | if (tel->encap_limit == 0) { |
1016 | 1016 | icmpv6_send(skb, ICMPV6_PARAMPROB, |
1017 | - ICMPV6_HDR_FIELD, offset + 2, skb->dev); | |
1017 | + ICMPV6_HDR_FIELD, offset + 2); | |
1018 | 1018 | return -1; |
1019 | 1019 | } |
1020 | 1020 | encap_limit = tel->encap_limit - 1; |
... | ... | @@ -1033,7 +1033,7 @@ |
1033 | 1033 | err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu); |
1034 | 1034 | if (err != 0) { |
1035 | 1035 | if (err == -EMSGSIZE) |
1036 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev); | |
1036 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | |
1037 | 1037 | return -1; |
1038 | 1038 | } |
1039 | 1039 |
net/ipv6/mip6.c
net/ipv6/netfilter/ip6t_REJECT.c
... | ... | @@ -169,7 +169,7 @@ |
169 | 169 | if (hooknum == NF_INET_LOCAL_OUT && skb_in->dev == NULL) |
170 | 170 | skb_in->dev = net->loopback_dev; |
171 | 171 | |
172 | - icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0, NULL); | |
172 | + icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0); | |
173 | 173 | } |
174 | 174 | |
175 | 175 | static unsigned int |
net/ipv6/reassembly.c
... | ... | @@ -228,7 +228,7 @@ |
228 | 228 | pointer directly, device might already disappeared. |
229 | 229 | */ |
230 | 230 | fq->q.fragments->dev = dev; |
231 | - icmpv6_send(fq->q.fragments, ICMPV6_TIME_EXCEED, ICMPV6_EXC_FRAGTIME, 0, dev); | |
231 | + icmpv6_send(fq->q.fragments, ICMPV6_TIME_EXCEED, ICMPV6_EXC_FRAGTIME, 0); | |
232 | 232 | out_rcu_unlock: |
233 | 233 | rcu_read_unlock(); |
234 | 234 | out: |
net/ipv6/route.c
... | ... | @@ -909,7 +909,7 @@ |
909 | 909 | { |
910 | 910 | struct rt6_info *rt; |
911 | 911 | |
912 | - icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, skb->dev); | |
912 | + icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0); | |
913 | 913 | |
914 | 914 | rt = (struct rt6_info *) skb_dst(skb); |
915 | 915 | if (rt) { |
... | ... | @@ -1884,7 +1884,7 @@ |
1884 | 1884 | ipstats_mib_noroutes); |
1885 | 1885 | break; |
1886 | 1886 | } |
1887 | - icmpv6_send(skb, ICMPV6_DEST_UNREACH, code, 0, skb->dev); | |
1887 | + icmpv6_send(skb, ICMPV6_DEST_UNREACH, code, 0); | |
1888 | 1888 | kfree_skb(skb); |
1889 | 1889 | return 0; |
1890 | 1890 | } |
net/ipv6/sit.c
net/ipv6/tunnel6.c
... | ... | @@ -98,7 +98,7 @@ |
98 | 98 | if (!handler->handler(skb)) |
99 | 99 | return 0; |
100 | 100 | |
101 | - icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, skb->dev); | |
101 | + icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0); | |
102 | 102 | |
103 | 103 | drop: |
104 | 104 | kfree_skb(skb); |
... | ... | @@ -116,7 +116,7 @@ |
116 | 116 | if (!handler->handler(skb)) |
117 | 117 | return 0; |
118 | 118 | |
119 | - icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, skb->dev); | |
119 | + icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0); | |
120 | 120 | |
121 | 121 | drop: |
122 | 122 | kfree_skb(skb); |
net/ipv6/udp.c
... | ... | @@ -680,12 +680,11 @@ |
680 | 680 | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, |
681 | 681 | int proto) |
682 | 682 | { |
683 | + struct net *net = dev_net(skb->dev); | |
683 | 684 | struct sock *sk; |
684 | 685 | struct udphdr *uh; |
685 | - struct net_device *dev = skb->dev; | |
686 | 686 | struct in6_addr *saddr, *daddr; |
687 | 687 | u32 ulen = 0; |
688 | - struct net *net = dev_net(skb->dev); | |
689 | 688 | |
690 | 689 | if (!pskb_may_pull(skb, sizeof(struct udphdr))) |
691 | 690 | goto short_packet; |
... | ... | @@ -744,7 +743,7 @@ |
744 | 743 | UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, |
745 | 744 | proto == IPPROTO_UDPLITE); |
746 | 745 | |
747 | - icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev); | |
746 | + icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0); | |
748 | 747 | |
749 | 748 | kfree_skb(skb); |
750 | 749 | return 0; |
net/ipv6/xfrm6_output.c
net/netfilter/ipvs/ip_vs_core.c
... | ... | @@ -515,8 +515,7 @@ |
515 | 515 | */ |
516 | 516 | #ifdef CONFIG_IP_VS_IPV6 |
517 | 517 | if (svc->af == AF_INET6) |
518 | - icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, | |
519 | - skb->dev); | |
518 | + icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0); | |
520 | 519 | else |
521 | 520 | #endif |
522 | 521 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); |
... | ... | @@ -1048,7 +1047,7 @@ |
1048 | 1047 | icmpv6_send(skb, |
1049 | 1048 | ICMPV6_DEST_UNREACH, |
1050 | 1049 | ICMPV6_PORT_UNREACH, |
1051 | - 0, skb->dev); | |
1050 | + 0); | |
1052 | 1051 | else |
1053 | 1052 | #endif |
1054 | 1053 | icmp_send(skb, |
net/netfilter/ipvs/ip_vs_xmit.c
... | ... | @@ -311,7 +311,7 @@ |
311 | 311 | mtu = dst_mtu(&rt->u.dst); |
312 | 312 | if (skb->len > mtu) { |
313 | 313 | dst_release(&rt->u.dst); |
314 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); | |
314 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | |
315 | 315 | IP_VS_DBG_RL("%s(): frag needed\n", __func__); |
316 | 316 | goto tx_error; |
317 | 317 | } |
... | ... | @@ -454,7 +454,7 @@ |
454 | 454 | mtu = dst_mtu(&rt->u.dst); |
455 | 455 | if (skb->len > mtu) { |
456 | 456 | dst_release(&rt->u.dst); |
457 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); | |
457 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | |
458 | 458 | IP_VS_DBG_RL_PKT(0, pp, skb, 0, |
459 | 459 | "ip_vs_nat_xmit_v6(): frag needed for"); |
460 | 460 | goto tx_error; |
... | ... | @@ -672,7 +672,7 @@ |
672 | 672 | skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu); |
673 | 673 | |
674 | 674 | if (mtu < ntohs(old_iph->payload_len) + sizeof(struct ipv6hdr)) { |
675 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); | |
675 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | |
676 | 676 | dst_release(&rt->u.dst); |
677 | 677 | IP_VS_DBG_RL("%s(): frag needed\n", __func__); |
678 | 678 | goto tx_error; |
... | ... | @@ -814,7 +814,7 @@ |
814 | 814 | /* MTU checking */ |
815 | 815 | mtu = dst_mtu(&rt->u.dst); |
816 | 816 | if (skb->len > mtu) { |
817 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); | |
817 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | |
818 | 818 | dst_release(&rt->u.dst); |
819 | 819 | IP_VS_DBG_RL("%s(): frag needed\n", __func__); |
820 | 820 | goto tx_error; |
... | ... | @@ -965,7 +965,7 @@ |
965 | 965 | mtu = dst_mtu(&rt->u.dst); |
966 | 966 | if (skb->len > mtu) { |
967 | 967 | dst_release(&rt->u.dst); |
968 | - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); | |
968 | + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | |
969 | 969 | IP_VS_DBG_RL("%s(): frag needed\n", __func__); |
970 | 970 | goto tx_error; |
971 | 971 | } |