filterLocked returns the current filter, based on our local addresses. c.L must be held.
()
| 375 | // filterLocked returns the current filter, based on our local addresses. c.L |
| 376 | // must be held. |
| 377 | func (c *configMaps) filterLocked() *filter.Filter { |
| 378 | localIPSet := netipx.IPSetBuilder{} |
| 379 | for _, addr := range c.addresses { |
| 380 | localIPSet.AddPrefix(addr) |
| 381 | } |
| 382 | localIPs, _ := localIPSet.IPSet() |
| 383 | logIPSet := netipx.IPSetBuilder{} |
| 384 | logIPs, _ := logIPSet.IPSet() |
| 385 | return filter.New( |
| 386 | c.static.PacketFilter, |
| 387 | localIPs, |
| 388 | logIPs, |
| 389 | nil, |
| 390 | Logger(c.logger.Named("net.packet-filter")), |
| 391 | ) |
| 392 | } |
| 393 | |
| 394 | // updatePeers handles protocol updates about peers from the coordinator. c.L MUST NOT be held. |
| 395 | func (c *configMaps) updatePeers(updates []*proto.CoordinateResponse_PeerUpdate) { |
no test coverage detected