aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.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/udp.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/udp.c')
-rw-r--r--net/ipv4/udp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 5ad7a26e309..cec0f2cc49b 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -848,7 +848,7 @@ try_again:
848 goto csum_copy_err; 848 goto csum_copy_err;
849 } 849 }
850 850
851 if (skb->ip_summed == CHECKSUM_UNNECESSARY) 851 if (skb_csum_unnecessary(skb))
852 err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr), 852 err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr),
853 msg->msg_iov, copied ); 853 msg->msg_iov, copied );
854 else { 854 else {
@@ -1190,7 +1190,7 @@ static inline int udp4_csum_init(struct sk_buff *skb, struct udphdr *uh,
1190 proto, skb->csum)) 1190 proto, skb->csum))
1191 skb->ip_summed = CHECKSUM_UNNECESSARY; 1191 skb->ip_summed = CHECKSUM_UNNECESSARY;
1192 } 1192 }
1193 if (skb->ip_summed != CHECKSUM_UNNECESSARY) 1193 if (!skb_csum_unnecessary(skb))
1194 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, 1194 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
1195 skb->len, proto, 0); 1195 skb->len, proto, 0);
1196 /* Probably, we should checksum udp header (it should be in cache 1196 /* Probably, we should checksum udp header (it should be in cache