]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Avoid calling comm_point_udp_ancil_callback from comm_point_create_udp
authorPhilip Homburg <philip@nlnetlabs.nl>
Thu, 7 Sep 2023 14:23:11 +0000 (16:23 +0200)
committerPhilip Homburg <philip@nlnetlabs.nl>
Thu, 7 Sep 2023 14:35:22 +0000 (16:35 +0200)
services/listen_dnsport.c
util/netevent.c

index 259347a367e45ccb94706693e96b91b1146c68b8..753550978a0742d92cbb4145c2b71b6c1da8a9bc 100644 (file)
@@ -1327,7 +1327,9 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
                        log_warn("socket timestamping is not available");
                }
                if(!port_insert(list, s, is_dnscrypt
-                       ?listen_type_udp_dnscrypt:listen_type_udp,
+                       ?listen_type_udp_dnscrypt :
+                       (sock_queue_timeout ?
+                               listen_type_udpancil:listen_type_udp),
                        is_pp2, ub_sock)) {
                        sock_close(s);
                        if(ub_sock->addr)
index 9f4a6e6c3804a17584194e59c59d55a5346c5c29..2c03cfd6009d88ed322206421ee4e23c76c15239 100644 (file)
@@ -3854,11 +3854,7 @@ comm_point_create_udp(struct comm_base *base, int fd, sldns_buffer* buffer,
        evbits = UB_EV_READ | UB_EV_PERSIST;
        /* ub_event stuff */
        c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
-#if defined(USE_WINSOCK) || !(defined(AF_INET6) && defined(IPV6_PKTINFO) && defined(HAVE_RECVMSG))
                comm_point_udp_callback, c);
-#else
-               comm_point_udp_ancil_callback, c);
-#endif
        if(c->ev->ev == NULL) {
                log_err("could not baseset udp event");
                comm_point_delete(c);