Last active
August 12, 2024 01:42
-
-
Save levid0s/b74a24d3fd586741abc46f48ae9e1cd0 to your computer and use it in GitHub Desktop.
OpenWRT IPSets allow in-line comments Patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd / | |
patch -p1 < /root/parse_ipsetentry.patch | |
ACTION=reload-sets utpl -S /usr/share/firewall4/main.uc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/share/ucode/fw4.uc 02:24:26.459445315 +0100 | |
+++ /usr/share/ucode/fw4.uc 02:10:15.857472398 +0100 | |
@@ -1489,6 +1489,7 @@ | |
}, | |
parse_ipsetentry: function(val, set) { | |
+ val = trim(split(val, "#")[0]); | |
let values = split(val, /[ \t]+/); | |
if (length(values) != length(set.types)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment