]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Output Local AS number in show protocol
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 30 Apr 2019 11:44:11 +0000 (13:44 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 30 Apr 2019 11:44:11 +0000 (13:44 +0200)
Useful for implementation of agents implementing the SNMP-BGP MIB, which
requires the local AS of a session to be specified.

Thanks to Jan-Philipp Litza for the patch.

proto/bgp/bgp.c

index a5c06783c065f90b30895a9d72c31a0305d99e82..35f1f5884c738424c8147c4d105b131884b70b09 100644 (file)
@@ -2346,6 +2346,7 @@ bgp_show_proto_info(struct proto *P)
     cli_msg(-1006, "    Neighbor address: %I%J", p->remote_ip, p->cf->iface);
 
   cli_msg(-1006, "    Neighbor AS:      %u", p->remote_as);
+  cli_msg(-1006, "    Local AS:         %u", p->cf->local_as);
 
   if (p->gr_active_num)
     cli_msg(-1006, "    Neighbor graceful restart active");