Skip to content

Commit

Permalink
Merge pull request #14967 from opensourcerouting/fix/bgpd_enforce_fir…
Browse files Browse the repository at this point in the history
…st_as_peer-groups

bgpd: Respect enforce-first-as command for peer-groups according to the defaults
  • Loading branch information
donaldsharp authored Dec 10, 2023
2 parents f6864ec + ec2375e commit d41c757
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d41c757

Please sign in to comment.