From: Daniel De Graaf <danield@iastate.edu>
To: Netfilter-Devel <netfilter-devel@lists.netfilter.org>
Subject: [PATCH] remove unneeded ip6tables-save source/destination address output
Date: Fri, 01 Dec 2006 18:50:12 -0600 [thread overview]
Message-ID: <4570CDC4.2090205@iastate.edu> (raw)
-----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-----
next reply other threads:[~2006-12-02 0:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-02 0:50 Daniel De Graaf [this message]
2006-12-02 16:37 ` [PATCH] remove unneeded ip6tables-save source/destination address output Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4570CDC4.2090205@iastate.edu \
--to=danield@iastate.edu \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.