Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpv1: Set default IdleHoldTime after reset #26001

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions pkg/bgpv1/gobgp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import (
const (
wildcardIPv4Addr = "0.0.0.0"
wildcardIPv6Addr = "::"

// defaultIdleHoldTimeAfterReset defines time BGP session will stay idle after neighbor reset.
defaultIdleHoldTimeAfterReset = 5 * time.Second
)

var (
Expand Down Expand Up @@ -235,9 +238,10 @@ func (g *GoBGPServer) getPeerConfig(ctx context.Context, n *v2alpha1api.CiliumBG
peer.Timers.Config = &gobgp.TimersConfig{
// If any of the timers is not set (zero), it will be defaulted at the gobgp level.
// However, they should be already defaulted at this point.
ConnectRetry: uint64(n.ConnectRetryTime.Round(time.Second).Seconds()),
HoldTime: uint64(n.HoldTime.Round(time.Second).Seconds()),
KeepaliveInterval: uint64(n.KeepAliveTime.Round(time.Second).Seconds()),
ConnectRetry: uint64(n.ConnectRetryTime.Round(time.Second).Seconds()),
HoldTime: uint64(n.HoldTime.Round(time.Second).Seconds()),
KeepaliveInterval: uint64(n.KeepAliveTime.Round(time.Second).Seconds()),
IdleHoldTimeAfterReset: uint64(defaultIdleHoldTimeAfterReset.Seconds()),
}

// populate graceful restart config
Expand Down