unix: add SO_ORIGINAL_DST on linux Change-Id: I243a05696e061f0f0e558518c8af596364aa3668 Reviewed-on: https://go-review.googlesource.com/c/sys/+/331609 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/unix/linux/types.go b/unix/linux/types.go index c400c03..41081f2 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go
@@ -115,6 +115,7 @@ #include <linux/netfilter/nf_tables_compat.h> #include <linux/netfilter/nfnetlink.h> #include <linux/netfilter.h> +#include <linux/netfilter_ipv4.h> #include <linux/netlink.h> #include <linux/nexthop.h> #include <linux/nfc.h> @@ -1767,6 +1768,8 @@ NFPROTO_NUMPROTO = C.NFPROTO_NUMPROTO ) +const SO_ORIGINAL_DST = C.SO_ORIGINAL_DST + // netfilter nfnetlink type Nfgenmsg C.struct_nfgenmsg
diff --git a/unix/ztypes_linux.go b/unix/ztypes_linux.go index 72887ab..c9d7eb4 100644 --- a/unix/ztypes_linux.go +++ b/unix/ztypes_linux.go
@@ -1773,6 +1773,8 @@ NFPROTO_NUMPROTO = 0xd ) +const SO_ORIGINAL_DST = 0x50 + type Nfgenmsg struct { Nfgen_family uint8 Version uint8