summaryrefslogtreecommitdiffstats
path: root/bfdd
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2018-07-11 20:52:56 +0200
committerRafael Zalamena <rzalamena@opensourcerouting.org>2018-08-08 23:25:08 +0200
commitf85498ef0a11564232768f1d7b20eebd384a0be2 (patch)
tree40ced1a1d5cfc31613cb6456897f38aec44edfde /bfdd
parentbfdd: smooth configuration transition (diff)
downloadfrr-f85498ef0a11564232768f1d7b20eebd384a0be2.tar.xz
frr-f85498ef0a11564232768f1d7b20eebd384a0be2.zip
bfdd: show single hop local-address
Show local-address on single hop when configured. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd')
-rw-r--r--bfdd/bfdd_vty.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c
index b9a33b122..bb5f23c40 100644
--- a/bfdd/bfdd_vty.c
+++ b/bfdd/bfdd_vty.c
@@ -366,7 +366,10 @@ static void _display_peer(struct vty *vty, struct bfd_session *bs)
vty_out(vty, " vrf %s", bs->mhop.vrf_name);
vty_out(vty, "\n");
} else {
- vty_out(vty, "\tpeer %s", satostr(&bs->mhop.peer));
+ vty_out(vty, "\tpeer %s", satostr(&bs->shop.peer));
+ if (bs->local_address.sa_sin.sin_family != AF_UNSPEC)
+ vty_out(vty, " local-address %s",
+ satostr(&bs->local_address));
if (bs->shop.port_name[0])
vty_out(vty, " interface %s", bs->shop.port_name);
vty_out(vty, "\n");
@@ -451,6 +454,9 @@ static struct json_object *__display_peer_json(struct bfd_session *bs)
} else {
json_object_boolean_false_add(jo, "multihop");
json_object_string_add(jo, "peer", satostr(&bs->shop.peer));
+ if (bs->local_address.sa_sin.sin_family != AF_UNSPEC)
+ json_object_string_add(jo, "local",
+ satostr(&bs->local_address));
if (bs->shop.port_name[0])
json_object_string_add(jo, "interface",
bs->shop.port_name);