]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Allow 'show bgp neighbor' to indicate authentication or not
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 14 Nov 2016 20:28:17 +0000 (15:28 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 17 May 2017 11:51:23 +0000 (07:51 -0400)
When we configure authentication.  Allow the 'show bgp neighbor'
commands( and their ilk ) to indicate that the peer has
authentication enabled.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_vty.c

index e5734bd76b286767da672fcb868600e019b9a927..c24580ed4e2f2858a11c4e17d426074162085454 100644 (file)
@@ -9227,6 +9227,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
           json_object_int_add(json_neigh, "mraiInterval", p->v_routeadv);
           json_object_int_add(json_neigh, "mraiTimerExpireInMsecs", thread_timer_remain_second (p->t_routeadv) * 1000);
         }
+      if (p->password)
+       json_object_int_add(json_neigh, "authenticationEnabled", 1);
 
       if (p->t_read)
         json_object_string_add(json_neigh, "readThread", "on");
@@ -9254,6 +9256,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
         vty_out (vty, "MRAI (interval %u) timer expires in %ld seconds%s",
                  p->v_routeadv, thread_timer_remain_second (p->t_routeadv),
                  VTY_NEWLINE);
+      if (p->password)
+       vty_out (vty, "Peer Authentication Enabled%s", VTY_NEWLINE);
 
       vty_out (vty, "Read thread: %s  Write thread: %s%s",
                p->t_read ? "on" : "off",