X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbasic%2Fsocket-util.c;h=73e19310e065eb2f112d207b13f23221085facf9;hp=404a1ba81aeffa7e3e5dcbef379250fe381f1f82;hb=6b05aab633fa55aa3070f186869d8fa219be2f38;hpb=eca14e5e08060323f5aace8c44f13e611ac9246d diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index 404a1ba81..73e19310e 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - /*** This file is part of systemd. @@ -442,17 +440,10 @@ const char* socket_address_get_path(const SocketAddress *a) { #endif // 0 bool socket_ipv6_is_supported(void) { - _cleanup_free_ char *l = NULL; - - if (access("/sys/module/ipv6", F_OK) != 0) + if (access("/proc/net/sockstat6", F_OK) != 0) return false; - /* If we can't check "disable" parameter, assume enabled */ - if (read_one_line_file("/sys/module/ipv6/parameters/disable", &l) < 0) - return true; - - /* If module was loaded with disable=1 no IPv6 available */ - return l[0] == '0'; + return true; } #if 0 /// UNNEEDED by elogind