glibc/glibc-upstream-2.34-107.patch
Florian Weimer 1ae00ffc06 Sync with upstream branch release/2.34/master
Upstream commit: 6eaf10cbb78d22eae7999d9de55f6b93999e0860

- socket: Do not use AF_NETLINK in __opensock
- hurd if_index: Explicitly use AF_INET for if index discovery
- Linux: Simplify __opensock and fix race condition [BZ #28353]
- linux: __get_nprocs_sched: do not feed CPU_COUNT_S with garbage [BZ #28850]
2022-02-03 17:03:14 +01:00

36 lines
1010 B
Diff

commit 6eaf10cbb78d22eae7999d9de55f6b93999e0860
Author: Florian Weimer <fweimer@redhat.com>
Date: Mon Nov 22 14:41:14 2021 +0100
socket: Do not use AF_NETLINK in __opensock
It is not possible to use interface ioctls with netlink sockets
on all Linux kernels.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit 3d981795cd00cc9b73c3ee5087c308361acd62e5)
diff --git a/socket/opensock.c b/socket/opensock.c
index ff94d27a61bd3889..3e35821f91643456 100644
--- a/socket/opensock.c
+++ b/socket/opensock.c
@@ -24,17 +24,10 @@
int
__opensock (void)
{
- /* SOCK_DGRAM is supported by all address families. (Netlink does
- not support SOCK_STREAM.) */
+ /* SOCK_DGRAM is supported by all address families. */
int type = SOCK_DGRAM | SOCK_CLOEXEC;
int fd;
-#ifdef AF_NETLINK
- fd = __socket (AF_NETLINK, type, 0);
- if (fd >= 0)
- return fd;
-#endif
-
fd = __socket (AF_UNIX, type, 0);
if (fd >= 0)
return fd;