[PATCH] Linux: Implement opensock using Netlink sockets
Ben Hutchings
ben.hutchings@codethink.co.uk
Mon Jun 18 16:47:00 GMT 2018
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
More information about the Libc-alpha
mailing list