[PATCH] socket: Do not use AF_NETLINK in __opensock

Florian Weimer fweimer@redhat.com
Wed Nov 17 15:28:22 GMT 2021


It is not possible to use interface ioctls with netlink sockets
in all Linux kernels.

---
 socket/opensock.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/socket/opensock.c b/socket/opensock.c
index ff94d27a61..cf4731abf1 100644
--- a/socket/opensock.c
+++ b/socket/opensock.c
@@ -29,12 +29,6 @@ __opensock (void)
   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;



More information about the Libc-alpha mailing list