Track connections by local index id instead of vpn ip (#807)

This commit is contained in:
Nate Brown
2023-02-13 14:41:05 -06:00
committed by GitHub
parent 5bd8712946
commit a06977bbd5
5 changed files with 109 additions and 100 deletions

View File

@@ -764,7 +764,10 @@ func (i *HostInfo) logger(l *logrus.Logger) *logrus.Entry {
return logrus.NewEntry(l)
}
li := l.WithField("vpnIp", i.vpnIp)
li := l.WithField("vpnIp", i.vpnIp).
WithField("localIndex", i.localIndexId).
WithField("remoteIndex", i.remoteIndexId)
if connState := i.ConnectionState; connState != nil {
if peerCert := connState.peerCert; peerCert != nil {
li = li.WithField("certName", peerCert.Details.Name)