[PATCH firewall4 2/2] fw4.uc: Do not quote port ranges
Thomas Weißschuh
thomas at t-8ch.de
Sun Oct 24 01:59:57 PDT 2021
This fixes the translation of rules like the following:
config rule
...
option dest_port '67:68'
Signed-off-by: Thomas Weißschuh <thomas at t-8ch.de>
---
root/usr/share/ucode/fw4.uc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc
index f0e180d..c07b355 100644
--- a/root/usr/share/ucode/fw4.uc
+++ b/root/usr/share/ucode/fw4.uc
@@ -1374,7 +1374,7 @@ return {
},
quote: function(s, force) {
- if (force === true || !match(s, /^([0-9A-Fa-f:.\/]+)( \. [0-9A-Fa-f:.\/]+)*$/))
+ if (force === true || !match(s, /^([0-9A-Fa-f:.\/-]+)( \. [0-9A-Fa-f:.\/-]+)*$/))
return sprintf('"%s"', replace(s + "", /(["\\])/g, '\\$1'));
return s;
--
2.33.1
More information about the openwrt-devel
mailing list