public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/release/2.34/master] socket: Do not use AF_NETLINK in __opensock
Date: Thu,  3 Feb 2022 15:54:15 +0000 (GMT)	[thread overview]
Message-ID: <20220203155415.514393858C3A@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6eaf10cbb78d22eae7999d9de55f6b93999e0860

commit 6eaf10cbb78d22eae7999d9de55f6b93999e0860
Author: Florian Weimer <fweimer@redhat.com>
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  <adhemerval.zanella@linaro.org>
    (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;


                 reply	other threads:[~2022-02-03 15:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220203155415.514393858C3A@sourceware.org \
    --to=fw@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).