From 7dc0b73dc9fb94da7882503588aa038197e94795 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 29 Jun 2021 15:48:09 +0200 Subject: [PATCH] unix: add SO_ORIGINAL_DST on linux Change-Id: I243a05696e061f0f0e558518c8af596364aa3668 Reviewed-on: https://go-review.googlesource.com/c/sys/+/331609 Trust: Tobias Klauser Run-TryBot: Tobias Klauser TryBot-Result: Go Bot Reviewed-by: Matt Layher Reviewed-by: Ian Lance Taylor --- unix/linux/types.go | 3 +++ unix/ztypes_linux.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/unix/linux/types.go b/unix/linux/types.go index c400c031..41081f2d 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -115,6 +115,7 @@ struct termios2 { #include #include #include +#include #include #include #include @@ -1767,6 +1768,8 @@ const ( 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 72887abe..c9d7eb41 100644 --- a/unix/ztypes_linux.go +++ b/unix/ztypes_linux.go @@ -1773,6 +1773,8 @@ const ( NFPROTO_NUMPROTO = 0xd ) +const SO_ORIGINAL_DST = 0x50 + type Nfgenmsg struct { Nfgen_family uint8 Version uint8