summaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorHerbert Xu2007-04-09 20:59:39 +0200
committerDavid S. Miller2007-04-26 07:28:43 +0200
commit604763722c655c7e3f31ecf6f7b4dafcd26a7a15 (patch)
treea5c07f0e22ac86e7ca7a8c80bd3f111116610edd /include/net/tcp.h
parent[NETDRV]: Perform missing csum_offset conversions (diff)
downloadkernel-qcow2-linux-604763722c655c7e3f31ecf6f7b4dafcd26a7a15.tar.gz
kernel-qcow2-linux-604763722c655c7e3f31ecf6f7b4dafcd26a7a15.tar.xz
kernel-qcow2-linux-604763722c655c7e3f31ecf6f7b4dafcd26a7a15.zip
[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 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index af9273204cfd..07f724e02f84 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -818,7 +818,7 @@ static inline __sum16 __tcp_checksum_complete(struct sk_buff *skb)
static inline int tcp_checksum_complete(struct sk_buff *skb)
{
- return skb->ip_summed != CHECKSUM_UNNECESSARY &&
+ return !skb_csum_unnecessary(skb) &&
__tcp_checksum_complete(skb);
}