aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
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 /include/net
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 'include/net')
-rw-r--r--include/net/tcp.h2
-rw-r--r--include/net/udp.h2
2 files changed, 2 insertions, 2 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)
818 818
819static inline int tcp_checksum_complete(struct sk_buff *skb) 819static inline int tcp_checksum_complete(struct sk_buff *skb)
820{ 820{
821 return skb->ip_summed != CHECKSUM_UNNECESSARY && 821 return !skb_csum_unnecessary(skb) &&
822 __tcp_checksum_complete(skb); 822 __tcp_checksum_complete(skb);
823} 823}
824 824
diff --git a/include/net/udp.h b/include/net/udp.h
index 4906ed7113e7..98755ebaf163 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -77,7 +77,7 @@ static inline __sum16 __udp_lib_checksum_complete(struct sk_buff *skb)
77 77
78static inline int udp_lib_checksum_complete(struct sk_buff *skb) 78static inline int udp_lib_checksum_complete(struct sk_buff *skb)
79{ 79{
80 return skb->ip_summed != CHECKSUM_UNNECESSARY && 80 return !skb_csum_unnecessary(skb) &&
81 __udp_lib_checksum_complete(skb); 81 __udp_lib_checksum_complete(skb);
82} 82}
83 83