aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/in6.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2012-10-30 01:08:49 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2012-11-02 12:26:32 +0100
commit121d1e0941e05c64ee4223064dd83eb24e871739 (patch)
treea5b841774451210d2d53db14b7cd907cd47f12d4 /include/uapi/linux/in6.h
parentnetfilter: nf_nat: use PTR_RET (diff)
downloadlinux-dev-121d1e0941e05c64ee4223064dd83eb24e871739.tar.xz
linux-dev-121d1e0941e05c64ee4223064dd83eb24e871739.zip
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 <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/uapi/linux/in6.h')
-rw-r--r--include/uapi/linux/in6.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h
index 1e3159989958..f79c3721da6e 100644
--- a/include/uapi/linux/in6.h
+++ b/include/uapi/linux/in6.h
@@ -240,6 +240,7 @@ struct in6_flowlabel_req {
*
* IP6T_SO_GET_REVISION_MATCH 68
* IP6T_SO_GET_REVISION_TARGET 69
+ * IP6T_SO_ORIGINAL_DST 80
*/
/* RFC5014: Source address selection */