ipn/ipnlocal: add GetFilterForTest (#15025)

Needed to test full packet filter in e2e tests. See tailscale/corp#26596

Updates tailscale/corp#20514

Signed-off-by: James Sanderson <jsanderson@tailscale.com>
This commit is contained in:
James 'zofrex' Sanderson 2025-02-14 15:25:48 +00:00 committed by GitHub
parent 1d035db4df
commit e142571397
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1438,6 +1438,10 @@ func (b *LocalBackend) peerCapsLocked(src netip.Addr) tailcfg.PeerCapMap {
return nil
}
func (b *LocalBackend) GetFilterForTest() *filter.Filter {
return b.filterAtomic.Load()
}
// SetControlClientStatus is the callback invoked by the control client whenever it posts a new status.
// Among other things, this is where we update the netmap, packet filters, DNS and DERP maps.
func (b *LocalBackend) SetControlClientStatus(c controlclient.Client, st controlclient.Status) {