Merge pull request #14967 from opensourcerouting/fix/bgpd_enforce_first_as_peer-groups

bgpd: Respect enforce-first-as command for peer-groups according to the defaults
This commit is contained in:
Donald Sharp 2023-12-10 14:32:46 -05:00 committed by GitHub
commit d41c757763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1493,6 +1493,9 @@ struct peer *peer_new(struct bgp *bgp)
SET_FLAG(peer->sflags, PEER_STATUS_CAPABILITY_OPEN);
if (CHECK_FLAG(bgp->flags, BGP_FLAG_ENFORCE_FIRST_AS))
SET_FLAG(peer->flags, PEER_FLAG_ENFORCE_FIRST_AS);
/* Initialize per peer bgp GR FSM */
bgp_peer_gr_init(peer);
@ -1920,9 +1923,6 @@ struct peer *peer_create(union sockunion *su, const char *conf_if,
}
}
if (CHECK_FLAG(bgp->flags, BGP_FLAG_ENFORCE_FIRST_AS))
SET_FLAG(peer->flags, PEER_FLAG_ENFORCE_FIRST_AS);
/* auto shutdown if configured */
if (bgp->autoshutdown)
peer_flag_set(peer, PEER_FLAG_SHUTDOWN);