Skip to content

Commit 07375b0

Browse files
committed
server: lock fsm.lock to access to Timers.Config
Needs to lock fsm mutex. Signed-off-by: FUJITA Tomonori <[email protected]>
1 parent 1440166 commit 07375b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/server/fsm.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,9 @@ func (fsm *fsm) sendNotification(msg *bgp.BGPMessage) error {
357357
slog.Any("Data", rest))
358358

359359
if body.ErrorSubcode == bgp.BGP_ERROR_SUB_ADMINISTRATIVE_RESET {
360+
fsm.lock.RLock()
360361
fsm.idleHoldTime = fsm.pConf.Timers.Config.IdleHoldTimeAfterReset
362+
fsm.lock.RUnlock()
361363
}
362364
} else {
363365
fsm.logger.Warn("sent notification",

0 commit comments

Comments
 (0)