setAddresses sets the addresses belonging to this node to the given slice. It triggers configuration of the engine if the addresses have changed. c.L MUST NOT be held.
(ips []netip.Prefix)
| 275 | // triggers configuration of the engine if the addresses have changed. |
| 276 | // c.L MUST NOT be held. |
| 277 | func (c *configMaps) setAddresses(ips []netip.Prefix) { |
| 278 | c.L.Lock() |
| 279 | defer c.L.Unlock() |
| 280 | if d := prefixesDifferent(c.addresses, ips); !d { |
| 281 | return |
| 282 | } |
| 283 | c.addresses = make([]netip.Prefix, len(ips)) |
| 284 | copy(c.addresses, ips) |
| 285 | c.netmapDirty = true |
| 286 | c.filterDirty = true |
| 287 | c.Broadcast() |
| 288 | } |
| 289 | |
| 290 | func (c *configMaps) setHosts(hosts map[dnsname.FQDN][]netip.Addr) { |
| 291 | c.L.Lock() |
nothing calls this directly
no test coverage detected