[OpenWrt-Devel] firewall3: fix typo that affects ICMPv6 rules with numeric icmp_type
diff mbox series

Message ID 1568124913-1173-1-git-send-email-alin.nastac@technicolor.com
State Accepted
Headers show
Series
  • [OpenWrt-Devel] firewall3: fix typo that affects ICMPv6 rules with numeric icmp_type
Related show

Commit Message

Alin Nastac Sept. 10, 2019, 2:15 p.m. UTC
From: Alin Nastac <alin.nastac@gmail.com>

Problem can be reproduced with a rule like this:
   option src 'wan'
   option family 'ipv6'
   option proto 'icmp'
   option icmp_type '128'
   option target 'DROP'
The resulted rule will set --icmpv6-type to 128/255.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
---
 options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/options.c b/options.c
index c763d9e..7870143 100644
--- a/options.c
+++ b/options.c
@@ -568,7 +568,7 @@  fw3_parse_icmptype(void *ptr, const char *val, bool is_list)
 		}
 
 		icmp.type6     = icmp.type;
-		icmp.code6_min = icmp.code_max;
+		icmp.code6_min = icmp.code_min;
 		icmp.code6_max = icmp.code_max;
 
 		v4 = true;