Fix metrics for connections going through SPN

This commit is contained in:
Daniel 2022-03-22 15:29:30 +01:00
parent 010d9a97a6
commit 88afd75768
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.