uint16_t send_holdtime;
as_t local_as;
struct peer *peer = connection->peer;
+ bool ext_opt_params = false;
if (CHECK_FLAG(peer->flags, PEER_FLAG_TIMER))
send_holdtime = peer->holdtime;
/* Set capabilities */
if (CHECK_FLAG(peer->flags, PEER_FLAG_EXTENDED_OPT_PARAMS)) {
- (void)bgp_open_capability(s, peer, true);
+ ext_opt_params = true;
+ (void)bgp_open_capability(s, peer, ext_opt_params);
} else {
struct stream *tmp = stream_new(STREAM_SIZE(s));
stream_copy(tmp, s);
- if (bgp_open_capability(tmp, peer, false)
- > BGP_OPEN_NON_EXT_OPT_LEN) {
+ if (bgp_open_capability(tmp, peer, ext_opt_params) >
+ BGP_OPEN_NON_EXT_OPT_LEN) {
stream_free(tmp);
- (void)bgp_open_capability(s, peer, true);
+ ext_opt_params = true;
+ (void)bgp_open_capability(s, peer, ext_opt_params);
} else {
stream_copy(s, tmp);
stream_free(tmp);
bgp_packet_set_size(s);
if (bgp_debug_neighbor_events(peer))
- zlog_debug("%pBP fd %d sending OPEN, version %d, my as %u, holdtime %d, id %pI4",
- peer, peer->connection->fd, BGP_VERSION_4, local_as,
- send_holdtime, &peer->local_id);
+ zlog_debug("%pBP fd %d sending OPEN%s, version %d, my as %u, holdtime %d, id %pI4",
+ peer, peer->connection->fd,
+ ext_opt_params ? " (Extended)" : "", BGP_VERSION_4,
+ local_as, send_holdtime, &peer->local_id);
/* Dump packet if debug option is set. */
/* bgp_packet_dump (s); */