From: Donald Sharp Date: Fri, 17 Sep 2021 16:23:37 +0000 (-0400) Subject: zebra: Fix ignored return value from inet_pton X-Git-Tag: base_8.1~44^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F9636%2Fhead;p=mirror%2Ffrr.git zebra: Fix ignored return value from inet_pton Signed-off-by: Donald Sharp --- 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);