diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index c4efaa97280c..79e33e02f11a 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1369,9 +1369,9 @@ static int tcp_v6_rcv(struct sk_buff *skb) | |||
1369 | if (!pskb_may_pull(skb, sizeof(struct tcphdr))) | 1369 | if (!pskb_may_pull(skb, sizeof(struct tcphdr))) |
1370 | goto discard_it; | 1370 | goto discard_it; |
1371 | 1371 | ||
1372 | th = tcp_hdr(skb); | 1372 | th = (const struct tcphdr *)skb->data; |
1373 | 1373 | ||
1374 | if (th->doff < sizeof(struct tcphdr)/4) | 1374 | if (unlikely(th->doff < sizeof(struct tcphdr)/4)) |
1375 | goto bad_packet; | 1375 | goto bad_packet; |
1376 | if (!pskb_may_pull(skb, th->doff*4)) | 1376 | if (!pskb_may_pull(skb, th->doff*4)) |
1377 | goto discard_it; | 1377 | goto discard_it; |
@@ -1379,7 +1379,7 @@ static int tcp_v6_rcv(struct sk_buff *skb) | |||
1379 | if (skb_checksum_init(skb, IPPROTO_TCP, ip6_compute_pseudo)) | 1379 | if (skb_checksum_init(skb, IPPROTO_TCP, ip6_compute_pseudo)) |
1380 | goto csum_error; | 1380 | goto csum_error; |
1381 | 1381 | ||
1382 | th = tcp_hdr(skb); | 1382 | th = (const struct tcphdr *)skb->data; |
1383 | hdr = ipv6_hdr(skb); | 1383 | hdr = ipv6_hdr(skb); |
1384 | 1384 | ||
1385 | lookup: | 1385 | lookup: |