mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
basic: fix for IPv6 status (#4224)
Even if ``` cat /proc/sys/net/ipv6/conf/all/disable_ipv6 1 ``` is disabled cat /proc/net/sockstat6 ``` TCP6: inuse 2 UDP6: inuse 1 UDPLITE6: inuse 0 RAW6: inuse 0 FRAG6: inuse 0 memory 0 ``` Looking for /proc/net/if_inet6 is the right choice.
This commit is contained in:
committed by
Martin Pitt
parent
b4c6f71b82
commit
629abfc23f
@@ -441,7 +441,7 @@ const char* socket_address_get_path(const SocketAddress *a) {
|
||||
}
|
||||
|
||||
bool socket_ipv6_is_supported(void) {
|
||||
if (access("/proc/net/sockstat6", F_OK) != 0)
|
||||
if (access("/proc/net/if_inet6", F_OK) != 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user