summaryrefslogtreecommitdiffstats
path: root/iptables/xshared.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-11-26 23:56:57 +0100
committerPhil Sutter <phil@nwl.cc>2022-01-12 14:10:25 +0100
commit5c2c2eea2fff3019f04dd85a489f7186b76d24dd (patch)
tree99083bcbaeb28c47a182d0330e8e8c10b9156b70 /iptables/xshared.c
parent9baf3bf0e77dab6ca4b167554ec0e57b65d0af01 (diff)
ip6tables: Use the shared do_parse, too
Same change as with iptables, merely have to set IP6T_F_PROTO flag in ipv6_proto_parse(). Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.c')
-rw-r--r--iptables/xshared.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/iptables/xshared.c b/iptables/xshared.c
index 8d94fcd5..c5a93290 100644
--- a/iptables/xshared.c
+++ b/iptables/xshared.c
@@ -1836,6 +1836,10 @@ void ipv6_proto_parse(struct iptables_command_state *cs,
cs->fw6.ipv6.proto = args->proto;
cs->fw6.ipv6.invflags = args->invflags;
+ /* this is needed for ip6tables-legacy only */
+ args->flags |= IP6T_F_PROTO;
+ cs->fw6.ipv6.flags |= IP6T_F_PROTO;
+
if (is_exthdr(cs->fw6.ipv6.proto)
&& (cs->fw6.ipv6.invflags & XT_INV_PROTO) == 0)
fprintf(stderr,