From: Florian Westphal Date: Tue, 30 Oct 2012 01:08:49 +0000 (+0000) Subject: netfilter: ipv6: add getsockopt to retrieve origdst X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~45^2~305^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=121d1e0941e05c64ee4223064dd83eb24e871739;p=pandora-kernel.git netfilter: ipv6: add getsockopt to retrieve origdst 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. 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. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- Reading git-diff-tree failed