diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-05-29 22:17:37 +0200 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-06-22 15:10:56 +0200 |
commit | 0030482f5ecdbab54ee607908b70ce3022728380 (patch) | |
tree | 0ec1514060a9aa5e511517a6d2cd0150c722b97b /bfdd | |
parent | bfdd: implement write_config using northbound (diff) | |
download | frr-0030482f5ecdbab54ee607908b70ce3022728380.tar.xz frr-0030482f5ecdbab54ee607908b70ce3022728380.zip |
bfdd: fix northbound remote-discriminator display
When the remote discriminator hasn't been assigned yet, then we can't
return a value of 0. The value '0' is an invalid discriminator and the
yang handlers will complain about it.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfdd_northbound.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bfdd/bfdd_northbound.c b/bfdd/bfdd_northbound.c index bbc39fc9c..4b21a2116 100644 --- a/bfdd/bfdd_northbound.c +++ b/bfdd/bfdd_northbound.c @@ -546,6 +546,9 @@ bfdd_bfd_sessions_single_hop_stats_remote_discriminator_get_elem( { const struct bfd_session *bs = list_entry; + if (bs->discrs.remote_discr == 0) + return NULL; + return yang_data_new_uint32(xpath, bs->discrs.remote_discr); } |