ipn: only send services in Hostinfo if Tailnet has opted-in to services collection (#1107)

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy
2021-01-11 17:24:32 -05:00
committed by GitHub
parent f85769b1ed
commit 024671406b
4 changed files with 36 additions and 25 deletions

View File

@ -39,6 +39,12 @@ type NetworkMap struct {
Hostinfo tailcfg.Hostinfo
PacketFilter []filter.Match
// CollectServices reports whether this node's Tailnet has
// requested that info about services be included in HostInfo.
// If set, Hostinfo.ShieldsUp blocks services collection; that
// takes precedence over this field.
CollectServices bool
// DERPMap is the last DERP server map received. It's reused
// between updates and should not be modified.
DERPMap *tailcfg.DERPMap