Skip to content

Commit

Permalink
test(functions): fix iptables normalization for opt field
Browse files Browse the repository at this point in the history
The sed expression didn't consume multiple spaces. All of the
normalization nuances are stacking. :(

@@ -3,5 +3,5 @@
 IN_public_deny 0 -- ::/0 ::/0
 IN_public_allow 0 -- ::/0 ::/0
 IN_public_post 0 -- ::/0 ::/0
-ACCEPT 58 -- ::/0 ::/0
+ACCEPT 58 -- -- ::/0 ::/0

Fixes: 9a11ab1 ("test(functions): ip6tables: normalize opt field output")
(cherry picked from commit e3f44a7)
  • Loading branch information
erig0 committed Jul 11, 2024
1 parent 532804d commit 816f8d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tests/functions.at
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ m4_define([IPXTABLES_LIST_RULES_NORMALIZE], [dnl
dnl commit 6e41c2d8747b ("iptables: xshared: Output '--' in the opt field
dnl in ipv6's fake mode") added "--" to the output of ip6tables. This regex
dnl adds the "--" for older ip6tables versions.
-e ['s/^\([-a-zA-Z0-9_]\+\)[ ]\([^ ]*\)[ ][-]\?[-]\?[ ]\?/\1 \2 -- /g'] dnl
-e ['s/^\([-a-zA-Z0-9_]\+\)[ ]\+\([^ ]*\)[ ]\+[-]\?[-]\?[ ]\?/\1 \2 -- /g'] dnl
])

m4_define([IPTABLES_LIST_RULES_NORMALIZE], [dnl
Expand Down

0 comments on commit 816f8d1

Please sign in to comment.