Merge pull request #2825 from weaveworks/issues/2824-fastdp-timer-race
Do not reset fastdp heartbeat timer for non-confirmed connections. Fixes #2824
This commit is contained in:
commit
640b487914
1 file changed
+5
-3
+5
-3
@@ -577,8 +577,8 @@ type fastDatapathForwarder struct {
|
||||
confirmed bool
|
||||
remoteAddr *net.UDPAddr
|
||||
heartbeatInterval time.Duration
|
||||
heartbeatTimer *time.Timer
|
||||
heartbeatTimeout *time.Timer
|
||||
heartbeatTimer *time.Timer // for sending
|
||||
heartbeatTimeout *time.Timer // for receiving
|
||||
ackedHeartbeat bool
|
||||
stopChan chan struct{}
|
||||
stopped bool
|
||||
@@ -856,7 +856,9 @@ func (fwd *fastDatapathForwarder) handleCryptoInitSARemote(msg []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
if !fwd.isOutboundIPSecEstablished {
|
||||
// FastDatapathCryptoInitSARemote can be received before Confirm'ing
|
||||
// connection, thus before InitSALocal.
|
||||
if fwd.confirmed && !fwd.isOutboundIPSecEstablished {
|
||||
fwd.isOutboundIPSecEstablished = true
|
||||
fwd.heartbeatTimer.Reset(0)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user