From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 679753858404; Thu, 3 Feb 2022 19:29:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 679753858404 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/release/2.33/master] socket: Do not use AF_NETLINK in __opensock X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/release/2.33/master X-Git-Oldrev: 9495d729f6bb177d64cd124f0fa3b8891310670c X-Git-Newrev: 55446dd8a2d7b84d966fe4248427c02845b036d4 Message-Id: <20220203192920.679753858404@sourceware.org> Date: Thu, 3 Feb 2022 19:29:20 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2022 19:29:20 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=55446dd8a2d7b84d966fe4248427c02845b036d4 commit 55446dd8a2d7b84d966fe4248427c02845b036d4 Author: Florian Weimer 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 (cherry picked from commit 3d981795cd00cc9b73c3ee5087c308361acd62e5) Diff: --- socket/opensock.c | 9 +-------- 1 file changed, 1 insertion(+), 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;