mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-11 15:18:06 +00:00
Merge pull request #13947 from opensourcerouting/feature/bgpd_show_version_if_description_is_not_defined
bgpd: Show neighbors software version if description is not set
This commit is contained in:
commit
91336417f5
@ -11854,7 +11854,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
|
|||||||
&peer->ibuf->count,
|
&peer->ibuf->count,
|
||||||
memory_order_relaxed);
|
memory_order_relaxed);
|
||||||
|
|
||||||
vty_out(vty, "4 ");
|
vty_out(vty, "4");
|
||||||
vty_out(vty, ASN_FORMAT_SPACE(bgp->asnotation),
|
vty_out(vty, ASN_FORMAT_SPACE(bgp->asnotation),
|
||||||
&peer->as);
|
&peer->as);
|
||||||
if (show_wide)
|
if (show_wide)
|
||||||
@ -11930,14 +11930,23 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
|
|||||||
}
|
}
|
||||||
/* Make sure `Desc` column is the lastest in
|
/* Make sure `Desc` column is the lastest in
|
||||||
* the output.
|
* the output.
|
||||||
|
* If the description is not set, try
|
||||||
|
* to print the software version if the
|
||||||
|
* capability is enabled and received.
|
||||||
*/
|
*/
|
||||||
if (peer->desc)
|
if (peer->desc)
|
||||||
vty_out(vty, " %s",
|
vty_out(vty, " %s",
|
||||||
bgp_peer_description_stripped(
|
bgp_peer_description_stripped(
|
||||||
peer->desc,
|
peer->desc,
|
||||||
show_wide ? 64 : 20));
|
show_wide ? 64 : 20));
|
||||||
else
|
else if (peer->soft_version) {
|
||||||
|
vty_out(vty, " %s",
|
||||||
|
bgp_peer_description_stripped(
|
||||||
|
peer->soft_version,
|
||||||
|
show_wide ? 64 : 20));
|
||||||
|
} else {
|
||||||
vty_out(vty, " N/A");
|
vty_out(vty, " N/A");
|
||||||
|
}
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,10 +66,10 @@ extern char *asn_asn2string(const as_t *as, char *buf, size_t len,
|
|||||||
((mode == ASNOTATION_DOT) ? "%pASD" : \
|
((mode == ASNOTATION_DOT) ? "%pASD" : \
|
||||||
((mode == ASNOTATION_DOTPLUS) ? "%pASE" : \
|
((mode == ASNOTATION_DOTPLUS) ? "%pASE" : \
|
||||||
"%pASP"))
|
"%pASP"))
|
||||||
#define ASN_FORMAT_SPACE(mode) \
|
#define ASN_FORMAT_SPACE(mode) \
|
||||||
((mode == ASNOTATION_DOT) ? "%10pASD" : \
|
((mode == ASNOTATION_DOT) \
|
||||||
((mode == ASNOTATION_DOTPLUS) ? "%10pASE" : \
|
? "%11pASD" \
|
||||||
"%10pASP"))
|
: ((mode == ASNOTATION_DOTPLUS) ? "%11pASE" : "%11pASP"))
|
||||||
|
|
||||||
/* for test */
|
/* for test */
|
||||||
extern void asn_relax_as_zero(bool relax);
|
extern void asn_relax_as_zero(bool relax);
|
||||||
|
Loading…
Reference in New Issue
Block a user