summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich2021-03-31 19:55:08 +0000
committerJo-Philipp Wich2021-03-31 19:55:08 +0000
commit6bf82a8aa53bc59b6bf1efbe1babf6a9b5022cc2 (patch)
tree783a675cb848edc1fbf4589b6437039467774312
parent25b2c7d019aad51bf9073736b3cba444a674e8bd (diff)
downloadfirewall4-6bf82a8aa53bc59b6bf1efbe1babf6a9b5022cc2.tar.gz
fw4.uc: fix family test functions
Rewrite the family test functions as arrow functions since ucode HEAD does implicitly return the last function value expression as result anymore for ordinary functions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--root/usr/share/ucode/fw4.uc6
1 files changed, 3 insertions, 3 deletions
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc
index c8396fa..b120ed4 100644
--- a/root/usr/share/ucode/fw4.uc
+++ b/root/usr/share/ucode/fw4.uc
@@ -253,9 +253,9 @@ function ensure_tcpudp(x) {
return false;
}
-function is_family(x, v) { x.family == 0 || x.family == v }
-function family_is_ipv4(x) { x.family == 0 || x.family == 4 }
-function family_is_ipv6(x) { x.family == 0 || x.family == 6 }
+let is_family = (x, v) => (x.family == 0 || x.family == v);
+let family_is_ipv4 = (x) => (x.family == 0 || x.family == 4);
+let family_is_ipv6 = (x) => (x.family == 0 || x.family == 6);
function infer_family(f, objects) {
let res = f;