Skip to content

Commit

Permalink
Merge branch '2.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
bboreham committed Mar 12, 2020
2 parents 6e1770d + e7a24ea commit 06b0a82
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 6 additions & 4 deletions router/fastdp.go
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
6 changes: 5 additions & 1 deletion router/pcap.go
Expand Up @@ -4,10 +4,14 @@ import (
"fmt"
"net"
"sync"
"time"

"github.com/google/gopacket/pcap"
)

// Must be less than 2^31 usec - see https://github.com/google/gopacket/issues/708
const longTimeout = time.Duration(30 * time.Minute)

type Pcap struct {
NonDiscardingFlowOp

Expand Down Expand Up @@ -77,7 +81,7 @@ func newPcapHandle(ifName string, promisc bool, snaplen int, bufSz int) (handle
if err = inactive.SetSnapLen(snaplen); err != nil {
return
}
if err = inactive.SetTimeout(MaxDuration); err != nil {
if err = inactive.SetTimeout(longTimeout); err != nil {
return
}
if err = inactive.SetImmediateMode(true); err != nil {
Expand Down

0 comments on commit 06b0a82

Please sign in to comment.