Ignore some types of sendto errors

This commit is contained in:
Jeremy Lakeman 2014-06-27 12:45:53 +09:30
parent 42a50e5c13
commit 537a09812c

View File

@ -945,12 +945,13 @@ int overlay_broadcast_ensemble(struct network_destination *destination, struct o
bytes, (size_t)len, 0,
&destination->address.addr, destination->address.addrlen);
if (sent == -1){
WHYF_perror("sendto(fd=%d,len=%zu,addr=%s) on interface %s",
interface->alarm.poll.fd,
(size_t)len,
alloca_socket_address(&destination->address),
interface->name
);
if (errno!=EAGAIN && errno!=EWOULDBLOCK && errno!=ENOENT && errno!=ENOTDIR)
WHYF_perror("sendto(fd=%d,len=%zu,addr=%s) on interface %s",
interface->alarm.poll.fd,
(size_t)len,
alloca_socket_address(&destination->address),
interface->name
);
// close the interface if we had any error while sending broadcast packets,
// unicast packets should not bring the interface down
// TODO mark unicast destination as failed?