diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-12-23 17:08:00 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-12-23 17:08:00 +0000 |
commit | 5128f604cb9f1fcf972339618d488d005d8ac25f (patch) | |
tree | ae0fe7c31375705a5fdb760a9eb3fa2ed1f808a7 /pkg/tcpip/stack/nic.go | |
parent | 4c8b622c6b83e02d1794cf3c61772a21d4bafce5 (diff) | |
parent | 5bc4ae9d5746e65909a0bdab60e7bd598d4401c7 (diff) |
Merge release-20191213.0-44-g5bc4ae9 (automated)
Diffstat (limited to 'pkg/tcpip/stack/nic.go')
-rw-r--r-- | pkg/tcpip/stack/nic.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go index e8401c673..ddd014658 100644 --- a/pkg/tcpip/stack/nic.go +++ b/pkg/tcpip/stack/nic.go @@ -203,6 +203,18 @@ func (n *NIC) enable() *tcpip.Error { return err } +// becomeIPv6Router transitions n into an IPv6 router. +// +// When transitioning into an IPv6 router, host-only state (NDP discovered +// routers, discovered on-link prefixes, and auto-generated addresses) will +// be cleaned up/invalidated. +func (n *NIC) becomeIPv6Router() { + n.mu.Lock() + defer n.mu.Unlock() + + n.ndp.cleanupHostOnlyState() +} + // attachLinkEndpoint attaches the NIC to the endpoint, which will enable it // to start delivering packets. func (n *NIC) attachLinkEndpoint() { |