]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix for wait for udp send to stop when packet is successfully sent.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 31 Aug 2022 14:45:15 +0000 (16:45 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 31 Aug 2022 14:45:15 +0000 (16:45 +0200)
doc/Changelog
util/netevent.c

index 212df9a888b8219a7fb2c7e0af8716a041d4ee44..2ea68e1a22e3a6fc967e6ff56b48d4f46385ba91 100644 (file)
@@ -6,6 +6,7 @@
          blocking socket operations.
        - Fix to wait for blocked write on UDP sockets, with a timeout if it
          takes too long the packet is dropped.
+       - Fix for wait for udp send to stop when packet is successfully sent.
 
 22 August 2022: Wouter
        - Fix #741: systemd socket activation fails on IPv6.
index cf9a38f61fb108679f6bdabf649532d3af8b0755..9c5fb3af368359c527528c74304ff71974c90ca8 100644 (file)
@@ -388,7 +388,7 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
 #endif
                        /* if we set the fd blocking, other threads suddenly
                         * have a blocking fd that they operate on */
-                       while(
+                       while(sent == -1 && (
 #ifndef USE_WINSOCK
                                errno == EAGAIN || errno == EINTR ||
 #  ifdef EWOULDBLOCK
@@ -401,7 +401,7 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
                                WSAGetLastError() == WSAENOBUFS ||
                                WSAGetLastError() == WSAEWOULDBLOCK
 #endif
-                       ) {
+                       )) {
 #if defined(HAVE_POLL) || defined(USE_WINSOCK)
                                struct pollfd p;
                                int pret;
@@ -624,7 +624,7 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
                        WSAGetLastError() == WSAENOBUFS ||
                        WSAGetLastError() == WSAEWOULDBLOCK) {
 #endif
-                       while(
+                       while(sent == -1 && (
 #ifndef USE_WINSOCK
                                errno == EAGAIN || errno == EINTR ||
 #  ifdef EWOULDBLOCK
@@ -637,7 +637,7 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
                                WSAGetLastError() == WSAENOBUFS ||
                                WSAGetLastError() == WSAEWOULDBLOCK
 #endif
-                       ) {
+                       )) {
 #if defined(HAVE_POLL) || defined(USE_WINSOCK)
                                struct pollfd p;
                                int pret;