summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/fsm.go
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-10-17 23:23:28 +0300
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2021-10-18 16:58:11 +0900
commitd3ee05ad24192ff0f2b876532fb6fd9776d540dd (patch)
treecbbea8463ce5f4a8c66e5517c42066c1bac347ac /pkg/server/fsm.go
parent313b5cf02cb225204372ced27dea8ab3b2fd3315 (diff)
bgp: Validate router-id against 0.0.0.0 and ASN-wide
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'pkg/server/fsm.go')
-rw-r--r--pkg/server/fsm.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/server/fsm.go b/pkg/server/fsm.go
index a42ee910..2228b7ca 100644
--- a/pkg/server/fsm.go
+++ b/pkg/server/fsm.go
@@ -1278,7 +1278,7 @@ func (h *fsmHandler) opensent(ctx context.Context) (bgp.FSMState, *fsmStateReaso
fsm.lock.RLock()
fsmPeerAS := fsm.pConf.Config.PeerAs
fsm.lock.RUnlock()
- peerAs, err := bgp.ValidateOpenMsg(body, fsmPeerAS)
+ peerAs, err := bgp.ValidateOpenMsg(body, fsmPeerAS, fsm.peerInfo.LocalAS, net.ParseIP(fsm.gConf.Config.RouterId))
if err != nil {
m, _ := fsm.sendNotificationFromErrorMsg(err.(*bgp.MessageError))
return bgp.BGP_FSM_IDLE, newfsmStateReason(fsmInvalidMsg, m, nil)