Skip to content

Commit cae8b88

Browse files
authored
fix(tailnet): Avoid logging netmap (coder#6342)
1 parent 5876dc1 commit cae8b88

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tailnet/conn.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func NewConn(options *Options) (conn *Conn, err error) {
179179
wireguardEngine = wgengine.NewWatchdog(wireguardEngine)
180180
wireguardEngine.SetDERPMap(options.DERPMap)
181181
netMapCopy := *netMap
182-
options.Logger.Debug(context.Background(), "updating network map", slog.F("net_map", netMapCopy))
182+
options.Logger.Debug(context.Background(), "updating network map")
183183
wireguardEngine.SetNetworkMap(&netMapCopy)
184184

185185
localIPSet := netipx.IPSetBuilder{}
@@ -333,7 +333,7 @@ func (c *Conn) SetDERPMap(derpMap *tailcfg.DERPMap) {
333333
c.wireguardEngine.SetDERPMap(derpMap)
334334
c.netMap.DERPMap = derpMap
335335
netMapCopy := *c.netMap
336-
c.logger.Debug(context.Background(), "updating network map", slog.F("net_map", netMapCopy))
336+
c.logger.Debug(context.Background(), "updating network map")
337337
c.wireguardEngine.SetNetworkMap(&netMapCopy)
338338
}
339339

@@ -344,7 +344,7 @@ func (c *Conn) RemoveAllPeers() error {
344344
c.netMap.Peers = []*tailcfg.Node{}
345345
c.peerMap = map[tailcfg.NodeID]*tailcfg.Node{}
346346
netMapCopy := *c.netMap
347-
c.logger.Debug(context.Background(), "updating network map", slog.F("net_map", netMapCopy))
347+
c.logger.Debug(context.Background(), "updating network map")
348348
c.wireguardEngine.SetNetworkMap(&netMapCopy)
349349
cfg, err := nmcfg.WGCfg(c.netMap, Logger(c.logger.Named("wgconfig")), netmap.AllowSingleHosts, "")
350350
if err != nil {
@@ -428,7 +428,7 @@ func (c *Conn) UpdateNodes(nodes []*Node, replacePeers bool) error {
428428
c.netMap.Peers = append(c.netMap.Peers, peer.Clone())
429429
}
430430
netMapCopy := *c.netMap
431-
c.logger.Debug(context.Background(), "updating network map", slog.F("net_map", netMapCopy))
431+
c.logger.Debug(context.Background(), "updating network map")
432432
c.wireguardEngine.SetNetworkMap(&netMapCopy)
433433
cfg, err := nmcfg.WGCfg(c.netMap, Logger(c.logger.Named("wgconfig")), netmap.AllowSingleHosts, "")
434434
if err != nil {

0 commit comments

Comments
 (0)