Explorar o código

act_nat: the checksum of ICMP doesn't have pseudo header

after updating the value of the ICMP payload, inet_proto_csum_replace4() should
be called with zero pseudohdr.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao %!s(int64=15) %!d(string=hai) anos
pai
achega
3a3dfb062c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      net/sched/act_nat.c

+ 1 - 1
net/sched/act_nat.c

@@ -247,7 +247,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
 			iph->saddr = new_addr;
 			iph->saddr = new_addr;
 
 
 		inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
 		inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
-					 1);
+					 0);
 		break;
 		break;
 	}
 	}
 	default:
 	default: