diff options
author | Frederik Deweerdt <frederik.deweerdt@gmail.com> | 2007-02-04 23:15:27 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-08 15:38:44 -0500 |
commit | ba7808eac17360dda459f82222859b0e3879854b (patch) | |
tree | b9774fb03694e7e019d57c6f0b306cdd1232d4d2 /net/ipv4/tcp_ipv4.c | |
parent | a0d78ebf3a0e33a1aeacf2fc518ad9273d6a1c2f (diff) |
[TCP]: remove tcp header from tcp_v4_check (take #2)
The tcphdr struct passed to tcp_v4_check is not used, the following
patch removes it from the parameter list.
This adds the netfilter modifications missing in the patch I sent
for rc3-mm1.
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 12de90a5047c..f061ec50d8bc 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -502,11 +502,11 @@ void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb) | |||
502 | struct tcphdr *th = skb->h.th; | 502 | struct tcphdr *th = skb->h.th; |
503 | 503 | ||
504 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 504 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
505 | th->check = ~tcp_v4_check(th, len, | 505 | th->check = ~tcp_v4_check(len, inet->saddr, |
506 | inet->saddr, inet->daddr, 0); | 506 | inet->daddr, 0); |
507 | skb->csum_offset = offsetof(struct tcphdr, check); | 507 | skb->csum_offset = offsetof(struct tcphdr, check); |
508 | } else { | 508 | } else { |
509 | th->check = tcp_v4_check(th, len, inet->saddr, inet->daddr, | 509 | th->check = tcp_v4_check(len, inet->saddr, inet->daddr, |
510 | csum_partial((char *)th, | 510 | csum_partial((char *)th, |
511 | th->doff << 2, | 511 | th->doff << 2, |
512 | skb->csum)); | 512 | skb->csum)); |
@@ -525,7 +525,7 @@ int tcp_v4_gso_send_check(struct sk_buff *skb) | |||
525 | th = skb->h.th; | 525 | th = skb->h.th; |
526 | 526 | ||
527 | th->check = 0; | 527 | th->check = 0; |
528 | th->check = ~tcp_v4_check(th, skb->len, iph->saddr, iph->daddr, 0); | 528 | th->check = ~tcp_v4_check(skb->len, iph->saddr, iph->daddr, 0); |
529 | skb->csum_offset = offsetof(struct tcphdr, check); | 529 | skb->csum_offset = offsetof(struct tcphdr, check); |
530 | skb->ip_summed = CHECKSUM_PARTIAL; | 530 | skb->ip_summed = CHECKSUM_PARTIAL; |
531 | return 0; | 531 | return 0; |
@@ -747,7 +747,7 @@ static int tcp_v4_send_synack(struct sock *sk, struct request_sock *req, | |||
747 | if (skb) { | 747 | if (skb) { |
748 | struct tcphdr *th = skb->h.th; | 748 | struct tcphdr *th = skb->h.th; |
749 | 749 | ||
750 | th->check = tcp_v4_check(th, skb->len, | 750 | th->check = tcp_v4_check(skb->len, |
751 | ireq->loc_addr, | 751 | ireq->loc_addr, |
752 | ireq->rmt_addr, | 752 | ireq->rmt_addr, |
753 | csum_partial((char *)th, skb->len, | 753 | csum_partial((char *)th, skb->len, |
@@ -1514,7 +1514,7 @@ static struct sock *tcp_v4_hnd_req(struct sock *sk, struct sk_buff *skb) | |||
1514 | static __sum16 tcp_v4_checksum_init(struct sk_buff *skb) | 1514 | static __sum16 tcp_v4_checksum_init(struct sk_buff *skb) |
1515 | { | 1515 | { |
1516 | if (skb->ip_summed == CHECKSUM_COMPLETE) { | 1516 | if (skb->ip_summed == CHECKSUM_COMPLETE) { |
1517 | if (!tcp_v4_check(skb->h.th, skb->len, skb->nh.iph->saddr, | 1517 | if (!tcp_v4_check(skb->len, skb->nh.iph->saddr, |
1518 | skb->nh.iph->daddr, skb->csum)) { | 1518 | skb->nh.iph->daddr, skb->csum)) { |
1519 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 1519 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
1520 | return 0; | 1520 | return 0; |