diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-04-09 14:59:39 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:43 -0400 |
commit | 604763722c655c7e3f31ecf6f7b4dafcd26a7a15 (patch) | |
tree | a5c07f0e22ac86e7ca7a8c80bd3f111116610edd /net/ipv4/ipvs | |
parent | 628592ccdbbb5bb751217cf02e2e7abb500d7ffe (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/ipvs')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c index 62cfbed317bf..f005a2f929f4 100644 --- a/net/ipv4/ipvs/ip_vs_core.c +++ b/net/ipv4/ipvs/ip_vs_core.c | |||
@@ -681,8 +681,7 @@ static int ip_vs_out_icmp(struct sk_buff **pskb, int *related) | |||
681 | } | 681 | } |
682 | 682 | ||
683 | /* Ensure the checksum is correct */ | 683 | /* Ensure the checksum is correct */ |
684 | if (skb->ip_summed != CHECKSUM_UNNECESSARY && | 684 | if (!skb_csum_unnecessary(skb) && ip_vs_checksum_complete(skb, ihl)) { |
685 | ip_vs_checksum_complete(skb, ihl)) { | ||
686 | /* Failed checksum! */ | 685 | /* Failed checksum! */ |
687 | IP_VS_DBG(1, "Forward ICMP: failed checksum from %d.%d.%d.%d!\n", | 686 | IP_VS_DBG(1, "Forward ICMP: failed checksum from %d.%d.%d.%d!\n", |
688 | NIPQUAD(iph->saddr)); | 687 | NIPQUAD(iph->saddr)); |
@@ -921,8 +920,7 @@ ip_vs_in_icmp(struct sk_buff **pskb, int *related, unsigned int hooknum) | |||
921 | verdict = NF_DROP; | 920 | verdict = NF_DROP; |
922 | 921 | ||
923 | /* Ensure the checksum is correct */ | 922 | /* Ensure the checksum is correct */ |
924 | if (skb->ip_summed != CHECKSUM_UNNECESSARY && | 923 | if (!skb_csum_unnecessary(skb) && ip_vs_checksum_complete(skb, ihl)) { |
925 | ip_vs_checksum_complete(skb, ihl)) { | ||
926 | /* Failed checksum! */ | 924 | /* Failed checksum! */ |
927 | IP_VS_DBG(1, "Incoming ICMP: failed checksum from %d.%d.%d.%d!\n", | 925 | IP_VS_DBG(1, "Incoming ICMP: failed checksum from %d.%d.%d.%d!\n", |
928 | NIPQUAD(iph->saddr)); | 926 | NIPQUAD(iph->saddr)); |