From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH next] netfilter: ipv6: add getsockopt to retrieve origdst
Date: Fri, 2 Nov 2012 12:36:46 +0100 [thread overview]
Message-ID: <20121102113646.GA27088@1984> (raw)
In-Reply-To: <1351595329-13081-1-git-send-email-fw@strlen.de>
On Tue, Oct 30, 2012 at 12:08:49PM +0100, Florian Westphal wrote:
> userspace can query the original ipv4 destination address of a REDIRECTed
> connection via
> getsockopt(m_sock, SOL_IP, SO_ORIGINAL_DST, &m_server_addr, &addrsize)
>
> but for ipv6 no such option existed.
>
> This adds getsockopt(..., IPPROTO_IPV6, IP6T_SO_ORIGINAL_DST, ...).
>
> Without this, userspace needs to parse /proc or use ctnetlink, which
> appears to be overkill.
Applied, thanks Florian.
> ---
> Instead of adding new IP6T_SO_ORIGINAL_DST, we could also
> simply re-use existing SO_ORIGINAL_DST ipv4 define. Any Preferences?
I've added this to the patch description, for the record:
"This uses option number 80 for IP6T_SO_ORIGINAL_DST, which is spare,
to use the same number we use in the IPv4 socket option
SO_ORIGINAL_DST".
prev parent reply other threads:[~2012-11-02 11:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 11:08 [PATCH next] netfilter: ipv6: add getsockopt to retrieve origdst Florian Westphal
2012-10-31 2:11 ` Nick Jones
2012-10-31 8:48 ` Florian Westphal
2012-10-31 12:28 ` Amos Jeffries
2012-11-02 11:36 ` Pablo Neira Ayuso [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=20121102113646.GA27088@1984 \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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.