summaryrefslogtreecommitdiff
path: root/ospfd/ospf_network.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-10-21 13:56:26 -0400
committerMark Stapp <mjs@voltanet.io>2020-10-22 13:37:25 -0400
commit96b663a381c2e90fa663d69fce4e40f0be698e58 (patch)
tree061e8297387581dcb5e730f405bf9a5596a58dc1 /ospfd/ospf_network.c
parent84de5a245a3eb17619588a535b9f408ce802a8c9 (diff)
ospfd: replace inet_ntoa
Stop using inet_ntoa, use %pI4 etc or inet_ntop instead Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'ospfd/ospf_network.c')
-rw-r--r--ospfd/ospf_network.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c
index 28aec41eba..00fbdc21a1 100644
--- a/ospfd/ospf_network.c
+++ b/ospfd/ospf_network.c
@@ -53,14 +53,14 @@ int ospf_if_add_allspfrouters(struct ospf *top, struct prefix *p,
if (ret < 0)
flog_err(
EC_LIB_SOCKET,
- "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllSPFRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?",
- top->fd, inet_ntoa(p->u.prefix4), ifindex,
+ "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllSPFRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?",
+ top->fd, &p->u.prefix4, ifindex,
safe_strerror(errno));
else {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "interface %s [%u] join AllSPFRouters Multicast group.",
- inet_ntoa(p->u.prefix4), ifindex);
+ "interface %pI4 [%u] join AllSPFRouters Multicast group.",
+ &p->u.prefix4, ifindex);
}
return ret;
@@ -76,14 +76,14 @@ int ospf_if_drop_allspfrouters(struct ospf *top, struct prefix *p,
ifindex);
if (ret < 0)
flog_err(EC_LIB_SOCKET,
- "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllSPFRouters): %s",
- top->fd, inet_ntoa(p->u.prefix4), ifindex,
+ "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllSPFRouters): %s",
+ top->fd, &p->u.prefix4, ifindex,
safe_strerror(errno));
else {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "interface %s [%u] leave AllSPFRouters Multicast group.",
- inet_ntoa(p->u.prefix4), ifindex);
+ "interface %pI4 [%u] leave AllSPFRouters Multicast group.",
+ &p->u.prefix4, ifindex);
}
return ret;
@@ -101,13 +101,13 @@ int ospf_if_add_alldrouters(struct ospf *top, struct prefix *p,
if (ret < 0)
flog_err(
EC_LIB_SOCKET,
- "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllDRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?",
- top->fd, inet_ntoa(p->u.prefix4), ifindex,
+ "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllDRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?",
+ top->fd, &p->u.prefix4, ifindex,
safe_strerror(errno));
else
zlog_debug(
- "interface %s [%u] join AllDRouters Multicast group.",
- inet_ntoa(p->u.prefix4), ifindex);
+ "interface %pI4 [%u] join AllDRouters Multicast group.",
+ &p->u.prefix4, ifindex);
return ret;
}
@@ -122,13 +122,13 @@ int ospf_if_drop_alldrouters(struct ospf *top, struct prefix *p,
ifindex);
if (ret < 0)
flog_err(EC_LIB_SOCKET,
- "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllDRouters): %s",
- top->fd, inet_ntoa(p->u.prefix4), ifindex,
+ "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllDRouters): %s",
+ top->fd, &p->u.prefix4, ifindex,
safe_strerror(errno));
else
zlog_debug(
- "interface %s [%u] leave AllDRouters Multicast group.",
- inet_ntoa(p->u.prefix4), ifindex);
+ "interface %pI4 [%u] leave AllDRouters Multicast group.",
+ &p->u.prefix4, ifindex);
return ret;
}
@@ -161,8 +161,8 @@ int ospf_if_ipmulticast(struct ospf *top, struct prefix *p, ifindex_t ifindex)
ret = setsockopt_ipv4_multicast_if(top->fd, p->u.prefix4, ifindex);
if (ret < 0)
flog_err(EC_LIB_SOCKET,
- "can't setsockopt IP_MULTICAST_IF(fd %d, addr %s, ifindex %u): %s",
- top->fd, inet_ntoa(p->u.prefix4), ifindex,
+ "can't setsockopt IP_MULTICAST_IF(fd %d, addr %pI4, ifindex %u): %s",
+ top->fd, &p->u.prefix4, ifindex,
safe_strerror(errno));
#endif