diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-15 00:34:26 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-15 00:34:26 +0000 |
commit | 2f6429be86f927058392a85dcb6512bebb836d9d (patch) | |
tree | 0031ed55b9891f5b31ab147ef05df9f1f19fcedd /pkg/tcpip/network/ipv6/icmp.go | |
parent | a403f6153b1ada3da46f3fbc94648e42e03926a4 (diff) | |
parent | 1736b2208f7eeec56531a9877ca53dc784fed544 (diff) |
Merge release-20200810.0-35-g1736b2208 (automated)
Diffstat (limited to 'pkg/tcpip/network/ipv6/icmp.go')
-rw-r--r-- | pkg/tcpip/network/ipv6/icmp.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/tcpip/network/ipv6/icmp.go b/pkg/tcpip/network/ipv6/icmp.go index 39ae19295..66d3a953a 100644 --- a/pkg/tcpip/network/ipv6/icmp.go +++ b/pkg/tcpip/network/ipv6/icmp.go @@ -39,8 +39,9 @@ func (e *endpoint) handleControl(typ stack.ControlType, extra uint32, pkt *stack // is truncated, which would cause IsValid to return false. // // Drop packet if it doesn't have the basic IPv6 header or if the - // original source address doesn't match the endpoint's address. - if hdr.SourceAddress() != e.id.LocalAddress { + // original source address doesn't match an address we own. + src := hdr.SourceAddress() + if e.stack.CheckLocalAddress(e.NICID(), ProtocolNumber, src) == 0 { return } @@ -67,7 +68,7 @@ func (e *endpoint) handleControl(typ stack.ControlType, extra uint32, pkt *stack } // Deliver the control packet to the transport endpoint. - e.dispatcher.DeliverTransportControlPacket(e.id.LocalAddress, hdr.DestinationAddress(), ProtocolNumber, p, typ, extra, pkt) + e.dispatcher.DeliverTransportControlPacket(src, hdr.DestinationAddress(), ProtocolNumber, p, typ, extra, pkt) } func (e *endpoint) handleICMP(r *stack.Route, pkt *stack.PacketBuffer, hasFragmentHeader bool) { |