summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.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_interface.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_interface.c')
-rw-r--r--ospfd/ospf_interface.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 3d2c28b1e4..6e34740166 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -977,17 +977,17 @@ struct ospf_vl_data *ospf_vl_lookup(struct ospf *ospf, struct ospf_area *area,
struct listnode *node;
if (IS_DEBUG_OSPF_EVENT) {
- zlog_debug("%s: Looking for %s", __func__, inet_ntoa(vl_peer));
+ zlog_debug("%s: Looking for %pI4", __func__, &vl_peer);
if (area)
- zlog_debug("%s: in area %s", __func__,
- inet_ntoa(area->area_id));
+ zlog_debug("%s: in area %pI4", __func__,
+ &area->area_id);
}
for (ALL_LIST_ELEMENTS_RO(ospf->vlinks, node, vl_data)) {
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("%s: VL %s, peer %s", __func__,
+ zlog_debug("%s: VL %s, peer %pI4", __func__,
vl_data->vl_oi->ifp->name,
- inet_ntoa(vl_data->vl_peer));
+ &vl_data->vl_peer);
if (area
&& !IPV4_ADDR_SAME(&vl_data->vl_area_id, &area->area_id))
@@ -1109,9 +1109,9 @@ static int ospf_vl_set_params(struct ospf_area *area,
}
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("%s: %s peer address: %s, cost: %d,%schanged",
+ zlog_debug("%s: %s peer address: %pI4, cost: %d,%schanged",
__func__, vl_data->vl_oi->ifp->name,
- inet_ntoa(vl_data->peer_addr), voi->output_cost,
+ &vl_data->peer_addr, voi->output_cost,
(changed ? " " : " un"));
return changed;
@@ -1128,19 +1128,19 @@ void ospf_vl_up_check(struct ospf_area *area, struct in_addr rid,
if (IS_DEBUG_OSPF_EVENT) {
zlog_debug("ospf_vl_up_check(): Start");
- zlog_debug("ospf_vl_up_check(): Router ID is %s",
- inet_ntoa(rid));
- zlog_debug("ospf_vl_up_check(): Area is %s",
- inet_ntoa(area->area_id));
+ zlog_debug("ospf_vl_up_check(): Router ID is %pI4",
+ &rid);
+ zlog_debug("ospf_vl_up_check(): Area is %pI4",
+ &area->area_id);
}
for (ALL_LIST_ELEMENTS_RO(ospf->vlinks, node, vl_data)) {
if (IS_DEBUG_OSPF_EVENT) {
- zlog_debug("%s: considering VL, %s in area %s",
+ zlog_debug("%s: considering VL, %s in area %pI4",
__func__, vl_data->vl_oi->ifp->name,
- inet_ntoa(vl_data->vl_area_id));
- zlog_debug("%s: peer ID: %s", __func__,
- inet_ntoa(vl_data->vl_peer));
+ &vl_data->vl_area_id);
+ zlog_debug("%s: peer ID: %pI4", __func__,
+ &vl_data->vl_peer);
}
if (IPV4_ADDR_SAME(&vl_data->vl_peer, &rid)
@@ -1198,8 +1198,8 @@ int ospf_full_virtual_nbrs(struct ospf_area *area)
{
if (IS_DEBUG_OSPF_EVENT) {
zlog_debug(
- "counting fully adjacent virtual neighbors in area %s",
- inet_ntoa(area->area_id));
+ "counting fully adjacent virtual neighbors in area %pI4",
+ &area->area_id);
zlog_debug("there are %d of them", area->full_vls);
}