Re: [PATCH next] netfilter: ipv6: add getsockopt to retrieve origdst

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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".
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux