From: Yeonggi Kim Date: Thu, 15 Oct 2026 23:45:58 +0000 (+0900) Subject: BUG/MINOR: quic: handle EINTR on emission of packets without connection X-Git-Tag: v3.5-dev10~178 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=205a071d9d9148cc9b893a454370f129bd9115fc;p=haproxy.git BUG/MINOR: quic: handle EINTR on emission of packets without connection 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. --- diff --git a/src/quic_sock.c b/src/quic_sock.c index b4ea07eed..2af4b8f3e 100644 --- a/src/quic_sock.c +++ b/src/quic_sock.c @@ -837,6 +837,7 @@ ssize_t quic_lstnr_sock_send(struct listener *l, const void *buf, size_t len, struct sockaddr_storage *src, struct sockaddr_storage *dst) { + ssize_t ret; struct msghdr msg; struct iovec vec; struct cmsghdr *cmsg = NULL; @@ -871,7 +872,11 @@ ssize_t quic_lstnr_sock_send(struct listener *l, const void *buf, size_t len, 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 FD-owned socket.