All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amos Jeffries <squid3@treenet.co.nz>
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: Thu, 01 Nov 2012 01:28:35 +1300	[thread overview]
Message-ID: <50911973.2010301@treenet.co.nz> (raw)
In-Reply-To: <20121031084815.GA29966@breakpoint.cc>

On 31/10/2012 9:48 p.m., Florian Westphal wrote:
> 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).


 From the user perspective I don't see why a new code macro is 
necessary. Surely it would be sufficient to support:

   getsockopt(..., IPPROTO_IPV6, SO_ORIGINAL_DST, ...).


AYJ

  reply	other threads:[~2012-10-31 12:39 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 [this message]
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=50911973.2010301@treenet.co.nz \
    --to=squid3@treenet.co.nz \
    --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.