diff --git a/pkg/tcpip/network/ipv6/ipv6.go b/pkg/tcpip/network/ipv6/ipv6.go index 5c97050a3..c61a4e338 100644 --- a/pkg/tcpip/network/ipv6/ipv6.go +++ b/pkg/tcpip/network/ipv6/ipv6.go @@ -385,6 +385,13 @@ func (e *endpoint) SetNDPConfigurations(c NDPConfigurations) { e.mu.ndp.configs = c } +// NDPConfigurations implements NDPEndpoint. +func (e *endpoint) NDPConfigurations() NDPConfigurations { + e.mu.RLock() + defer e.mu.RUnlock() + return e.mu.ndp.configs +} + // hasTentativeAddr returns true if addr is tentative on e. func (e *endpoint) hasTentativeAddr(addr tcpip.Address) bool { e.mu.RLock() diff --git a/pkg/tcpip/network/ipv6/ndp.go b/pkg/tcpip/network/ipv6/ndp.go index 41f497f67..1662e23af 100644 --- a/pkg/tcpip/network/ipv6/ndp.go +++ b/pkg/tcpip/network/ipv6/ndp.go @@ -172,6 +172,9 @@ const ( type NDPEndpoint interface { // SetNDPConfigurations sets the NDP configurations. SetNDPConfigurations(NDPConfigurations) + + // NDPConfigurations returns the NDP configurations. + NDPConfigurations() NDPConfigurations } // DHCPv6ConfigurationFromNDPRA is a configuration available via DHCPv6 that an