From 6f8d64f4229be58814319003a397b971ca9b4e1b Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Wed, 30 Sep 2020 16:02:46 -0700 Subject: ip6tables: redirect support Adds support for the IPv6-compatible redirect target. Redirection is a limited form of DNAT, where the destination is always the localhost. Updates #3549. PiperOrigin-RevId: 334698344 --- pkg/abi/linux/netfilter_ipv6.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pkg/abi/linux') diff --git a/pkg/abi/linux/netfilter_ipv6.go b/pkg/abi/linux/netfilter_ipv6.go index a137940b6..6d31eb5e3 100644 --- a/pkg/abi/linux/netfilter_ipv6.go +++ b/pkg/abi/linux/netfilter_ipv6.go @@ -321,3 +321,16 @@ const ( // Enable all flags. IP6T_INV_MASK = 0x7F ) + +// NFNATRange corresponds to struct nf_nat_range in +// include/uapi/linux/netfilter/nf_nat.h. +type NFNATRange struct { + Flags uint32 + MinAddr Inet6Addr + MaxAddr Inet6Addr + MinProto uint16 // Network byte order. + MaxProto uint16 // Network byte order. +} + +// SizeOfNFNATRange is the size of NFNATRange. +const SizeOfNFNATRange = 40 -- cgit v1.2.3