From: Donatas Abraitis Date: Mon, 18 Sep 2023 12:54:43 +0000 (+0300) Subject: bgpd: Show TCP MSS per neighbor always, despite if it's configured or not X-Git-Tag: base_9.1~65^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=84e14c14dc769f9544fe0f09473183f2fb787b4d;p=mirror%2Ffrr.git bgpd: Show TCP MSS per neighbor always, despite if it's configured or not To show the TCP MSS value per neighbor you have to configure it, otherwise you don't see the actual value. Signed-off-by: Donatas Abraitis --- diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index e76968cdb0..9949ce8187 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -13693,13 +13693,10 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json, } /* Configured and Synced tcp-mss value for peer */ - if (CHECK_FLAG(p->flags, PEER_FLAG_TCP_MSS)) { - sync_tcp_mss = sockopt_tcp_mss_get(p->connection->fd); - json_object_int_add(json_neigh, "bgpTcpMssConfigured", - p->tcp_mss); - json_object_int_add(json_neigh, "bgpTcpMssSynced", - sync_tcp_mss); - } + sync_tcp_mss = sockopt_tcp_mss_get(p->connection->fd); + json_object_int_add(json_neigh, "bgpTcpMssConfigured", + p->tcp_mss); + json_object_int_add(json_neigh, "bgpTcpMssSynced", sync_tcp_mss); /* Extended Optional Parameters Length for BGP OPEN Message */ if (BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(p)) @@ -13779,11 +13776,9 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json, p->delayopen); /* Configured and synced tcp-mss value for peer */ - if (CHECK_FLAG(p->flags, PEER_FLAG_TCP_MSS)) { - sync_tcp_mss = sockopt_tcp_mss_get(p->connection->fd); - vty_out(vty, " Configured tcp-mss is %d", p->tcp_mss); - vty_out(vty, ", synced tcp-mss is %d\n", sync_tcp_mss); - } + sync_tcp_mss = sockopt_tcp_mss_get(p->connection->fd); + vty_out(vty, " Configured tcp-mss is %d", p->tcp_mss); + vty_out(vty, ", synced tcp-mss is %d\n", sync_tcp_mss); /* Extended Optional Parameters Length for BGP OPEN Message */ if (BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(p))