Merge pull request #577 from safing/fix/spn-connection-metrics

Fix metrics for connections going through SPN
This commit is contained in:
Daniel
2022-03-23 14:58:38 +01:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ func checkTunneling(ctx context.Context, conn *network.Connection, pkt packet.Pa
} }
// Tunnel all the things! // Tunnel all the things!
conn.SaveWhenFinished()
// Check if ready. // Check if ready.
if !captain.ClientReady() { if !captain.ClientReady() {

View File

@@ -124,7 +124,7 @@ func (conn *Connection) addToMetrics() {
blockedOutConnCounter.Inc() blockedOutConnCounter.Inc()
conn.addedToMetrics = true conn.addedToMetrics = true
return return
case VerdictAccept: case VerdictAccept, VerdictRerouteToTunnel:
// Continue to next section. // Continue to next section.
default: default:
// Connection is not counted. // Connection is not counted.