From: Alexander Alemayhu <alexander@alemayhu.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH iptables] libxtables: fix wrong naddr when using localhost
Date: Wed, 8 Mar 2017 12:10:46 +0100 [thread overview]
Message-ID: <20170308111046.GB5717@gmail.com> (raw)
In-Reply-To: <20170308095532.GA1723@salvia>
On Wed, Mar 08, 2017 at 10:55:32AM +0100, Pablo Neira Ayuso wrote:
>
> This is actually a generic problem:
>
> # iptables -I INPUT -p tcp -s localhost
>
> results in:
>
> # iptables-save
> # Generated by iptables-save v1.6.1 on Wed Mar 8 10:53:07 2017
> *filter
> :INPUT ACCEPT [13:1628]
> :FORWARD ACCEPT [0:0]
> :OUTPUT ACCEPT [4:317]
> -A INPUT -s 127.0.0.1/32 -p tcp
> -A INPUT -s 127.0.0.1/32 -p tcp
> COMMIT
> # Completed on Wed Mar 8 10:53:07 2017
>
What's the right way to fix this? I want to use iptables-translate in a web
application[0] so I can copy and use the translations. Adding the extra line
forces me to manually edit the output.
> Original problem was introduce at:
>
> commit 2d2b5e046aa56a518160716a9ddf9df53fc79c1f
> Author: Arpan Kapoor <rpnkpr@gmail.com>
> Date: Thu Mar 17 18:27:19 2016 +0530
>
> libxtables: Replace gethostbyname() with getaddrinfo()
>
> Did you also run iptables tests? See iptables-test.py, although I
> guess our test infrastructure is not catching up this case.
>
Before and after patch I get:
102 test files, 706 unit tests, 687 passed
Thanks.
[0]: https://2nft.alemayhu.com/
--
Mit freundlichen Grüßen
Alexander Alemayhu
prev parent reply other threads:[~2017-03-08 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 23:28 [PATCH iptables] libxtables: fix wrong naddr when using localhost Alexander Alemayhu
2017-03-08 9:55 ` Pablo Neira Ayuso
2017-03-08 11:10 ` Alexander Alemayhu [this message]
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=20170308111046.GB5717@gmail.com \
--to=alexander@alemayhu.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).