Merge pull request #3783 from weaveworks/issue-3781

send FastDatapathCryptoInitSARemote control message only if encryption is enabled
This commit is contained in:
Bryan Boreham authored and GitHub committed 2020-03-12 10:09:26 +00:00
commit e7a24eaf0a
1 file changed
+6 -4
+6 -4
View File
@@ -694,10 +694,12 @@ func (fwd *fastDatapathForwarder) Confirm() {
fwd.lock.Unlock() // unlock before calling send() which may block
if err := fwd.sendControlMsg(FastDatapathCryptoInitSARemote, controlMsg); err != nil {
log.Error(fwd.logPrefix(), "ipsec send InitSARemote failed: ", err)
fwd.handleError(err)
return
if len(controlMsg) > 0 {
if err := fwd.sendControlMsg(FastDatapathCryptoInitSARemote, controlMsg); err != nil {
log.Error(fwd.logPrefix(), "ipsec send InitSARemote failed: ", err)
fwd.handleError(err)
return
}
}
go fwd.doHeartbeats()