This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Implement opensock using Netlink sockets
- From: Ben Hutchings <ben dot hutchings at codethink dot co dot uk>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Mon, 18 Jun 2018 17:46:58 +0100
- Subject: Re: [PATCH] Linux: Implement opensock using Netlink sockets
- References: <20180618105015.5E8B340292859@oldenburg.str.redhat.com>
On Mon, 2018-06-18 at 12:50 +0200, Florian Weimer wrote:
> inet/tst-inet6_scopeid_pton uses __opensock indirectly, to call ioctl
> with SIOCGIFINDEX, and it still works after this change.
>
> 2018-06-18 Florian Weimer <fweimer@redhat.com>
>
> * sysdeps/unix/sysv/linux/opensock.c (__opensock): Unconditionally
> return a Netlink socket.
> * sysdeps/unix/sysv/linux/s390/opensock.c: Remove file.
[...]
I agree that we can assume the kernel implements AF_NETLINK, but the
available socket address families might be restricted by a security
policy (e.g. systemd's RestrictAddressFamilies property). I'm not sure
whether it's safe to assume that they will always allow AF_NETLINK.
Ben.
--
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom