&address->dst_ipaddr, &address->dst_port,
&address->if_index, recv_time_p);
if (data_size < 0) {
- PERROR("Read error (%zd)", data_size);
+ RATE_LIMIT_GLOBAL(PERROR, "Read error (%zd)", data_size);
return data_size;
}
if (!data_size) {
- WARN("Got no data - ignoring");
+ RATE_LIMIT_GLOBAL(WARN, "Got no data - ignoring");
return 0;
}
* packet may be smaller than the parent UDP packet.
*/
if (!fr_dhcpv4_ok(buffer, data_size, &message_type, &xid)) {
- PWARN("Invalid packet - ignoring");
+ RATE_LIMIT_GLOBAL(PWARN, "Invalid packet - ignoring");
return 0;
}
memcpy(&ipaddr, &packet->giaddr, 4);
if ((packet->opcode == 2) && (ipaddr != address->dst_ipaddr.addr.v4.s_addr)) {
DEBUG2("Ignoring server reply which was not meant for us (was for 0x%x).",
- ntohl(address->dst_ipaddr.addr.v4.s_addr));
+ ntohl(address->dst_ipaddr.addr.v4.s_addr));
return 0;
}
&address->dst_ipaddr, &address->dst_port,
&address->if_index, recv_time_p);
if (data_size < 0) {
- PERROR("Read error (%zd)", data_size);
+ RATE_LIMIT_GLOBAL(PERROR, "Read error (%zd)", data_size);
return data_size;
}
if ((size_t) data_size < sizeof(fr_dhcpv6_packet_t)) {
- WARN("Insufficient data - ignoring");
+ RATE_LIMIT_GLOBAL(WARN, "Insufficient data - ignoring");
return 0;
}
*/
packet = (fr_dhcpv6_packet_t *) buffer;
if (!packet->code || (packet->code >= FR_DHCPV6_MAX_CODE)) {
- WARN("Unsupported packet code %d - ignoring", packet->code);
+ RATE_LIMIT_GLOBAL(WARN, "Unsupported packet code %d - ignoring", packet->code);
return 0;
}
if ((packet->code == FR_DHCPV6_SOLICIT) ||
(packet->code == FR_DHCPV6_REBIND) ||
(packet->code == FR_DHCPV6_CONFIRM)) {
- WARN("Unicast packet %s - ignoring", fr_dhcpv6_packet_types[packet->code]);
+ RATE_LIMIT_GLOBAL(WARN, "Unicast packet %s - ignoring", fr_dhcpv6_packet_types[packet->code]);
return 0;
}
} /* else it was multicast... remember that */