diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-10-18 13:21:26 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-10-22 14:32:50 +0200 |
commit | af3b34f6903d395d30795ab2b6feee6530d2f783 (patch) | |
tree | 7963bd0c2b19e4ab43b918be4d8172e1f96e09ac /lib/nexthop.c | |
parent | Merge pull request #7343 from ton31337/fix/prefix2str_to_pFX (diff) | |
download | frr-af3b34f6903d395d30795ab2b6feee6530d2f783.tar.xz frr-af3b34f6903d395d30795ab2b6feee6530d2f783.zip |
lib: Convert inet_ntoa to %pI4
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/nexthop.c')
-rw-r--r-- | lib/nexthop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c index f1575649b..b2fa94569 100644 --- a/lib/nexthop.c +++ b/lib/nexthop.c @@ -431,13 +431,13 @@ const char *nexthop2str(const struct nexthop *nexthop, char *str, int size) break; case NEXTHOP_TYPE_IPV4: case NEXTHOP_TYPE_IPV4_IFINDEX: - snprintf(str, size, "%s if %u", inet_ntoa(nexthop->gate.ipv4), - nexthop->ifindex); + snprintfrr(str, size, "%pI4 if %u", &nexthop->gate.ipv4, + nexthop->ifindex); break; case NEXTHOP_TYPE_IPV6: case NEXTHOP_TYPE_IPV6_IFINDEX: - snprintf(str, size, "%s if %u", inet6_ntoa(nexthop->gate.ipv6), - nexthop->ifindex); + snprintfrr(str, size, "%pI6 if %u", &nexthop->gate.ipv6, + nexthop->ifindex); break; case NEXTHOP_TYPE_BLACKHOLE: snprintf(str, size, "blackhole"); |