From cea9f71f5618250a38acb21c31fbbf93a752f7d4 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 9 Dec 2008 15:06:20 +0100 Subject: iptables-save: output ! in position according to manpage Signed-off-by: Jan Engelhardt Signed-off-by: Patrick McHardy --- extensions/libxt_multiport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extensions/libxt_multiport.c') diff --git a/extensions/libxt_multiport.c b/extensions/libxt_multiport.c index 2552bbd8..dae6e335 100644 --- a/extensions/libxt_multiport.c +++ b/extensions/libxt_multiport.c @@ -464,6 +464,9 @@ static void __multiport_save_v1(const struct xt_entry_match *match, = (const struct xt_multiport_v1 *)match->data; unsigned int i; + if (multiinfo->invert) + printf("! "); + switch (multiinfo->flags) { case XT_MULTIPORT_SOURCE: printf("--sports "); @@ -478,9 +481,6 @@ static void __multiport_save_v1(const struct xt_entry_match *match, break; } - if (multiinfo->invert) - printf("! "); - for (i=0; i < multiinfo->count; i++) { printf("%s", i ? "," : ""); print_port(multiinfo->ports[i], proto, 1); -- cgit v1.2.3