summaryrefslogtreecommitdiffstats
path: root/nhrpd/nhrp_vty.c
diff options
context:
space:
mode:
authorReuben Dowle <reuben.dowle@4rf.com>2021-04-01 03:06:24 +0200
committerReuben Dowle <reuben.dowle@4rf.com>2021-04-01 03:06:24 +0200
commitd0c9d09aa9a96d35331461514a417269638e581d (patch)
tree43e9506376b338dbfc92b2895f4506d0fa6a29c8 /nhrpd/nhrp_vty.c
parentnhrpd: Make some debug prints more informative (diff)
downloadfrr-d0c9d09aa9a96d35331461514a417269638e581d.tar.xz
frr-d0c9d09aa9a96d35331461514a417269638e581d.zip
nhrpd: Ensure invalid pointer is not used if two NAT extensions received
Also cleanup some minor style issues Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
Diffstat (limited to 'nhrpd/nhrp_vty.c')
-rw-r--r--nhrpd/nhrp_vty.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c
index b91c97f3b..4358605e2 100644
--- a/nhrpd/nhrp_vty.c
+++ b/nhrpd/nhrp_vty.c
@@ -651,8 +651,7 @@ static void show_ip_nhrp_cache(struct nhrp_cache *c, void *pctx)
if (sockunion_family(&nifp->nbma) != AF_UNSPEC) {
sockunion2str(&nifp->nbma, buf[1], sizeof(buf[1]));
sockunion2str(&nifp->nbma, buf[2], sizeof(buf[2]));
- }
- else {
+ } else {
snprintf(buf[1], sizeof(buf[1]), "-");
snprintf(buf[2], sizeof(buf[2]), "-");
}