public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH v2] socket: Do not use AF_NETLINK in __opensock
Date: Thu, 18 Nov 2021 16:28:09 -0300	[thread overview]
Message-ID: <a7ae2080-6831-2652-110c-031ec0422986@linaro.org> (raw)
In-Reply-To: <87v90q4vh3.fsf@oldenburg.str.redhat.com>



On 17/11/2021 13:07, Florian Weimer wrote:
> It is not possible to use interface ioctls with netlink sockets
> in all Linux kernels.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> 
> ---
> v2: Comment updated.
>  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:[~2021-11-18 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 16:07 Florian Weimer
2021-11-18 19:28 ` Adhemerval Zanella [this message]

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=a7ae2080-6831-2652-110c-031ec0422986@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@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).