Fix another 509afcd1d2 SNAFU

This commit is contained in:
Simon Kelley
2025-01-13 10:29:47 +00:00
parent c72c895869
commit 424aaa0f9d

View File

@@ -1840,7 +1840,6 @@ static void check_dns_listeners(time_t now)
struct listener *listener; struct listener *listener;
struct randfd_list *rfl; struct randfd_list *rfl;
int i; int i;
int pipefd[2];
/* Note that handling events here can create or destroy fds and /* Note that handling events here can create or destroy fds and
render the result of the last poll() call invalid. Once render the result of the last poll() call invalid. Once
@@ -1925,7 +1924,7 @@ static void do_tcp_connection(struct listener *listener, time_t now, int slot)
pid_t p; pid_t p;
union mysockaddr tcp_addr; union mysockaddr tcp_addr;
socklen_t tcp_len = sizeof(union mysockaddr); socklen_t tcp_len = sizeof(union mysockaddr);
unsigned char *buff; unsigned char a = 0, *buff;
struct server *s; struct server *s;
int flags, auth_dns; int flags, auth_dns;
struct in_addr netmask; struct in_addr netmask;
@@ -2039,7 +2038,7 @@ static void do_tcp_connection(struct listener *listener, time_t now, int slot)
is sent by the child after it has closed the is sent by the child after it has closed the
netlink socket. */ netlink socket. */
read_write(pipefd[0], buff, 1, RW_READ); read_write(pipefd[0], &a, 1, RW_READ);
#endif #endif
@@ -2080,8 +2079,6 @@ static void do_tcp_connection(struct listener *listener, time_t now, int slot)
{ {
#ifdef HAVE_LINUX_NETWORK #ifdef HAVE_LINUX_NETWORK
/* See comment above re: netlink socket. */ /* See comment above re: netlink socket. */
unsigned char a = 0;
close(daemon->netlinkfd); close(daemon->netlinkfd);
read_write(pipefd[1], &a, 1, RW_WRITE); read_write(pipefd[1], &a, 1, RW_WRITE);
#endif #endif