From f9b7af8bc031472e488eb1feaca06cebbfe28e83 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sat, 2 Dec 2006 17:17:33 +0000 Subject: Fix iptables-save not printing -s !0/0 and -d !0/0 as well as ip6tables unnecessarily printing the address. Base on patch by Daniel De Graaf. --- iptables-save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables-save.c') diff --git a/iptables-save.c b/iptables-save.c index 79b5dc7f..ee189182 100644 --- a/iptables-save.c +++ b/iptables-save.c @@ -141,7 +141,7 @@ static int print_match(const struct ipt_entry_match *e, /* print a given ip including mask if neccessary */ static void print_ip(char *prefix, u_int32_t ip, u_int32_t mask, int invert) { - if (!mask && !ip) + if (!mask && !ip && !invert) return; printf("%s %s%u.%u.%u.%u", -- cgit v1.2.3