/* Check TLV len against overall LSA */
if (sum + TLV_SIZE(tlvh) > length) {
if (IS_DEBUG_OSPF_GR_HELPER)
- zlog_debug("%s: Malformed packet: Invalid TLV len:%zu",
+ zlog_debug("%s: Malformed packet: Invalid TLV len:%u",
__func__, TLV_SIZE(tlvh));
return OSPF_GR_FAILURE;
}
case GRACE_PERIOD_TYPE:
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_graceperiod)) {
- zlog_debug("%s: Malformed packet: Invalid grace TLV len:%zu",
+ zlog_debug("%s: Malformed packet: Invalid grace TLV len:%u",
__func__, TLV_SIZE(tlvh));
return OSPF_GR_FAILURE;
}
case RESTART_REASON_TYPE:
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_restart_reason)) {
- zlog_debug("%s: Malformed packet: Invalid reason TLV len:%zu",
+ zlog_debug("%s: Malformed packet: Invalid reason TLV len:%u",
__func__, TLV_SIZE(tlvh));
return OSPF_GR_FAILURE;
}
case RESTARTER_IP_ADDR_TYPE:
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_restart_addr)) {
- zlog_debug("%s: Malformed packet: Invalid addr TLV len:%zu",
+ zlog_debug("%s: Malformed packet: Invalid addr TLV len:%u",
__func__, TLV_SIZE(tlvh));
return OSPF_GR_FAILURE;
}
if (IS_DEBUG_OSPF_GR_HELPER)
zlog_debug(
- "%s, Grace LSA received from %s, grace interval:%u, restartreason :%s",
- __PRETTY_FUNCTION__, inet_ntoa(restart_addr),
+ "%s, Grace LSA received from %pI4, grace interval:%u, restartreason :%s",
+ __PRETTY_FUNCTION__, &restart_addr,
grace_interval,
ospf_restart_reason2str(restart_reason));
if (!restarter) {
if (IS_DEBUG_OSPF_GR_HELPER)
zlog_debug(
- "%s, Restarter is not a nbr(%s) for this router.",
+ "%s, Restarter is not a nbr(%pI4) for this router.",
__PRETTY_FUNCTION__,
- inet_ntoa(restart_addr));
+ &restart_addr);
return OSPF_GR_NOT_HELPER;
}
} else
if (!IS_NBR_STATE_FULL(restarter)) {
if (IS_DEBUG_OSPF_GR_HELPER)
zlog_debug(
- "%s, This Neighbour %s is not in FULL state.",
- __PRETTY_FUNCTION__, inet_ntoa(restarter->src));
+ "%s, This Neighbour %pI4 is not in FULL state.",
+ __PRETTY_FUNCTION__, &restarter->src);
restarter->gr_helper_info.rejected_reason =
OSPF_HELPER_NOT_A_VALID_NEIGHBOUR;
return OSPF_GR_NOT_HELPER;
} else {
if (IS_DEBUG_OSPF_GR_HELPER)
zlog_debug(
- "%s, This Router becomes a HELPER for the neighbour %s",
- __PRETTY_FUNCTION__, inet_ntoa(restarter->src));
+ "%s, This Router becomes a HELPER for the neighbour %pI4",
+ __PRETTY_FUNCTION__, &restarter->src);
}
/* Became a Helper to the RESTART neighbour.
if (IS_DEBUG_OSPF_GR_HELPER)
zlog_debug(
- "%s, Topo change detected due to lsa LSID:%s type:%d",
- __PRETTY_FUNCTION__, inet_ntoa(lsa->data->id),
+ "%s, Topo change detected due to lsa LSID:%pI4 type:%d",
+ __PRETTY_FUNCTION__, &lsa->data->id,
lsa->data->type);
lsa->to_be_acknowledged = OSPF_GR_TRUE;
return;
if (IS_DEBUG_OSPF_GR_HELPER)
- zlog_debug("%s, Exiting from HELPER support to %s, due to %s",
- __PRETTY_FUNCTION__, inet_ntoa(nbr->src),
+ zlog_debug("%s, Exiting from HELPER support to %pI4, due to %s",
+ __PRETTY_FUNCTION__, &nbr->src,
ospf_exit_reason2str(reason));
/* Reset helper status*/
}
if (IS_DEBUG_OSPF_GR_HELPER)
- zlog_debug("%s, GraceLSA received for neighbour %s.",
- __PRETTY_FUNCTION__, inet_ntoa(restartAddr));
+ zlog_debug("%s, GraceLSA received for neighbour %pI4",
+ __PRETTY_FUNCTION__, &restartAddr);
/* In case of broadcast links, if RESTARTER is DR_OTHER,
* grace LSA might be received from DR, so fetching the
tlvh = TLV_HDR_NEXT(tlvh)) {
/* Check TLV len */
if (sum + TLV_SIZE(tlvh) > length) {
- vty_out(vty, "%% Invalid TLV length: %zu\n",
+ vty_out(vty, "%% Invalid TLV length: %u\n",
TLV_SIZE(tlvh));
return;
}
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_graceperiod)) {
vty_out(vty,
- "%% Invalid grace TLV length %zu\n",
+ "%% Invalid grace TLV length %u\n",
TLV_SIZE(tlvh));
return;
}
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_restart_reason)) {
vty_out(vty,
- "%% Invalid reason TLV length %zu\n",
+ "%% Invalid reason TLV length %u\n",
TLV_SIZE(tlvh));
return;
}
if (TLV_SIZE(tlvh) <
sizeof(struct grace_tlv_restart_addr)) {
vty_out(vty,
- "%% Invalid addr TLV length %zu\n",
+ "%% Invalid addr TLV length %u\n",
TLV_SIZE(tlvh));
return;
}
restartAddr = (struct grace_tlv_restart_addr *)tlvh;
sum += TLV_SIZE(tlvh);
- vty_out(vty, " Restarter address:%s\n",
- inet_ntoa(restartAddr->addr));
+ vty_out(vty, " Restarter address:%pI4\n",
+ &restartAddr->addr);
break;
default:
vty_out(vty, " Unknown TLV type %d\n",