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

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

 



On 31/10/2012 9:48 p.m., Florian Westphal wrote:
Nick Jones <nick.jones@xxxxxxxxxxxxxxx> 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
--
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