Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

send FastDatapathCryptoInitSARemote control message only if encryption is enabled #3783

Merged
merged 1 commit into from
Mar 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions router/fastdp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down