All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove unneeded ip6tables-save source/destination address output
@ 2006-12-02  0:50 Daniel De Graaf
  2006-12-02 16:37 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel De Graaf @ 2006-12-02  0:50 UTC (permalink / raw)
  To: Netfilter-Devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ip6tables-save outputs the source and destination IPs when it is not
needed. This
is caused by an incorrectly copied check from iptables-save. Example
output:
- -A INPUT -s ::/0 -d ::/0 -i lo -j ACCEPT instead of just -A INPUT -i
lo -j ACCEPT

This patch will not output the address if the mask length is zero.

- - Daniel De Graaf

Index: ip6tables-save.c
===================================================================
- --- ip6tables-save.c    (revision 6699)
+++ ip6tables-save.c    (working copy)
@@ -125,7 +125,7 @@
        char buf[51];
        int l = ipv6_prefix_length(mask);
 
- -       if (!mask && !ip)
+       if (l == 0)
                return;
 
        printf("%s %s%s",
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFcM3DZz9quLVV3/MRAuYSAJ9wUCXr8yEiClPeuVfANBISlzBGTACffYHh
dFqNciiAzKuvSTw7pXV2cAA=
=Ssso
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-12-02 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-02  0:50 [PATCH] remove unneeded ip6tables-save source/destination address output Daniel De Graaf
2006-12-02 16:37 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.