If a rule has a non-standard target (i.e., cs->target != NULL), it may
contain parameters. This patch enables printing them.
The code assumed that a non-standard target is only present if
cs->jumpto is not set, but that is wrong: If
nft_rule_to_iptables_command_state() encounters a target expression, it
calls nft_parse_target() which in turn calls the family-specific
parse_target callback. All of them assign cs->target, whose name is
later assigned to cs->jumpto by the first function.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
else
printf("CONTINUE");
}
- else if (cs->target != NULL && cs->target->print != NULL)
+ if (cs->target != NULL && cs->target->print != NULL) {
+ printf(" ");
cs->target->print(&cs->fw, cs->target->t, format & FMT_NUMERIC);
+ }
if (!(format & FMT_NOCOUNTS)) {
const char *counter_fmt;