In certain error conditions it is possible to
attempt to send packets when the socket is not ready
instead of dumping to the log a million error messages
only note the issue if we have packet debugs on.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
return -1;
break;
default:
- pim_inet4_dump ("<dst?>", ip->ip_dst, dst_str, sizeof (dst_str));
- zlog_warn ("%s: sendto() failure to %s: fd=%d msg_size=%zd: errno=%d: %s",
- __PRETTY_FUNCTION__,
- dst_str, fd, len,
- errno, safe_strerror(errno));
+ if (PIM_DEBUG_PIM_PACKETS)
+ {
+ pim_inet4_dump ("<dst?>", ip->ip_dst, dst_str, sizeof (dst_str));
+ zlog_warn ("%s: sendto() failure to %s: fd=%d msg_size=%zd: errno=%d: %s",
+ __PRETTY_FUNCTION__,
+ dst_str, fd, len,
+ errno, safe_strerror(errno));
+ }
return -1;
break;
}