send FastDatapathCryptoInitSARemote control message only if encryption is enabled
Fixes #3781
This commit is contained in:
1 parent
57bca8e955
commit
6bc0e5e71c
1 file changed
+6
-4
+6
-4
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user