From 7af21782bb6fc3480909120c20a55164248a9608 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 3 May 2018 21:45:59 +0200 Subject: xtables-compat: fall back to comment match in case name is too long ... or when using multiple --comment lines. This is more of a 'cosmetic' fix to handle the test suite case. Signed-off-by: Florian Westphal --- iptables/nft-ipv6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'iptables/nft-ipv6.c') diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index af525422..33f77ebf 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -67,8 +67,9 @@ static int nft_ipv6_add(struct nftnl_rule *r, void *data) if (strcmp(matchp->match->name, "comment") == 0) { ret = add_comment(r, (char *)matchp->match->m->data); if (ret < 0) - return ret; + goto try_match; } else { +try_match: ret = add_match(r, matchp->match->m); if (ret < 0) return ret; -- cgit v1.2.3