aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-04-09 14:59:39 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:43 -0400
commit604763722c655c7e3f31ecf6f7b4dafcd26a7a15 (patch)
treea5c07f0e22ac86e7ca7a8c80bd3f111116610edd /net/ipv4/tcp_ipv4.c
parent628592ccdbbb5bb751217cf02e2e7abb500d7ffe (diff)
[NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY
When a transmitted packet is looped back directly, CHECKSUM_PARTIAL maps to the semantics of CHECKSUM_UNNECESSARY. Therefore we should treat it as such in the stack. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index a091a99ad263..5a3e7f839fc5 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1638,8 +1638,7 @@ int tcp_v4_rcv(struct sk_buff *skb)
1638 * Packet length and doff are validated by header prediction, 1638 * Packet length and doff are validated by header prediction,
1639 * provided case of th->doff==0 is eliminated. 1639 * provided case of th->doff==0 is eliminated.
1640 * So, we defer the checks. */ 1640 * So, we defer the checks. */
1641 if ((skb->ip_summed != CHECKSUM_UNNECESSARY && 1641 if (!skb_csum_unnecessary(skb) && tcp_v4_checksum_init(skb))
1642 tcp_v4_checksum_init(skb)))
1643 goto bad_packet; 1642 goto bad_packet;
1644 1643
1645 th = tcp_hdr(skb); 1644 th = tcp_hdr(skb);