if (length < OSPF6_LSA_HEADER_SIZE)
{
if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
- zlog_debug ("%s: undersized (%u B) trailing (#%u) LSA header",
+ zlog_debug ("%s: undersized (%zu B) trailing (#%u) LSA header",
__func__, length, counted_lsas);
return MSG_NG;
}
if (lsalen > length)
{
if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
- zlog_debug ("%s: anomaly in %s LSA #%u: declared length is %u B, buffered length is %u B",
+ zlog_debug ("%s: anomaly in %s LSA #%u: declared length is %u B, buffered length is %zu B",
__func__, ospf6_lstype_name (lsah->type), counted_lsas, lsalen, length);
return MSG_NG;
}
zlog_err ("Could not send entire message");
}
-static int
+static uint32_t
ospf6_packet_max(struct ospf6_interface *oi)
{
- return oi->ifmtu - sizeof(struct ip6_hdr);
+ assert (oi->ifmtu > sizeof (struct ip6_hdr));
+ return oi->ifmtu - (sizeof (struct ip6_hdr));
}
int