[PATCH] BGP: Output Local AS number in show protocol

Jan-Philipp Litza jpl at plutex.de
Mon Apr 29 09:46:56 CEST 2019


This eases the implementation of agents implementing the SNMP-BGP MIB,
which requires the local AS of a session to be specified.
---
 proto/bgp/bgp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index c332a836..9013e8ea 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -2259,6 +2259,7 @@ bgp_show_proto_info(struct proto *P)
   cli_msg(-1006, "  BGP state:          %s", bgp_state_dsc(p));
   cli_msg(-1006, "    Neighbor address: %I%J", p->cf->remote_ip, p->cf->iface);
   cli_msg(-1006, "    Neighbor AS:      %u", p->cf->remote_as ?: p->remote_as);
+  cli_msg(-1006, "    Local AS:         %u", p->cf->local_as ?: p->local_as);
 
   if (p->gr_active_num)
     cli_msg(-1006, "    Neighbor graceful restart active");
-- 
2.17.1



More information about the Bird-users mailing list