summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-09-17 12:23:37 -0400
committerDonald Sharp <sharpd@nvidia.com>2021-09-20 09:20:46 -0400
commitb51c6597759eb2418a79c901f2678aaf037b83d6 (patch)
tree91c927425dcb228526e4af5e097e3decb5e292ef
parent88dde69cb6131c0e1a57cd069c802f71a6c4fa4d (diff)
zebra: Fix ignored return value from inet_pton
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--zebra/zebra_fpm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index 8caabf19e7..43958fdfde 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -1997,7 +1997,8 @@ static int zfpm_init(struct thread_master *master)
zfpm_stats_init(&zfpm_g->cumulative_stats);
memset(&ipv4ll_gateway, 0, sizeof(ipv4ll_gateway));
- inet_pton(AF_INET, ipv4_ll_buf, &ipv4ll_gateway.ipv4);
+ if (inet_pton(AF_INET, ipv4_ll_buf, &ipv4ll_gateway.ipv4) != 1)
+ zlog_warn("inet_pton failed for %s", ipv4_ll_buf);
install_node(&zebra_node);
install_element(ENABLE_NODE, &show_zebra_fpm_stats_cmd);