diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ah6.c | 2 | ||||
-rw-r--r-- | net/ipv6/esp6.c | 2 | ||||
-rw-r--r-- | net/ipv6/exthdrs.c | 2 | ||||
-rw-r--r-- | net/ipv6/icmp.c | 10 | ||||
-rw-r--r-- | net/ipv6/ip6_fib.c | 17 | ||||
-rw-r--r-- | net/ipv6/ip6_input.c | 3 | ||||
-rw-r--r-- | net/ipv6/ip6_output.c | 11 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 6 | ||||
-rw-r--r-- | net/ipv6/ipcomp6.c | 6 | ||||
-rw-r--r-- | net/ipv6/mip6.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_REJECT.c | 2 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 2 | ||||
-rw-r--r-- | net/ipv6/route.c | 4 | ||||
-rw-r--r-- | net/ipv6/sit.c | 2 | ||||
-rw-r--r-- | net/ipv6/tunnel6.c | 4 | ||||
-rw-r--r-- | net/ipv6/udp.c | 5 | ||||
-rw-r--r-- | net/ipv6/xfrm6_input.c | 2 | ||||
-rw-r--r-- | net/ipv6/xfrm6_output.c | 2 |
18 files changed, 34 insertions, 50 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index c2f300c314be..5ac89025f9de 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
@@ -614,7 +614,7 @@ static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
614 | type != ICMPV6_PKT_TOOBIG) | 614 | type != ICMPV6_PKT_TOOBIG) |
615 | return; | 615 | return; |
616 | 616 | ||
617 | x = xfrm_state_lookup(net, (xfrm_address_t *)&iph->daddr, ah->spi, IPPROTO_AH, AF_INET6); | 617 | x = xfrm_state_lookup(net, skb->mark, (xfrm_address_t *)&iph->daddr, ah->spi, IPPROTO_AH, AF_INET6); |
618 | if (!x) | 618 | if (!x) |
619 | return; | 619 | return; |
620 | 620 | ||
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 668a46b655e6..ee9b93bdd6a2 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c | |||
@@ -365,7 +365,7 @@ static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
365 | type != ICMPV6_PKT_TOOBIG) | 365 | type != ICMPV6_PKT_TOOBIG) |
366 | return; | 366 | return; |
367 | 367 | ||
368 | x = xfrm_state_lookup(net, (xfrm_address_t *)&iph->daddr, esph->spi, IPPROTO_ESP, AF_INET6); | 368 | x = xfrm_state_lookup(net, skb->mark, (xfrm_address_t *)&iph->daddr, esph->spi, IPPROTO_ESP, AF_INET6); |
369 | if (!x) | 369 | if (!x) |
370 | return; | 370 | return; |
371 | printk(KERN_DEBUG "pmtu discovery on SA ESP/%08x/%pI6\n", | 371 | printk(KERN_DEBUG "pmtu discovery on SA ESP/%08x/%pI6\n", |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 4bac362b1335..074f2c084f9f 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -481,7 +481,7 @@ looped_back: | |||
481 | IP6_INC_STATS_BH(net, ip6_dst_idev(skb_dst(skb)), | 481 | IP6_INC_STATS_BH(net, ip6_dst_idev(skb_dst(skb)), |
482 | IPSTATS_MIB_INHDRERRORS); | 482 | IPSTATS_MIB_INHDRERRORS); |
483 | icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, | 483 | icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, |
484 | 0, skb->dev); | 484 | 0); |
485 | kfree_skb(skb); | 485 | kfree_skb(skb); |
486 | return -1; | 486 | return -1; |
487 | } | 487 | } |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 217dbc2e28d4..eb9abe24bdf0 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -67,11 +67,6 @@ | |||
67 | #include <asm/uaccess.h> | 67 | #include <asm/uaccess.h> |
68 | #include <asm/system.h> | 68 | #include <asm/system.h> |
69 | 69 | ||
70 | DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics) __read_mostly; | ||
71 | EXPORT_SYMBOL(icmpv6_statistics); | ||
72 | DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics) __read_mostly; | ||
73 | EXPORT_SYMBOL(icmpv6msg_statistics); | ||
74 | |||
75 | /* | 70 | /* |
76 | * The ICMP socket(s). This is the most convenient way to flow control | 71 | * The ICMP socket(s). This is the most convenient way to flow control |
77 | * our ICMP output as well as maintain a clean interface throughout | 72 | * our ICMP output as well as maintain a clean interface throughout |
@@ -119,7 +114,7 @@ static __inline__ void icmpv6_xmit_unlock(struct sock *sk) | |||
119 | */ | 114 | */ |
120 | void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos) | 115 | void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos) |
121 | { | 116 | { |
122 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); | 117 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos); |
123 | kfree_skb(skb); | 118 | kfree_skb(skb); |
124 | } | 119 | } |
125 | 120 | ||
@@ -305,8 +300,7 @@ static inline void mip6_addr_swap(struct sk_buff *skb) {} | |||
305 | /* | 300 | /* |
306 | * Send an ICMP message in response to a packet in error | 301 | * Send an ICMP message in response to a packet in error |
307 | */ | 302 | */ |
308 | void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, | 303 | void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) |
309 | struct net_device *dev) | ||
310 | { | 304 | { |
311 | struct net *net = dev_net(skb->dev); | 305 | struct net *net = dev_net(skb->dev); |
312 | struct inet6_dev *idev = NULL; | 306 | struct inet6_dev *idev = NULL; |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 77e122f53ea6..2f9847924fa5 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -93,29 +93,20 @@ static __u32 rt_sernum; | |||
93 | 93 | ||
94 | static void fib6_gc_timer_cb(unsigned long arg); | 94 | static void fib6_gc_timer_cb(unsigned long arg); |
95 | 95 | ||
96 | static struct fib6_walker_t fib6_walker_list = { | 96 | static LIST_HEAD(fib6_walkers); |
97 | .prev = &fib6_walker_list, | 97 | #define FOR_WALKERS(w) list_for_each_entry(w, &fib6_walkers, lh) |
98 | .next = &fib6_walker_list, | ||
99 | }; | ||
100 | |||
101 | #define FOR_WALKERS(w) for ((w)=fib6_walker_list.next; (w) != &fib6_walker_list; (w)=(w)->next) | ||
102 | 98 | ||
103 | static inline void fib6_walker_link(struct fib6_walker_t *w) | 99 | static inline void fib6_walker_link(struct fib6_walker_t *w) |
104 | { | 100 | { |
105 | write_lock_bh(&fib6_walker_lock); | 101 | write_lock_bh(&fib6_walker_lock); |
106 | w->next = fib6_walker_list.next; | 102 | list_add(&w->lh, &fib6_walkers); |
107 | w->prev = &fib6_walker_list; | ||
108 | w->next->prev = w; | ||
109 | w->prev->next = w; | ||
110 | write_unlock_bh(&fib6_walker_lock); | 103 | write_unlock_bh(&fib6_walker_lock); |
111 | } | 104 | } |
112 | 105 | ||
113 | static inline void fib6_walker_unlink(struct fib6_walker_t *w) | 106 | static inline void fib6_walker_unlink(struct fib6_walker_t *w) |
114 | { | 107 | { |
115 | write_lock_bh(&fib6_walker_lock); | 108 | write_lock_bh(&fib6_walker_lock); |
116 | w->next->prev = w->prev; | 109 | list_del(&w->lh); |
117 | w->prev->next = w->next; | ||
118 | w->prev = w->next = w; | ||
119 | write_unlock_bh(&fib6_walker_lock); | 110 | write_unlock_bh(&fib6_walker_lock); |
120 | } | 111 | } |
121 | static __inline__ u32 fib6_new_sernum(void) | 112 | static __inline__ u32 fib6_new_sernum(void) |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 237e2dba6e94..e28f9203deca 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -216,8 +216,7 @@ resubmit: | |||
216 | IP6_INC_STATS_BH(net, idev, | 216 | IP6_INC_STATS_BH(net, idev, |
217 | IPSTATS_MIB_INUNKNOWNPROTOS); | 217 | IPSTATS_MIB_INUNKNOWNPROTOS); |
218 | icmpv6_send(skb, ICMPV6_PARAMPROB, | 218 | icmpv6_send(skb, ICMPV6_PARAMPROB, |
219 | ICMPV6_UNK_NEXTHDR, nhoff, | 219 | ICMPV6_UNK_NEXTHDR, nhoff); |
220 | skb->dev); | ||
221 | } | 220 | } |
222 | } else | 221 | } else |
223 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS); | 222 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS); |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index eb6d09728633..1a5fe9ad1947 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -267,7 +267,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl, | |||
267 | if (net_ratelimit()) | 267 | if (net_ratelimit()) |
268 | printk(KERN_DEBUG "IPv6: sending pkt_too_big to self\n"); | 268 | printk(KERN_DEBUG "IPv6: sending pkt_too_big to self\n"); |
269 | skb->dev = dst->dev; | 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 | IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_FRAGFAILS); | 271 | IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_FRAGFAILS); |
272 | kfree_skb(skb); | 272 | kfree_skb(skb); |
273 | return -EMSGSIZE; | 273 | return -EMSGSIZE; |
@@ -441,8 +441,7 @@ int ip6_forward(struct sk_buff *skb) | |||
441 | if (hdr->hop_limit <= 1) { | 441 | if (hdr->hop_limit <= 1) { |
442 | /* Force OUTPUT device used as source address */ | 442 | /* Force OUTPUT device used as source address */ |
443 | skb->dev = dst->dev; | 443 | skb->dev = dst->dev; |
444 | icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, | 444 | icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, 0); |
445 | 0, skb->dev); | ||
446 | IP6_INC_STATS_BH(net, | 445 | IP6_INC_STATS_BH(net, |
447 | ip6_dst_idev(dst), IPSTATS_MIB_INHDRERRORS); | 446 | ip6_dst_idev(dst), IPSTATS_MIB_INHDRERRORS); |
448 | 447 | ||
@@ -504,7 +503,7 @@ int ip6_forward(struct sk_buff *skb) | |||
504 | goto error; | 503 | goto error; |
505 | if (addrtype & IPV6_ADDR_LINKLOCAL) { | 504 | if (addrtype & IPV6_ADDR_LINKLOCAL) { |
506 | icmpv6_send(skb, ICMPV6_DEST_UNREACH, | 505 | icmpv6_send(skb, ICMPV6_DEST_UNREACH, |
507 | ICMPV6_NOT_NEIGHBOUR, 0, skb->dev); | 506 | ICMPV6_NOT_NEIGHBOUR, 0); |
508 | goto error; | 507 | goto error; |
509 | } | 508 | } |
510 | } | 509 | } |
@@ -512,7 +511,7 @@ int ip6_forward(struct sk_buff *skb) | |||
512 | if (skb->len > dst_mtu(dst)) { | 511 | if (skb->len > dst_mtu(dst)) { |
513 | /* Again, force OUTPUT device used as source address */ | 512 | /* Again, force OUTPUT device used as source address */ |
514 | skb->dev = dst->dev; | 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 | IP6_INC_STATS_BH(net, | 515 | IP6_INC_STATS_BH(net, |
517 | ip6_dst_idev(dst), IPSTATS_MIB_INTOOBIGERRORS); | 516 | ip6_dst_idev(dst), IPSTATS_MIB_INTOOBIGERRORS); |
518 | IP6_INC_STATS_BH(net, | 517 | IP6_INC_STATS_BH(net, |
@@ -627,7 +626,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
627 | */ | 626 | */ |
628 | if (!skb->local_df) { | 627 | if (!skb->local_df) { |
629 | skb->dev = skb_dst(skb)->dev; | 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 | IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), | 630 | IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), |
632 | IPSTATS_MIB_FRAGFAILS); | 631 | IPSTATS_MIB_FRAGFAILS); |
633 | kfree_skb(skb); | 632 | kfree_skb(skb); |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 9b02492d8706..138980eec214 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -622,7 +622,7 @@ ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
622 | if (rt && rt->rt6i_dev) | 622 | if (rt && rt->rt6i_dev) |
623 | skb2->dev = rt->rt6i_dev; | 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 | if (rt) | 627 | if (rt) |
628 | dst_release(&rt->u.dst); | 628 | dst_release(&rt->u.dst); |
@@ -1014,7 +1014,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1014 | tel = (struct ipv6_tlv_tnl_enc_lim *)&skb_network_header(skb)[offset]; | 1014 | tel = (struct ipv6_tlv_tnl_enc_lim *)&skb_network_header(skb)[offset]; |
1015 | if (tel->encap_limit == 0) { | 1015 | if (tel->encap_limit == 0) { |
1016 | icmpv6_send(skb, ICMPV6_PARAMPROB, | 1016 | icmpv6_send(skb, ICMPV6_PARAMPROB, |
1017 | ICMPV6_HDR_FIELD, offset + 2, skb->dev); | 1017 | ICMPV6_HDR_FIELD, offset + 2); |
1018 | return -1; | 1018 | return -1; |
1019 | } | 1019 | } |
1020 | encap_limit = tel->encap_limit - 1; | 1020 | encap_limit = tel->encap_limit - 1; |
@@ -1033,7 +1033,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1033 | err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu); | 1033 | err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu); |
1034 | if (err != 0) { | 1034 | if (err != 0) { |
1035 | if (err == -EMSGSIZE) | 1035 | if (err == -EMSGSIZE) |
1036 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev); | 1036 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); |
1037 | return -1; | 1037 | return -1; |
1038 | } | 1038 | } |
1039 | 1039 | ||
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index bb42f39c1db8..85cccd6ed0b7 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -64,7 +64,7 @@ static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
64 | return; | 64 | return; |
65 | 65 | ||
66 | spi = htonl(ntohs(ipcomph->cpi)); | 66 | spi = htonl(ntohs(ipcomph->cpi)); |
67 | x = xfrm_state_lookup(net, (xfrm_address_t *)&iph->daddr, spi, IPPROTO_COMP, AF_INET6); | 67 | x = xfrm_state_lookup(net, skb->mark, (xfrm_address_t *)&iph->daddr, spi, IPPROTO_COMP, AF_INET6); |
68 | if (!x) | 68 | if (!x) |
69 | return; | 69 | return; |
70 | 70 | ||
@@ -92,6 +92,7 @@ static struct xfrm_state *ipcomp6_tunnel_create(struct xfrm_state *x) | |||
92 | t->props.family = AF_INET6; | 92 | t->props.family = AF_INET6; |
93 | t->props.mode = x->props.mode; | 93 | t->props.mode = x->props.mode; |
94 | memcpy(t->props.saddr.a6, x->props.saddr.a6, sizeof(struct in6_addr)); | 94 | memcpy(t->props.saddr.a6, x->props.saddr.a6, sizeof(struct in6_addr)); |
95 | memcpy(&t->mark, &x->mark, sizeof(t->mark)); | ||
95 | 96 | ||
96 | if (xfrm_init_state(t)) | 97 | if (xfrm_init_state(t)) |
97 | goto error; | 98 | goto error; |
@@ -114,10 +115,11 @@ static int ipcomp6_tunnel_attach(struct xfrm_state *x) | |||
114 | int err = 0; | 115 | int err = 0; |
115 | struct xfrm_state *t = NULL; | 116 | struct xfrm_state *t = NULL; |
116 | __be32 spi; | 117 | __be32 spi; |
118 | u32 mark = x->mark.m & x->mark.v; | ||
117 | 119 | ||
118 | spi = xfrm6_tunnel_spi_lookup(net, (xfrm_address_t *)&x->props.saddr); | 120 | spi = xfrm6_tunnel_spi_lookup(net, (xfrm_address_t *)&x->props.saddr); |
119 | if (spi) | 121 | if (spi) |
120 | t = xfrm_state_lookup(net, (xfrm_address_t *)&x->id.daddr, | 122 | t = xfrm_state_lookup(net, mark, (xfrm_address_t *)&x->id.daddr, |
121 | spi, IPPROTO_IPV6, AF_INET6); | 123 | spi, IPPROTO_IPV6, AF_INET6); |
122 | if (!t) { | 124 | if (!t) { |
123 | t = ipcomp6_tunnel_create(x); | 125 | t = ipcomp6_tunnel_create(x); |
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c index f797e8c6f3b3..2794b6002836 100644 --- a/net/ipv6/mip6.c +++ b/net/ipv6/mip6.c | |||
@@ -56,7 +56,7 @@ static inline void *mip6_padn(__u8 *data, __u8 padlen) | |||
56 | 56 | ||
57 | static inline void mip6_param_prob(struct sk_buff *skb, u8 code, int pos) | 57 | static inline void mip6_param_prob(struct sk_buff *skb, u8 code, int pos) |
58 | { | 58 | { |
59 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); | 59 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos); |
60 | } | 60 | } |
61 | 61 | ||
62 | static int mip6_mh_len(int type) | 62 | static int mip6_mh_len(int type) |
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index 8311ca31816a..dd8afbaf00a8 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
@@ -169,7 +169,7 @@ send_unreach(struct net *net, struct sk_buff *skb_in, unsigned char code, | |||
169 | if (hooknum == NF_INET_LOCAL_OUT && skb_in->dev == NULL) | 169 | if (hooknum == NF_INET_LOCAL_OUT && skb_in->dev == NULL) |
170 | skb_in->dev = net->loopback_dev; | 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 | static unsigned int | 175 | static unsigned int |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index b2847ed6a7d9..a555156e9779 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -228,7 +228,7 @@ static void ip6_frag_expire(unsigned long data) | |||
228 | pointer directly, device might already disappeared. | 228 | pointer directly, device might already disappeared. |
229 | */ | 229 | */ |
230 | fq->q.fragments->dev = dev; | 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 | out_rcu_unlock: | 232 | out_rcu_unlock: |
233 | rcu_read_unlock(); | 233 | rcu_read_unlock(); |
234 | out: | 234 | out: |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 8500156f2637..88c0a5c49ae8 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -909,7 +909,7 @@ static void ip6_link_failure(struct sk_buff *skb) | |||
909 | { | 909 | { |
910 | struct rt6_info *rt; | 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 | rt = (struct rt6_info *) skb_dst(skb); | 914 | rt = (struct rt6_info *) skb_dst(skb); |
915 | if (rt) { | 915 | if (rt) { |
@@ -1884,7 +1884,7 @@ static int ip6_pkt_drop(struct sk_buff *skb, u8 code, int ipstats_mib_noroutes) | |||
1884 | ipstats_mib_noroutes); | 1884 | ipstats_mib_noroutes); |
1885 | break; | 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 | kfree_skb(skb); | 1888 | kfree_skb(skb); |
1889 | return 0; | 1889 | return 0; |
1890 | } | 1890 | } |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 96eb2d4641c4..b1eea811be48 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -743,7 +743,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb, | |||
743 | skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu); | 743 | skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu); |
744 | 744 | ||
745 | if (skb->len > mtu) { | 745 | if (skb->len > mtu) { |
746 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev); | 746 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); |
747 | ip_rt_put(rt); | 747 | ip_rt_put(rt); |
748 | goto tx_error; | 748 | goto tx_error; |
749 | } | 749 | } |
diff --git a/net/ipv6/tunnel6.c b/net/ipv6/tunnel6.c index 51e2832d13a6..e17bc1dfc1a4 100644 --- a/net/ipv6/tunnel6.c +++ b/net/ipv6/tunnel6.c | |||
@@ -98,7 +98,7 @@ static int tunnel6_rcv(struct sk_buff *skb) | |||
98 | if (!handler->handler(skb)) | 98 | if (!handler->handler(skb)) |
99 | return 0; | 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 | drop: | 103 | drop: |
104 | kfree_skb(skb); | 104 | kfree_skb(skb); |
@@ -116,7 +116,7 @@ static int tunnel46_rcv(struct sk_buff *skb) | |||
116 | if (!handler->handler(skb)) | 116 | if (!handler->handler(skb)) |
117 | return 0; | 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 | drop: | 121 | drop: |
122 | kfree_skb(skb); | 122 | kfree_skb(skb); |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index a7af9d68cd6c..52b8347ae3b2 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -680,12 +680,11 @@ static inline int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, | |||
680 | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | 680 | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, |
681 | int proto) | 681 | int proto) |
682 | { | 682 | { |
683 | struct net *net = dev_net(skb->dev); | ||
683 | struct sock *sk; | 684 | struct sock *sk; |
684 | struct udphdr *uh; | 685 | struct udphdr *uh; |
685 | struct net_device *dev = skb->dev; | ||
686 | struct in6_addr *saddr, *daddr; | 686 | struct in6_addr *saddr, *daddr; |
687 | u32 ulen = 0; | 687 | u32 ulen = 0; |
688 | struct net *net = dev_net(skb->dev); | ||
689 | 688 | ||
690 | if (!pskb_may_pull(skb, sizeof(struct udphdr))) | 689 | if (!pskb_may_pull(skb, sizeof(struct udphdr))) |
691 | goto short_packet; | 690 | goto short_packet; |
@@ -744,7 +743,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
744 | UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, | 743 | UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, |
745 | proto == IPPROTO_UDPLITE); | 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 | kfree_skb(skb); | 748 | kfree_skb(skb); |
750 | return 0; | 749 | return 0; |
diff --git a/net/ipv6/xfrm6_input.c b/net/ipv6/xfrm6_input.c index 9084582d236b..2bc98ede1235 100644 --- a/net/ipv6/xfrm6_input.c +++ b/net/ipv6/xfrm6_input.c | |||
@@ -101,7 +101,7 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, | |||
101 | break; | 101 | break; |
102 | } | 102 | } |
103 | 103 | ||
104 | x = xfrm_state_lookup_byaddr(net, dst, src, proto, AF_INET6); | 104 | x = xfrm_state_lookup_byaddr(net, skb->mark, dst, src, proto, AF_INET6); |
105 | if (!x) | 105 | if (!x) |
106 | continue; | 106 | continue; |
107 | 107 | ||
diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c index c4f4eef032a3..0c92112dcba3 100644 --- a/net/ipv6/xfrm6_output.c +++ b/net/ipv6/xfrm6_output.c | |||
@@ -38,7 +38,7 @@ static int xfrm6_tunnel_check_size(struct sk_buff *skb) | |||
38 | 38 | ||
39 | if (!skb->local_df && skb->len > mtu) { | 39 | if (!skb->local_df && skb->len > mtu) { |
40 | skb->dev = dst->dev; | 40 | skb->dev = dst->dev; |
41 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); | 41 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); |
42 | ret = -EMSGSIZE; | 42 | ret = -EMSGSIZE; |
43 | } | 43 | } |
44 | 44 | ||