diff options
| author | John W. Linville <linville@tuxdriver.com> | 2006-07-27 14:27:06 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2006-07-27 14:27:06 -0400 |
| commit | 20f99dcf417a28089ef6c877ae97f5dec2eab435 (patch) | |
| tree | b4fe1f3e429d6a82ddaaa8e12899da630cfa8a63 /net/ipv6/tcp_ipv6.c | |
| parent | dd2f5538a157bda68bfa8efb39feaaccdda9e74e (diff) | |
| parent | 64821324ca49f24be1a66f2f432108f96a24e596 (diff) | |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 5bdcb9002cf7..923989d0520d 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
| @@ -552,6 +552,24 @@ static void tcp_v6_send_check(struct sock *sk, int len, struct sk_buff *skb) | |||
| 552 | } | 552 | } |
| 553 | } | 553 | } |
| 554 | 554 | ||
| 555 | static int tcp_v6_gso_send_check(struct sk_buff *skb) | ||
| 556 | { | ||
| 557 | struct ipv6hdr *ipv6h; | ||
| 558 | struct tcphdr *th; | ||
| 559 | |||
| 560 | if (!pskb_may_pull(skb, sizeof(*th))) | ||
| 561 | return -EINVAL; | ||
| 562 | |||
| 563 | ipv6h = skb->nh.ipv6h; | ||
| 564 | th = skb->h.th; | ||
| 565 | |||
| 566 | th->check = 0; | ||
| 567 | th->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, skb->len, | ||
| 568 | IPPROTO_TCP, 0); | ||
| 569 | skb->csum = offsetof(struct tcphdr, check); | ||
| 570 | skb->ip_summed = CHECKSUM_HW; | ||
| 571 | return 0; | ||
| 572 | } | ||
| 555 | 573 | ||
| 556 | static void tcp_v6_send_reset(struct sk_buff *skb) | 574 | static void tcp_v6_send_reset(struct sk_buff *skb) |
| 557 | { | 575 | { |
| @@ -1603,6 +1621,7 @@ struct proto tcpv6_prot = { | |||
| 1603 | static struct inet6_protocol tcpv6_protocol = { | 1621 | static struct inet6_protocol tcpv6_protocol = { |
| 1604 | .handler = tcp_v6_rcv, | 1622 | .handler = tcp_v6_rcv, |
| 1605 | .err_handler = tcp_v6_err, | 1623 | .err_handler = tcp_v6_err, |
| 1624 | .gso_send_check = tcp_v6_gso_send_check, | ||
| 1606 | .gso_segment = tcp_tso_segment, | 1625 | .gso_segment = tcp_tso_segment, |
| 1607 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, | 1626 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, |
| 1608 | }; | 1627 | }; |
