From 5f508b76a0cebaf91965ffa678089222e2d47964 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Mon, 12 Nov 2018 12:49:11 +0100 Subject: ebtables: use extrapositioned negation consistently in the iptables universe, we enforce extrapositioned negation: ! -i foo "-i ! foo" is not even supported anymore. At least make sure that ebtables prints the former syntax everywhere as well so we don't have a mix of both ways. Parsing of --option ! 42 will still work for backwards compat reasons. Signed-off-by: Florian Westphal --- extensions/libebt_pkttype.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'extensions/libebt_pkttype.c') diff --git a/extensions/libebt_pkttype.c b/extensions/libebt_pkttype.c index 4e2d19de..265674d1 100644 --- a/extensions/libebt_pkttype.c +++ b/extensions/libebt_pkttype.c @@ -75,7 +75,10 @@ static void brpkttype_print(const void *ip, const struct xt_entry_match *match, { struct ebt_pkttype_info *pt = (struct ebt_pkttype_info *)match->data; - printf("--pkttype-type %s", pt->invert ? "! " : ""); + if (pt->invert) + printf("! "); + + printf("--pkttype-type "); if (pt->pkt_type < ARRAY_SIZE(classes)) printf("%s ", classes[pt->pkt_type]); -- cgit v1.2.3