From: Florian Westphal <fw@strlen.de>
To: Nick Jones <nick.jones@network-box.com>
Cc: Florian Westphal <fw@strlen.de>,
netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH next] netfilter: ipv6: add getsockopt to retrieve origdst
Date: Wed, 31 Oct 2012 09:48:15 +0100 [thread overview]
Message-ID: <20121031084815.GA29966@breakpoint.cc> (raw)
In-Reply-To: <1351649498.10780.6947.camel@nbnickhq4>
Nick Jones <nick.jones@network-box.com> wrote:
> > 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.
>
> Doesn't getsockname(2) provide this information?
No. It will show the local address (the address we REDIRECT'ed to).
> It does for TPROXY'd connections.
Yes, because with TPROXY the destination won't be rewritten.
next prev parent reply other threads:[~2012-10-31 8:49 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 [this message]
2012-10-31 12:28 ` Amos Jeffries
2012-11-02 11:36 ` Pablo Neira Ayuso
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=20121031084815.GA29966@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=nick.jones@network-box.com \
/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.