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/libip6t_hl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'extensions/libip6t_hl.c') diff --git a/extensions/libip6t_hl.c b/extensions/libip6t_hl.c index f683dc73..77275812 100644 --- a/extensions/libip6t_hl.c +++ b/extensions/libip6t_hl.c @@ -104,16 +104,16 @@ static void hl_print(const void *ip, const struct xt_entry_match *match, static void hl_save(const void *ip, const struct xt_entry_match *match) { - static const char *op[] = { - [IP6T_HL_EQ] = "eq", - [IP6T_HL_NE] = "eq !", - [IP6T_HL_LT] = "lt", - [IP6T_HL_GT] = "gt" }; + static const char *const op[] = { + [IP6T_HL_EQ] = "--hl-eq", + [IP6T_HL_NE] = "! --hl-eq", + [IP6T_HL_LT] = "--hl-lt", + [IP6T_HL_GT] = "--hl-gt" }; const struct ip6t_hl_info *info = (struct ip6t_hl_info *) match->data; - printf("--hl-%s %u ", op[info->mode], info->hop_limit); + printf("%s %u ", op[info->mode], info->hop_limit); } static const struct option hl_opts[] = { -- cgit v1.2.3