diff mbox series

socket: Do not use AF_NETLINK in __opensock

Message ID 87ilwq6bu1.fsf@oldenburg.str.redhat.com
State Superseded
Headers show
Series socket: Do not use AF_NETLINK in __opensock | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Florian Weimer Nov. 17, 2021, 3:28 p.m. UTC
It is not possible to use interface ioctls with netlink sockets
in all Linux kernels.

---
 socket/opensock.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Andreas Schwab Nov. 17, 2021, 3:40 p.m. UTC | #1
On Nov 17 2021, Florian Weimer via Libc-alpha wrote:

> diff --git a/socket/opensock.c b/socket/opensock.c
> index ff94d27a61..cf4731abf1 100644
> --- a/socket/opensock.c
> +++ b/socket/opensock.c
> @@ -29,12 +29,6 @@ __opensock (void)
>    int type = SOCK_DGRAM | SOCK_CLOEXEC;
>    int fd;
>  
> -#ifdef AF_NETLINK
> -  fd = __socket (AF_NETLINK, type, 0);
> -  if (fd >= 0)
> -    return fd;
> -#endif

The comment is now outdated.

Andreas.
diff mbox series

Patch

diff --git a/socket/opensock.c b/socket/opensock.c
index ff94d27a61..cf4731abf1 100644
--- a/socket/opensock.c
+++ b/socket/opensock.c
@@ -29,12 +29,6 @@  __opensock (void)
   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;