* [PATCH v2] socket: Do not use AF_NETLINK in __opensock
@ 2021-11-17 16:07 Florian Weimer
2021-11-18 19:28 ` Adhemerval Zanella
0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2021-11-17 16:07 UTC (permalink / raw)
To: libc-alpha
It is not possible to use interface ioctls with netlink sockets
in all Linux kernels.
---
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] socket: Do not use AF_NETLINK in __opensock
2021-11-17 16:07 [PATCH v2] socket: Do not use AF_NETLINK in __opensock Florian Weimer
@ 2021-11-18 19:28 ` Adhemerval Zanella
0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella @ 2021-11-18 19:28 UTC (permalink / raw)
To: Florian Weimer, libc-alpha
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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-18 19:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 16:07 [PATCH v2] socket: Do not use AF_NETLINK in __opensock Florian Weimer
2021-11-18 19:28 ` Adhemerval Zanella
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).