diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 13 | 
1 files changed, 7 insertions, 6 deletions
| diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 6bb98c93edfe..7178476b3d2f 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -994,7 +994,7 @@ static void tcp_v6_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb,  			req->rsk_rcv_wnd >> inet_rsk(req)->rcv_wscale,  			tcp_time_stamp_raw() + tcp_rsk(req)->ts_off,  			req->ts_recent, sk->sk_bound_dev_if, -			tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->daddr), +			tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->saddr),  			0, 0);  } @@ -1454,7 +1454,6 @@ process:  		struct sock *nsk;  		sk = req->rsk_listener; -		tcp_v6_fill_cb(skb, hdr, th);  		if (tcp_v6_inbound_md5_hash(sk, skb)) {  			sk_drops_add(sk, skb);  			reqsk_put(req); @@ -1467,8 +1466,12 @@ process:  		sock_hold(sk);  		refcounted = true;  		nsk = NULL; -		if (!tcp_filter(sk, skb)) +		if (!tcp_filter(sk, skb)) { +			th = (const struct tcphdr *)skb->data; +			hdr = ipv6_hdr(skb); +			tcp_v6_fill_cb(skb, hdr, th);  			nsk = tcp_check_req(sk, skb, req, false); +		}  		if (!nsk) {  			reqsk_put(req);  			goto discard_and_relse; @@ -1492,8 +1495,6 @@ process:  	if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))  		goto discard_and_relse; -	tcp_v6_fill_cb(skb, hdr, th); -  	if (tcp_v6_inbound_md5_hash(sk, skb))  		goto discard_and_relse; @@ -1501,6 +1502,7 @@ process:  		goto discard_and_relse;  	th = (const struct tcphdr *)skb->data;  	hdr = ipv6_hdr(skb); +	tcp_v6_fill_cb(skb, hdr, th);  	skb->dev = NULL; @@ -1590,7 +1592,6 @@ do_time_wait:  		tcp_v6_timewait_ack(sk, skb);  		break;  	case TCP_TW_RST: -		tcp_v6_restore_cb(skb);  		tcp_v6_send_reset(sk, skb);  		inet_twsk_deschedule_put(inet_twsk(sk));  		goto discard_it; |