|
|
@ -661,6 +661,7 @@ func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(*Netw
|
|
|
|
var lastDERPMap *tailcfg.DERPMap
|
|
|
|
var lastDERPMap *tailcfg.DERPMap
|
|
|
|
var lastUserProfile = map[tailcfg.UserID]tailcfg.UserProfile{}
|
|
|
|
var lastUserProfile = map[tailcfg.UserID]tailcfg.UserProfile{}
|
|
|
|
var lastParsedPacketFilter []filter.Match
|
|
|
|
var lastParsedPacketFilter []filter.Match
|
|
|
|
|
|
|
|
var collectServices bool
|
|
|
|
|
|
|
|
|
|
|
|
// If allowStream, then the server will use an HTTP long poll to
|
|
|
|
// If allowStream, then the server will use an HTTP long poll to
|
|
|
|
// return incremental results. There is always one response right
|
|
|
|
// return incremental results. There is always one response right
|
|
|
@ -742,6 +743,10 @@ func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(*Netw
|
|
|
|
lastParsedPacketFilter = c.parsePacketFilter(pf)
|
|
|
|
lastParsedPacketFilter = c.parsePacketFilter(pf)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if v, ok := resp.CollectServices.Get(); ok {
|
|
|
|
|
|
|
|
collectServices = v
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Get latest localPort. This might've changed if
|
|
|
|
// Get latest localPort. This might've changed if
|
|
|
|
// a lite map update occured meanwhile. This only affects
|
|
|
|
// a lite map update occured meanwhile. This only affects
|
|
|
|
// the end-to-end test.
|
|
|
|
// the end-to-end test.
|
|
|
@ -765,7 +770,7 @@ func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(*Netw
|
|
|
|
DNS: resp.DNSConfig,
|
|
|
|
DNS: resp.DNSConfig,
|
|
|
|
Hostinfo: resp.Node.Hostinfo,
|
|
|
|
Hostinfo: resp.Node.Hostinfo,
|
|
|
|
PacketFilter: lastParsedPacketFilter,
|
|
|
|
PacketFilter: lastParsedPacketFilter,
|
|
|
|
CollectServices: resp.CollectServices,
|
|
|
|
CollectServices: collectServices,
|
|
|
|
DERPMap: lastDERPMap,
|
|
|
|
DERPMap: lastDERPMap,
|
|
|
|
Debug: resp.Debug,
|
|
|
|
Debug: resp.Debug,
|
|
|
|
}
|
|
|
|
}
|
|
|
|