diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index be11dc13aa70..1f04ec0e4a7a 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1454,7 +1454,6 @@ process: | |||
1454 | struct sock *nsk; | 1454 | struct sock *nsk; |
1455 | 1455 | ||
1456 | sk = req->rsk_listener; | 1456 | sk = req->rsk_listener; |
1457 | tcp_v6_fill_cb(skb, hdr, th); | ||
1458 | if (tcp_v6_inbound_md5_hash(sk, skb)) { | 1457 | if (tcp_v6_inbound_md5_hash(sk, skb)) { |
1459 | sk_drops_add(sk, skb); | 1458 | sk_drops_add(sk, skb); |
1460 | reqsk_put(req); | 1459 | reqsk_put(req); |
@@ -1467,8 +1466,12 @@ process: | |||
1467 | sock_hold(sk); | 1466 | sock_hold(sk); |
1468 | refcounted = true; | 1467 | refcounted = true; |
1469 | nsk = NULL; | 1468 | nsk = NULL; |
1470 | if (!tcp_filter(sk, skb)) | 1469 | if (!tcp_filter(sk, skb)) { |
1470 | th = (const struct tcphdr *)skb->data; | ||
1471 | hdr = ipv6_hdr(skb); | ||
1472 | tcp_v6_fill_cb(skb, hdr, th); | ||
1471 | nsk = tcp_check_req(sk, skb, req, false); | 1473 | nsk = tcp_check_req(sk, skb, req, false); |
1474 | } | ||
1472 | if (!nsk) { | 1475 | if (!nsk) { |
1473 | reqsk_put(req); | 1476 | reqsk_put(req); |
1474 | goto discard_and_relse; | 1477 | goto discard_and_relse; |
@@ -1492,8 +1495,6 @@ process: | |||
1492 | if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) | 1495 | if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) |
1493 | goto discard_and_relse; | 1496 | goto discard_and_relse; |
1494 | 1497 | ||
1495 | tcp_v6_fill_cb(skb, hdr, th); | ||
1496 | |||
1497 | if (tcp_v6_inbound_md5_hash(sk, skb)) | 1498 | if (tcp_v6_inbound_md5_hash(sk, skb)) |
1498 | goto discard_and_relse; | 1499 | goto discard_and_relse; |
1499 | 1500 | ||
@@ -1501,6 +1502,7 @@ process: | |||
1501 | goto discard_and_relse; | 1502 | goto discard_and_relse; |
1502 | th = (const struct tcphdr *)skb->data; | 1503 | th = (const struct tcphdr *)skb->data; |
1503 | hdr = ipv6_hdr(skb); | 1504 | hdr = ipv6_hdr(skb); |
1505 | tcp_v6_fill_cb(skb, hdr, th); | ||
1504 | 1506 | ||
1505 | skb->dev = NULL; | 1507 | skb->dev = NULL; |
1506 | 1508 | ||