Skip to content

Commit

Permalink
fix(tailnet): Avoid logging netmap (coder#6342)
Browse files Browse the repository at this point in the history
  • Loading branch information
mafredri authored Feb 25, 2023
1 parent 5876dc1 commit cae8b88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tailnet/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func NewConn(options *Options) (conn *Conn, err error) {
wireguardEngine = wgengine.NewWatchdog(wireguardEngine)
wireguardEngine.SetDERPMap(options.DERPMap)
netMapCopy := *netMap
options.Logger.Debug(context.Background(), "updating network map", slog.F("net_map", netMapCopy))
options.Logger.Debug(context.Background(), "updating network map")
wireguardEngine.SetNetworkMap(&netMapCopy)

localIPSet := netipx.IPSetBuilder{}
Expand Down Expand Up @@ -333,7 +333,7 @@ func (c *Conn) SetDERPMap(derpMap *tailcfg.DERPMap) {
c.wireguardEngine.SetDERPMap(derpMap)
c.netMap.DERPMap = derpMap
netMapCopy := *c.netMap
c.logger.Debug(context.Background(), "updating network map", slog.F("net_map", netMapCopy))
c.logger.Debug(context.Background(), "updating network map")
c.wireguardEngine.SetNetworkMap(&netMapCopy)
}

Expand All @@ -344,7 +344,7 @@ func (c *Conn) RemoveAllPeers() error {
c.netMap.Peers = []*tailcfg.Node{}
c.peerMap = map[tailcfg.NodeID]*tailcfg.Node{}
netMapCopy := *c.netMap
c.logger.Debug(context.Background(), "updating network map", slog.F("net_map", netMapCopy))
c.logger.Debug(context.Background(), "updating network map")
c.wireguardEngine.SetNetworkMap(&netMapCopy)
cfg, err := nmcfg.WGCfg(c.netMap, Logger(c.logger.Named("wgconfig")), netmap.AllowSingleHosts, "")
if err != nil {
Expand Down Expand Up @@ -428,7 +428,7 @@ func (c *Conn) UpdateNodes(nodes []*Node, replacePeers bool) error {
c.netMap.Peers = append(c.netMap.Peers, peer.Clone())
}
netMapCopy := *c.netMap
c.logger.Debug(context.Background(), "updating network map", slog.F("net_map", netMapCopy))
c.logger.Debug(context.Background(), "updating network map")
c.wireguardEngine.SetNetworkMap(&netMapCopy)
cfg, err := nmcfg.WGCfg(c.netMap, Logger(c.logger.Named("wgconfig")), netmap.AllowSingleHosts, "")
if err != nil {
Expand Down

0 comments on commit cae8b88

Please sign in to comment.