diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-15 22:40:25 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-15 22:40:25 +0000 |
commit | 2a411eafcd5e2e6373e929ce43acee6cc79553be (patch) | |
tree | c8bd784755c5059a822faf4a8e422b4a6285f701 /pkg/tcpip/network/ipv6 | |
parent | 95e28041c5508e6206ea56a9748b8f3b3539d575 (diff) | |
parent | 3269cefd6f8781966a95f027e358f6ddcadefc8f (diff) |
Merge release-20201005.0-83-g3269cefd6 (automated)
Diffstat (limited to 'pkg/tcpip/network/ipv6')
-rw-r--r-- | pkg/tcpip/network/ipv6/icmp.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/tcpip/network/ipv6/icmp.go b/pkg/tcpip/network/ipv6/icmp.go index 913b2140c..ead6bedcb 100644 --- a/pkg/tcpip/network/ipv6/icmp.go +++ b/pkg/tcpip/network/ipv6/icmp.go @@ -439,19 +439,19 @@ func (e *endpoint) handleICMP(r *stack.Route, pkt *stack.PacketBuffer, hasFragme // If the NA message has the target link layer option, update the link // address cache with the link address for the target of the message. - if len(targetLinkAddr) != 0 { - if e.nud == nil { + if e.nud == nil { + if len(targetLinkAddr) != 0 { e.linkAddrCache.AddLinkAddress(e.nic.ID(), targetAddr, targetLinkAddr) - return } - - e.nud.HandleConfirmation(targetAddr, targetLinkAddr, stack.ReachabilityConfirmationFlags{ - Solicited: na.SolicitedFlag(), - Override: na.OverrideFlag(), - IsRouter: na.RouterFlag(), - }) + return } + e.nud.HandleConfirmation(targetAddr, targetLinkAddr, stack.ReachabilityConfirmationFlags{ + Solicited: na.SolicitedFlag(), + Override: na.OverrideFlag(), + IsRouter: na.RouterFlag(), + }) + case header.ICMPv6EchoRequest: received.EchoRequest.Increment() icmpHdr, ok := pkt.TransportHeader().Consume(header.ICMPv6EchoMinimumSize) |