about summary refs log tree commit diff
path: root/socket
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-11-22 14:41:14 +0100
committerFlorian Weimer <fweimer@redhat.com>2022-02-03 16:22:10 +0100
commit6eaf10cbb78d22eae7999d9de55f6b93999e0860 (patch)
tree87dd2f58ca0d27d1a20f008307b3f3383488d08a /socket
parentd8302ba2da1e5ac59a1c4dc1c1207a10fdafdb08 (diff)
downloadglibc-6eaf10cbb78d22eae7999d9de55f6b93999e0860.tar.gz
glibc-6eaf10cbb78d22eae7999d9de55f6b93999e0860.tar.xz
glibc-6eaf10cbb78d22eae7999d9de55f6b93999e0860.zip
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)
Diffstat (limited to 'socket')
-rw-r--r--socket/opensock.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/socket/opensock.c b/socket/opensock.c
index ff94d27a61..3e35821f91 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;