From: Yu Watanabe Date: Mon, 31 Mar 2025 14:19:52 +0000 (+0900) Subject: tree-wide: extend the comment about the issue in __convert_scm_timestamps() X-Git-Tag: v258-rc1~984^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F36905%2Fhead;p=thirdparty%2Fsystemd.git tree-wide: extend the comment about the issue in __convert_scm_timestamps() --- diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 5ae1f163914..13a95ef015d 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -1509,7 +1509,8 @@ int server_process_datagram( * limit is known. * * Here, we need to explicitly initialize the buffer with zero, as glibc has a bug in - * __convert_scm_timestamps(), which assumes the buffer is initialized. See #20741. */ + * __convert_scm_timestamps(), which assumes the buffer is initialized. See #20741. + * The issue is fixed on glibc-2.35 (8fba672472ae0055387e9315fc2eddfa6775ca79). */ CMSG_BUFFER_TYPE(CMSG_SPACE(sizeof(struct ucred)) + CMSG_SPACE_TIMEVAL + CMSG_SPACE(sizeof(int)) + /* fd */ diff --git a/src/libsystemd-network/icmp6-util.c b/src/libsystemd-network/icmp6-util.c index 75a64899672..b3e3adfee0e 100644 --- a/src/libsystemd-network/icmp6-util.c +++ b/src/libsystemd-network/icmp6-util.c @@ -118,7 +118,8 @@ int icmp6_receive( struct in6_addr *ret_sender, triple_timestamp *ret_timestamp) { - /* This needs to be initialized with zero. See #20741. */ + /* This needs to be initialized with zero. See #20741. + * The issue is fixed on glibc-2.35 (8fba672472ae0055387e9315fc2eddfa6775ca79). */ CMSG_BUFFER_TYPE(CMSG_SPACE(sizeof(int)) + /* ttl */ CMSG_SPACE_TIMEVAL) control = {}; struct iovec iov = { buffer, size }; diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 9df4a3dd3fd..a319024590d 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -2056,7 +2056,8 @@ static int client_receive_message_udp( sd_dhcp_client *client = ASSERT_PTR(userdata); _cleanup_free_ DHCPMessage *message = NULL; ssize_t len, buflen; - /* This needs to be initialized with zero. See #20741. */ + /* This needs to be initialized with zero. See #20741. + * The issue is fixed on glibc-2.35 (8fba672472ae0055387e9315fc2eddfa6775ca79). */ CMSG_BUFFER_TYPE(CMSG_SPACE_TIMEVAL) control = {}; struct iovec iov; struct msghdr msg = { @@ -2107,7 +2108,8 @@ static int client_receive_message_raw( sd_dhcp_client *client = ASSERT_PTR(userdata); _cleanup_free_ DHCPPacket *packet = NULL; - /* This needs to be initialized with zero. See #20741. */ + /* This needs to be initialized with zero. See #20741. + * The issue is fixed on glibc-2.35 (8fba672472ae0055387e9315fc2eddfa6775ca79). */ CMSG_BUFFER_TYPE(CMSG_SPACE_TIMEVAL + CMSG_SPACE(sizeof(struct tpacket_auxdata))) control = {}; struct iovec iov = {}; diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index 25b4cafaa59..88c51d5458a 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -1225,7 +1225,8 @@ static size_t relay_agent_information_length(const char* agent_circuit_id, const static int server_receive_message(sd_event_source *s, int fd, uint32_t revents, void *userdata) { _cleanup_free_ DHCPMessage *message = NULL; - /* This needs to be initialized with zero. See #20741. */ + /* This needs to be initialized with zero. See #20741. + * The issue is fixed on glibc-2.35 (8fba672472ae0055387e9315fc2eddfa6775ca79). */ CMSG_BUFFER_TYPE(CMSG_SPACE_TIMEVAL + CMSG_SPACE(sizeof(struct in_pktinfo))) control = {}; sd_dhcp_server *server = ASSERT_PTR(userdata); diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 3e992d7cadc..ce7254581f0 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -1289,7 +1289,8 @@ static int client_receive_message( sd_dhcp6_client *client = ASSERT_PTR(userdata); DHCP6_CLIENT_DONT_DESTROY(client); - /* This needs to be initialized with zero. See #20741. */ + /* This needs to be initialized with zero. See #20741. + * The issue is fixed on glibc-2.35 (8fba672472ae0055387e9315fc2eddfa6775ca79). */ CMSG_BUFFER_TYPE(CMSG_SPACE_TIMEVAL) control = {}; struct iovec iov; union sockaddr_union sa = {}; diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 850c3c580ea..e7b962bc30a 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -397,7 +397,8 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re .iov_base = &ntpmsg, .iov_len = sizeof(ntpmsg), }; - /* This needs to be initialized with zero. See #20741. */ + /* This needs to be initialized with zero. See #20741. + * The issue is fixed on glibc-2.35 (8fba672472ae0055387e9315fc2eddfa6775ca79). */ CMSG_BUFFER_TYPE(CMSG_SPACE_TIMESPEC) control = {}; union sockaddr_union server_addr; struct msghdr msghdr = {