diff options
Diffstat (limited to 'bgpd/bgpd.c')
| -rw-r--r-- | bgpd/bgpd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 69312f69cb..8352a9b631 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1564,8 +1564,13 @@ 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)) - peer_flag_set(peer, PEER_FLAG_ENFORCE_FIRST_AS); + /* By default this is enabled, thus we need to mark it as + * inverted in order to display correctly in the configuration. + */ + if (CHECK_FLAG(bgp->flags, BGP_FLAG_ENFORCE_FIRST_AS)) { + SET_FLAG(peer->flags_invert, PEER_FLAG_ENFORCE_FIRST_AS); + SET_FLAG(peer->flags, PEER_FLAG_ENFORCE_FIRST_AS); + } if (CHECK_FLAG(bgp->flags, BGP_FLAG_SOFT_VERSION_CAPABILITY)) peer_flag_set(peer, PEER_FLAG_CAPABILITY_SOFT_VERSION); |
