summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/packet_buffer.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-10-13 02:43:23 +0000
committergVisor bot <gvisor-bot@google.com>2021-10-13 02:43:23 +0000
commitb2060fe76850dc6decf14ed932b960927f7b406a (patch)
treed0dd763c6fdc328ee55cc6952597e03d21ab4d55 /pkg/tcpip/stack/packet_buffer.go
parenta9f38c9f9136635fa23540f2105060d202076d81 (diff)
parent747cb92460bc30983263fcd85562a8586842d824 (diff)
Merge release-20210927.0-67-g747cb9246 (automated)
Diffstat (limited to 'pkg/tcpip/stack/packet_buffer.go')
-rw-r--r--pkg/tcpip/stack/packet_buffer.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkg/tcpip/stack/packet_buffer.go b/pkg/tcpip/stack/packet_buffer.go
index 888a8bd9d..c4a4bbd22 100644
--- a/pkg/tcpip/stack/packet_buffer.go
+++ b/pkg/tcpip/stack/packet_buffer.go
@@ -126,9 +126,13 @@ type PacketBuffer struct {
EgressRoute RouteInfo
GSOOptions GSO
- // NatDone indicates if the packet has been manipulated as per NAT
- // iptables rule.
- NatDone bool
+ // SNATDone indicates if the packet's source has been manipulated as per
+ // iptables NAT table.
+ SNATDone bool
+
+ // DNATDone indicates if the packet's destination has been manipulated as per
+ // iptables NAT table.
+ DNATDone bool
// PktType indicates the SockAddrLink.PacketType of the packet as defined in
// https://www.man7.org/linux/man-pages/man7/packet.7.html.
@@ -298,7 +302,8 @@ func (pk *PacketBuffer) Clone() *PacketBuffer {
Owner: pk.Owner,
GSOOptions: pk.GSOOptions,
NetworkProtocolNumber: pk.NetworkProtocolNumber,
- NatDone: pk.NatDone,
+ DNATDone: pk.DNATDone,
+ SNATDone: pk.SNATDone,
TransportProtocolNumber: pk.TransportProtocolNumber,
PktType: pk.PktType,
NICID: pk.NICID,