diff options
Diffstat (limited to 'ospfd/ospfd.c')
| -rw-r--r-- | ospfd/ospfd.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index aa063a0759..3718f82c05 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -103,8 +103,8 @@ void ospf_router_id_update(struct ospf *ospf) } if (IS_DEBUG_OSPF_EVENT) - zlog_debug("Router-ID[OLD:%s]: Update", - inet_ntoa(ospf->router_id)); + zlog_debug("Router-ID[OLD:%pI4]: Update", + &ospf->router_id); router_id_old = ospf->router_id; @@ -123,8 +123,8 @@ void ospf_router_id_update(struct ospf *ospf) router_id = ospf->router_id_zebra; if (IS_DEBUG_OSPF_EVENT) - zlog_debug("Router-ID[OLD:%s]: Update to %s", - inet_ntoa(ospf->router_id), inet_ntoa(router_id)); + zlog_debug("Router-ID[OLD:%pI4]: Update to %pI4", + &ospf->router_id, &router_id); if (!IPV4_ADDR_SAME(&router_id_old, &router_id)) { @@ -162,8 +162,8 @@ void ospf_router_id_update(struct ospf *ospf) ospf->router_id = router_id; if (IS_DEBUG_OSPF_EVENT) - zlog_debug("Router-ID[NEW:%s]: Update", - inet_ntoa(ospf->router_id)); + zlog_debug("Router-ID[NEW:%pI4]: Update", + &ospf->router_id); /* Flush (inline) all external LSAs which now match the new router-id, @@ -1324,10 +1324,7 @@ void ospf_ls_upd_queue_empty(struct ospf_interface *oi) } /* remove update event */ - if (oi->t_ls_upd_event) { - thread_cancel(oi->t_ls_upd_event); - oi->t_ls_upd_event = NULL; - } + thread_cancel(&oi->t_ls_upd_event); } void ospf_if_update(struct ospf *ospf, struct interface *ifp) @@ -1338,10 +1335,10 @@ void ospf_if_update(struct ospf *ospf, struct interface *ifp) if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "%s: interface %s ifp->vrf_id %u ospf vrf %s vrf_id %u router_id %s", + "%s: interface %s ifp->vrf_id %u ospf vrf %s vrf_id %u router_id %pI4", __func__, ifp->name, ifp->vrf_id, ospf_vrf_id_to_name(ospf->vrf_id), ospf->vrf_id, - inet_ntoa(ospf->router_id)); + &ospf->router_id); /* OSPF must be ready. */ if (!ospf_is_ready(ospf)) @@ -1378,16 +1375,16 @@ static void ospf_area_type_set(struct ospf_area *area, int type) if (area->external_routing == type) { if (IS_DEBUG_OSPF_EVENT) - zlog_debug("Area[%s]: Types are the same, ignored.", - inet_ntoa(area->area_id)); + zlog_debug("Area[%pI4]: Types are the same, ignored.", + &area->area_id); return; } area->external_routing = type; if (IS_DEBUG_OSPF_EVENT) - zlog_debug("Area[%s]: Configured as %s", - inet_ntoa(area->area_id), + zlog_debug("Area[%pI4]: Configured as %s", + &area->area_id, lookup_msg(ospf_area_type_msg, type, NULL)); switch (area->external_routing) { @@ -2158,7 +2155,7 @@ static int ospf_vrf_disable(struct vrf *vrf) if (IS_DEBUG_OSPF_EVENT) zlog_debug("%s: ospf old_vrf_id %d unlinked", __func__, old_vrf_id); - thread_cancel(ospf->t_read); + thread_cancel(&ospf->t_read); close(ospf->fd); ospf->fd = -1; } |
