[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>
This commit is contained in:

committed by
David S. Miller

parent
628592ccdb
commit
604763722c
@@ -681,8 +681,7 @@ static int ip_vs_out_icmp(struct sk_buff **pskb, int *related)
|
||||
}
|
||||
|
||||
/* Ensure the checksum is correct */
|
||||
if (skb->ip_summed != CHECKSUM_UNNECESSARY &&
|
||||
ip_vs_checksum_complete(skb, ihl)) {
|
||||
if (!skb_csum_unnecessary(skb) && ip_vs_checksum_complete(skb, ihl)) {
|
||||
/* Failed checksum! */
|
||||
IP_VS_DBG(1, "Forward ICMP: failed checksum from %d.%d.%d.%d!\n",
|
||||
NIPQUAD(iph->saddr));
|
||||
@@ -921,8 +920,7 @@ ip_vs_in_icmp(struct sk_buff **pskb, int *related, unsigned int hooknum)
|
||||
verdict = NF_DROP;
|
||||
|
||||
/* Ensure the checksum is correct */
|
||||
if (skb->ip_summed != CHECKSUM_UNNECESSARY &&
|
||||
ip_vs_checksum_complete(skb, ihl)) {
|
||||
if (!skb_csum_unnecessary(skb) && ip_vs_checksum_complete(skb, ihl)) {
|
||||
/* Failed checksum! */
|
||||
IP_VS_DBG(1, "Incoming ICMP: failed checksum from %d.%d.%d.%d!\n",
|
||||
NIPQUAD(iph->saddr));
|
||||
|
Reference in New Issue
Block a user