Use sysctl CTL_NET.PF_INET6 to check if IPv6 is available or not.
authorclaudio <claudio@openbsd.org>
Tue, 19 Jul 2022 09:25:44 +0000 (09:25 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 19 Jul 2022 09:25:44 +0000 (09:25 +0000)
commit6ebd73a51261c05eb5da93c703031bc26bd5a839
tree40c03bf54aabcc84f3b8f79fb0db25c903af8b5c
parent31b21a38333ad3c84dbcbb56c305e4b24a76b4f8
Use sysctl CTL_NET.PF_INET6 to check if IPv6 is available or not.
With this sysconf(3) no longer needs the inet pledge.
The kernel has been updated for this for a while now.
OK sthen@ deraadt@
lib/libc/gen/sysconf.c