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/stack | |
parent | 95e28041c5508e6206ea56a9748b8f3b3539d575 (diff) | |
parent | 3269cefd6f8781966a95f027e358f6ddcadefc8f (diff) |
Merge release-20201005.0-83-g3269cefd6 (automated)
Diffstat (limited to 'pkg/tcpip/stack')
-rw-r--r-- | pkg/tcpip/stack/neighbor_entry.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/stack/neighbor_entry.go b/pkg/tcpip/stack/neighbor_entry.go index 4d69a4de1..be61a21af 100644 --- a/pkg/tcpip/stack/neighbor_entry.go +++ b/pkg/tcpip/stack/neighbor_entry.go @@ -406,9 +406,9 @@ func (e *neighborEntry) handleConfirmationLocked(linkAddr tcpip.LinkAddress, fla // INCOMPLETE state." - RFC 4861 section 7.2.5 case Reachable, Stale, Delay, Probe: - sameLinkAddr := e.neigh.LinkAddr == linkAddr + isLinkAddrDifferent := len(linkAddr) != 0 && e.neigh.LinkAddr != linkAddr - if !sameLinkAddr { + if isLinkAddrDifferent { if !flags.Override { if e.neigh.State == Reachable { e.dispatchChangeEventLocked(Stale) @@ -431,7 +431,7 @@ func (e *neighborEntry) handleConfirmationLocked(linkAddr tcpip.LinkAddress, fla } } - if flags.Solicited && (flags.Override || sameLinkAddr) { + if flags.Solicited && (flags.Override || !isLinkAddrDifferent) { if e.neigh.State != Reachable { e.dispatchChangeEventLocked(Reachable) } |