Add getter for NDP configuration

PiperOrigin-RevId: 669127173
This commit is contained in:
Tony Gong
2024-08-29 18:08:52 -07:00
committed by gVisor bot
parent 431d29921f
commit b1cbae9a50
2 changed files with 10 additions and 0 deletions
+7
View File
@@ -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()
+3
View File
@@ -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