aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 27c4e81efa24..09a9ab65f4e1 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -122,10 +122,12 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
122 np = inet6_sk(sk); 122 np = inet6_sk(sk);
123 123
124 if (type == NDISC_REDIRECT) { 124 if (type == NDISC_REDIRECT) {
125 struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie); 125 if (!sock_owned_by_user(sk)) {
126 struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie);
126 127
127 if (dst) 128 if (dst)
128 dst->ops->redirect(dst, sk, skb); 129 dst->ops->redirect(dst, sk, skb);
130 }
129 goto out; 131 goto out;
130 } 132 }
131 133
@@ -374,6 +376,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
374 goto drop_and_free; 376 goto drop_and_free;
375 377
376 inet_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT); 378 inet_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT);
379 reqsk_put(req);
377 return 0; 380 return 0;
378 381
379drop_and_free: 382drop_and_free:
@@ -420,6 +423,9 @@ static struct sock *dccp_v6_request_recv_sock(const struct sock *sk,
420 newsk->sk_backlog_rcv = dccp_v4_do_rcv; 423 newsk->sk_backlog_rcv = dccp_v4_do_rcv;
421 newnp->pktoptions = NULL; 424 newnp->pktoptions = NULL;
422 newnp->opt = NULL; 425 newnp->opt = NULL;
426 newnp->ipv6_mc_list = NULL;
427 newnp->ipv6_ac_list = NULL;
428 newnp->ipv6_fl_list = NULL;
423 newnp->mcast_oif = inet6_iif(skb); 429 newnp->mcast_oif = inet6_iif(skb);
424 newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; 430 newnp->mcast_hops = ipv6_hdr(skb)->hop_limit;
425 431
@@ -484,6 +490,9 @@ static struct sock *dccp_v6_request_recv_sock(const struct sock *sk,
484 /* Clone RX bits */ 490 /* Clone RX bits */
485 newnp->rxopt.all = np->rxopt.all; 491 newnp->rxopt.all = np->rxopt.all;
486 492
493 newnp->ipv6_mc_list = NULL;
494 newnp->ipv6_ac_list = NULL;
495 newnp->ipv6_fl_list = NULL;
487 newnp->pktoptions = NULL; 496 newnp->pktoptions = NULL;
488 newnp->opt = NULL; 497 newnp->opt = NULL;
489 newnp->mcast_oif = inet6_iif(skb); 498 newnp->mcast_oif = inet6_iif(skb);