summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 4fa021ab93..051d920716 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -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);