aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 7171a78671aa..fc4242c0767c 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -277,7 +277,7 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
277 __u64 seq; 277 __u64 seq;
278 278
279 sk = inet6_lookup(&dccp_hashinfo, &hdr->daddr, dh->dccph_dport, 279 sk = inet6_lookup(&dccp_hashinfo, &hdr->daddr, dh->dccph_dport,
280 &hdr->saddr, dh->dccph_sport, skb->dev->ifindex); 280 &hdr->saddr, dh->dccph_sport, inet6_iif(skb));
281 281
282 if (sk == NULL) { 282 if (sk == NULL) {
283 ICMP6_INC_STATS_BH(__in6_dev_get(skb->dev), ICMP6_MIB_INERRORS); 283 ICMP6_INC_STATS_BH(__in6_dev_get(skb->dev), ICMP6_MIB_INERRORS);
@@ -550,7 +550,7 @@ static void dccp_v6_ctl_send_reset(struct sk_buff *rxskb)
550 dccp_hdr_reset(skb)->dccph_reset_code = 550 dccp_hdr_reset(skb)->dccph_reset_code =
551 DCCP_SKB_CB(rxskb)->dccpd_reset_code; 551 DCCP_SKB_CB(rxskb)->dccpd_reset_code;
552 552
553 /* See "8.3.1. Abnormal Termination" in draft-ietf-dccp-spec-11 */ 553 /* See "8.3.1. Abnormal Termination" in RFC 4340 */
554 seqno = 0; 554 seqno = 0;
555 if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) 555 if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
556 dccp_set_seqno(&seqno, DCCP_SKB_CB(rxskb)->dccpd_ack_seq + 1); 556 dccp_set_seqno(&seqno, DCCP_SKB_CB(rxskb)->dccpd_ack_seq + 1);
@@ -672,7 +672,6 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
672 672
673static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) 673static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
674{ 674{
675 struct inet_request_sock *ireq;
676 struct dccp_sock dp; 675 struct dccp_sock dp;
677 struct request_sock *req; 676 struct request_sock *req;
678 struct dccp_request_sock *dreq; 677 struct dccp_request_sock *dreq;
@@ -701,7 +700,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
701 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) 700 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
702 goto drop; 701 goto drop;
703 702
704 req = inet6_reqsk_alloc(sk->sk_prot->rsk_prot); 703 req = inet6_reqsk_alloc(&dccp6_request_sock_ops);
705 if (req == NULL) 704 if (req == NULL)
706 goto drop; 705 goto drop;
707 706
@@ -713,7 +712,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
713 goto drop_and_free; 712 goto drop_and_free;
714 713
715 ireq6 = inet6_rsk(req); 714 ireq6 = inet6_rsk(req);
716 ireq = inet_rsk(req);
717 ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr); 715 ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr);
718 ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr); 716 ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr);
719 req->rcv_wnd = dccp_feat_default_sequence_window; 717 req->rcv_wnd = dccp_feat_default_sequence_window;
@@ -997,6 +995,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
997 if (sk->sk_state == DCCP_OPEN) { /* Fast path */ 995 if (sk->sk_state == DCCP_OPEN) { /* Fast path */
998 if (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len)) 996 if (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len))
999 goto reset; 997 goto reset;
998 if (opt_skb) {
999 /* This is where we would goto ipv6_pktoptions. */
1000 __kfree_skb(opt_skb);
1001 }
1000 return 0; 1002 return 0;
1001 } 1003 }
1002 1004
@@ -1021,6 +1023,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
1021 1023
1022 if (dccp_rcv_state_process(sk, skb, dccp_hdr(skb), skb->len)) 1024 if (dccp_rcv_state_process(sk, skb, dccp_hdr(skb), skb->len))
1023 goto reset; 1025 goto reset;
1026 if (opt_skb) {
1027 /* This is where we would goto ipv6_pktoptions. */
1028 __kfree_skb(opt_skb);
1029 }
1024 return 0; 1030 return 0;
1025 1031
1026reset: 1032reset: