diff options
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r-- | net/dccp/ipv6.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index b963f35c65f6..3e70faab2989 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -85,7 +85,7 @@ static inline __u32 dccp_v6_init_sequence(struct sk_buff *skb) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 87 | static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
88 | int type, int code, int offset, __be32 info) | 88 | u8 type, u8 code, int offset, __be32 info) |
89 | { | 89 | { |
90 | struct ipv6hdr *hdr = (struct ipv6hdr *)skb->data; | 90 | struct ipv6hdr *hdr = (struct ipv6hdr *)skb->data; |
91 | const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + offset); | 91 | const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + offset); |
@@ -314,8 +314,9 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb) | |||
314 | struct ipv6hdr *rxip6h; | 314 | struct ipv6hdr *rxip6h; |
315 | struct sk_buff *skb; | 315 | struct sk_buff *skb; |
316 | struct flowi fl; | 316 | struct flowi fl; |
317 | struct net *net = dev_net(rxskb->dst->dev); | 317 | struct net *net = dev_net(skb_dst(rxskb)->dev); |
318 | struct sock *ctl_sk = net->dccp.v6_ctl_sk; | 318 | struct sock *ctl_sk = net->dccp.v6_ctl_sk; |
319 | struct dst_entry *dst; | ||
319 | 320 | ||
320 | if (dccp_hdr(rxskb)->dccph_type == DCCP_PKT_RESET) | 321 | if (dccp_hdr(rxskb)->dccph_type == DCCP_PKT_RESET) |
321 | return; | 322 | return; |
@@ -342,8 +343,9 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb) | |||
342 | security_skb_classify_flow(rxskb, &fl); | 343 | security_skb_classify_flow(rxskb, &fl); |
343 | 344 | ||
344 | /* sk = NULL, but it is safe for now. RST socket required. */ | 345 | /* sk = NULL, but it is safe for now. RST socket required. */ |
345 | if (!ip6_dst_lookup(ctl_sk, &skb->dst, &fl)) { | 346 | if (!ip6_dst_lookup(ctl_sk, &dst, &fl)) { |
346 | if (xfrm_lookup(net, &skb->dst, &fl, NULL, 0) >= 0) { | 347 | if (xfrm_lookup(net, &dst, &fl, NULL, 0) >= 0) { |
348 | skb_dst_set(skb, dst); | ||
347 | ip6_xmit(ctl_sk, skb, &fl, NULL, 0); | 349 | ip6_xmit(ctl_sk, skb, &fl, NULL, 0); |
348 | DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS); | 350 | DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS); |
349 | DCCP_INC_STATS_BH(DCCP_MIB_OUTRSTS); | 351 | DCCP_INC_STATS_BH(DCCP_MIB_OUTRSTS); |