diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-24 16:44:16 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-24 16:44:16 +0000 |
commit | 9662600f3fc56cfce16d9cf407964b0bac0cc150 (patch) | |
tree | 93599a797cef7ecc2d7b019b9cd84823aaae5cc3 /pkg/tcpip/transport/icmp | |
parent | 15bcc00b79decbc781d2d1badd5c654ed2609ea8 (diff) | |
parent | ec0aa657edfd98a1e8dfbbf017ee6cf8c7f1a40e (diff) |
Merge release-20210315.0-21-gec0aa657e (automated)
Diffstat (limited to 'pkg/tcpip/transport/icmp')
-rw-r--r-- | pkg/tcpip/transport/icmp/endpoint.go | 8 | ||||
-rw-r--r-- | pkg/tcpip/transport/icmp/endpoint_state.go | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/pkg/tcpip/transport/icmp/endpoint.go b/pkg/tcpip/transport/icmp/endpoint.go index 06c63e74a..1dce35c63 100644 --- a/pkg/tcpip/transport/icmp/endpoint.go +++ b/pkg/tcpip/transport/icmp/endpoint.go @@ -467,8 +467,8 @@ func send6(r *stack.Route, ident uint16, data buffer.View, ttl uint8) tcpip.Erro dataRange := pkt.Data().AsRange() icmpv6.SetChecksum(header.ICMPv6Checksum(header.ICMPv6ChecksumParams{ Header: icmpv6, - Src: r.LocalAddress, - Dst: r.RemoteAddress, + Src: r.LocalAddress(), + Dst: r.RemoteAddress(), PayloadCsum: dataRange.Checksum(), PayloadLen: dataRange.Size(), })) @@ -536,9 +536,9 @@ func (e *endpoint) Connect(addr tcpip.FullAddress) tcpip.Error { } id := stack.TransportEndpointID{ - LocalAddress: r.LocalAddress, + LocalAddress: r.LocalAddress(), LocalPort: localPort, - RemoteAddress: r.RemoteAddress, + RemoteAddress: r.RemoteAddress(), } // Even if we're connected, this endpoint can still be used to send diff --git a/pkg/tcpip/transport/icmp/endpoint_state.go b/pkg/tcpip/transport/icmp/endpoint_state.go index c9fa9974a..a3c6db5a8 100644 --- a/pkg/tcpip/transport/icmp/endpoint_state.go +++ b/pkg/tcpip/transport/icmp/endpoint_state.go @@ -82,7 +82,7 @@ func (e *endpoint) Resume(s *stack.Stack) { panic(err) } - e.ID.LocalAddress = e.route.LocalAddress + e.ID.LocalAddress = e.route.LocalAddress() } else if len(e.ID.LocalAddress) != 0 { // stateBound if e.stack.CheckLocalAddress(e.RegisterNICID, e.NetProto, e.ID.LocalAddress) == 0 { panic(&tcpip.ErrBadLocalAddress{}) |