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_stp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'extensions/libebt_stp.c') diff --git a/extensions/libebt_stp.c b/extensions/libebt_stp.c index 06cf93b8..33e4c8d9 100644 --- a/extensions/libebt_stp.c +++ b/extensions/libebt_stp.c @@ -307,8 +307,9 @@ static void brstp_print(const void *ip, const struct xt_entry_match *match, for (i = 0; i < STP_NUMOPS; i++) { if (!(stpinfo->bitmask & (1 << i))) continue; - printf("--%s %s", brstp_opts[i].name, - (stpinfo->invflags & (1 << i)) ? "! " : ""); + if (stpinfo->invflags & (1 << i)) + printf("! "); + printf("--%s ", brstp_opts[i].name); if (EBT_STP_TYPE == (1 << i)) { if (stpinfo->type == BPDU_TYPE_CONFIG) printf("%s", BPDU_TYPE_CONFIG_STRING); -- cgit v1.2.3