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