Skip to content

Commit

Permalink
Only log if we are actually sending a test packet
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrownus committed Apr 17, 2023
1 parent a86fd5e commit a31871c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions connection_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,6 @@ func (n *connectionManager) makeTrafficDecision(localIndex uint32, p, nb, out []
return deleteTunnel, hostinfo, nil
}

hostinfo.logger(n.l).
WithField("tunnelCheck", m{"state": "testing", "method": "active"}).
Debug("Tunnel status")

if hostinfo != nil && hostinfo.ConnectionState != nil && mainHostInfo {
if !outTraffic {
// If we aren't sending or receiving traffic then its an unused tunnel and we don't to test the tunnel.
Expand All @@ -367,6 +363,10 @@ func (n *connectionManager) makeTrafficDecision(localIndex uint32, p, nb, out []
return doNothing, nil, nil
}

hostinfo.logger(n.l).
WithField("tunnelCheck", m{"state": "testing", "method": "active"}).
Debug("Tunnel status")

// Send a test packet to trigger an authenticated tunnel test, this should suss out any lingering tunnel issues
n.intf.SendMessageToHostInfo(header.Test, header.TestRequest, hostinfo, p, nb, out)

Expand Down

0 comments on commit a31871c

Please sign in to comment.