diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-23 17:03:14 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-23 17:03:14 +0000 |
commit | b815e8d38ab9cc34d7e26b0fc576df0e767794b7 (patch) | |
tree | 182103eb3f122fdb40ed0cade8afb458be5b7aa6 | |
parent | c67d7372613acf80dd49fd0128f40753d4787c5a (diff) | |
parent | 409a11445442488ec7e0397372a673910062fa5f (diff) |
Merge release-20210315.0-11-g409a11445 (automated)
-rw-r--r-- | pkg/tcpip/network/ipv4/ipv4.go | 8 | ||||
-rw-r--r-- | pkg/tcpip/network/ipv6/ipv6.go | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pkg/tcpip/network/ipv4/ipv4.go b/pkg/tcpip/network/ipv4/ipv4.go index a43107d30..a1660e9a3 100644 --- a/pkg/tcpip/network/ipv4/ipv4.go +++ b/pkg/tcpip/network/ipv4/ipv4.go @@ -641,7 +641,7 @@ func (e *endpoint) HandlePacket(pkt *stack.PacketBuffer) { } if !e.nic.IsLoopback() { - if e.protocol.options.DropExternalLoopbackTraffic { + if !e.protocol.options.AllowExternalLoopbackTraffic { if header.IsV4LoopbackAddress(h.SourceAddress()) { stats.InvalidSourceAddressesReceived.Increment() return @@ -1230,9 +1230,9 @@ type Options struct { // IGMP holds options for IGMP. IGMP IGMPOptions - // DropExternalLoopbackTraffic indicates that inbound loopback packets (i.e. - // martian loopback packets) should be dropped. - DropExternalLoopbackTraffic bool + // AllowExternalLoopbackTraffic indicates that inbound loopback packets (i.e. + // martian loopback packets) should be accepted. + AllowExternalLoopbackTraffic bool } // NewProtocolWithOptions returns an IPv4 network protocol. diff --git a/pkg/tcpip/network/ipv6/ipv6.go b/pkg/tcpip/network/ipv6/ipv6.go index b94cb428f..83e98bab9 100644 --- a/pkg/tcpip/network/ipv6/ipv6.go +++ b/pkg/tcpip/network/ipv6/ipv6.go @@ -931,7 +931,7 @@ func (e *endpoint) HandlePacket(pkt *stack.PacketBuffer) { } if !e.nic.IsLoopback() { - if e.protocol.options.DropExternalLoopbackTraffic { + if !e.protocol.options.AllowExternalLoopbackTraffic { if header.IsV6LoopbackAddress(h.SourceAddress()) { stats.InvalidSourceAddressesReceived.Increment() return @@ -2071,9 +2071,9 @@ type Options struct { // DADConfigs holds the default DAD configurations used by IPv6 endpoints. DADConfigs stack.DADConfigurations - // DropExternalLoopbackTraffic indicates that inbound loopback packets (i.e. - // martian loopback packets) should be dropped. - DropExternalLoopbackTraffic bool + // AllowExternalLoopbackTraffic indicates that inbound loopback packets (i.e. + // martian loopback packets) should be accepted. + AllowExternalLoopbackTraffic bool } // NewProtocolWithOptions returns an IPv6 network protocol. |