From: Florian Weimer Date: Mon, 22 Nov 2021 13:41:14 +0000 (+0100) Subject: socket: Do not use AF_NETLINK in __opensock X-Git-Tag: glibc-2.35~318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d981795cd00cc9b73c3ee5087c308361acd62e5;p=thirdparty%2Fglibc.git 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 --- diff --git a/socket/opensock.c b/socket/opensock.c index ff94d27a61b..3e35821f916 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;