summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/tcpip.go
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2020-12-09 14:54:43 -0800
committerShentubot <shentubot@google.com>2020-12-09 15:58:53 -0800
commit92ca72ecb73d91e9def31e7f9835adf7a50b3d65 (patch)
tree9884c48ff9039c0ff2ae249fedaa2633e9fa5032 /pkg/tcpip/tcpip.go
parentb4af9d4572707718514e66b7e537bc51216b60f6 (diff)
Add support for IP_RECVORIGDSTADDR IP option.
Fixes #5004 PiperOrigin-RevId: 346643745
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r--pkg/tcpip/tcpip.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go
index 23e597365..0d2dad881 100644
--- a/pkg/tcpip/tcpip.go
+++ b/pkg/tcpip/tcpip.go
@@ -492,6 +492,14 @@ type ControlMessages struct {
// PacketInfo holds interface and address data on an incoming packet.
PacketInfo IPPacketInfo
+
+ // HasOriginalDestinationAddress indicates whether OriginalDstAddress is
+ // set.
+ HasOriginalDstAddress bool
+
+ // OriginalDestinationAddress holds the original destination address
+ // and port of the incoming packet.
+ OriginalDstAddress FullAddress
}
// PacketOwner is used to get UID and GID of the packet.