]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/netfilter/nf_nat_proto.c
Merge branch 'linux-5.6' of git://github.com/skeggsb/linux into drm-next
[linux.git] / net / netfilter / nf_nat_proto.c
index 0a59c14b5177645f3bbfd847dc5db3500e3b1961..64eedc17037ad783d3a99851038e91394465617e 100644 (file)
@@ -233,6 +233,19 @@ icmp_manip_pkt(struct sk_buff *skb,
                return false;
 
        hdr = (struct icmphdr *)(skb->data + hdroff);
+       switch (hdr->type) {
+       case ICMP_ECHO:
+       case ICMP_ECHOREPLY:
+       case ICMP_TIMESTAMP:
+       case ICMP_TIMESTAMPREPLY:
+       case ICMP_INFO_REQUEST:
+       case ICMP_INFO_REPLY:
+       case ICMP_ADDRESS:
+       case ICMP_ADDRESSREPLY:
+               break;
+       default:
+               return true;
+       }
        inet_proto_csum_replace2(&hdr->checksum, skb,
                                 hdr->un.echo.id, tuple->src.u.icmp.id, false);
        hdr->un.echo.id = tuple->src.u.icmp.id;