Retry, Version Negotiation and Stateless Reset packets are emitted
without connection via quic_lstnr_sock_send(). If sendmsg() is
interrupted by a signal, the error is reported to the caller and the
packet is lost, while qc_snd_buf() retries the emission on EINTR.
Also retry the emission on EINTR in quic_lstnr_sock_send(). The impact
is limited, as the listener socket is non-blocking so sendmsg() is not
expected to be interrupted in practice, and a new packet will be
emitted in response to the next ones from the peer.
This may be backported along with the previous patches up to 2.8.
struct sockaddr_storage *src,
struct sockaddr_storage *dst)
{
+ ssize_t ret;
struct msghdr msg;
struct iovec vec;
struct cmsghdr *cmsg = NULL;
cmsg_set_saddr(&msg, &cmsg, src);
}
- return sendmsg(l->rx.fd, &msg, 0);
+ do {
+ ret = sendmsg(l->rx.fd, &msg, 0);
+ } while (ret < 0 && errno == EINTR);
+
+ return ret;
}
/* Receive datagram on <qc> FD-owned socket.