Skip to content

Commit

Permalink
Fix setting of TTL on a nil connection in updateNeighbor
Browse files Browse the repository at this point in the history
Signed-off-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
  • Loading branch information
rastislavs committed Jun 5, 2023
1 parent d8306e9 commit 03982e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3354,7 +3354,7 @@ func (s *BgpServer) updateNeighbor(c *config.Neighbor) (needsSoftResetIn bool, e
peer.fsm.pConf.TtlSecurity.Config = c.TtlSecurity.Config
setTTL = true
}
if setTTL {
if setTTL && peer.fsm.conn != nil {
if err := setPeerConnTTL(peer.fsm); err != nil {
s.logger.Error("failed to set peer connection TTL",
log.Fields{
Expand Down

0 comments on commit 03982e5

Please sign in to comment.