snat: ICMP can be port-natted as well
authorSteven Barth <steven@midlink.org>
Thu, 10 Apr 2014 20:39:42 +0000 (22:39 +0200)
committerSteven Barth <steven@midlink.org>
Mon, 14 Apr 2014 06:47:07 +0000 (08:47 +0200)
Signed-off-by: Steven Barth <steven@midlink.org>
snats.c

diff --git a/snats.c b/snats.c
index 11bcc068390661e0cc68f0324abbc5de4e928267..ad0c9b0e69c5ce5fbf6fc724c1c3b3ce155dde97 100644 (file)
--- a/snats.c
+++ b/snats.c
@@ -247,7 +247,7 @@ set_target(struct fw3_ipt_rule *r, struct fw3_snat *snat,
                }
 
                if (snat->port_snat.set && proto && !proto->any &&
-                   (proto->protocol == 6 || proto->protocol == 17))
+                   (proto->protocol == 6 || proto->protocol == 17 || proto->protocol == 1))
                {
                        if (snat->port_snat.port_min == snat->port_snat.port_max)
                                sprintf(buf + strlen(buf), ":%u", snat->port_snat.port_min);