summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-12-10 16:54:57 +0100
committerDaniel Mack <github@zonque.org>2015-12-10 16:54:57 +0100
commit34130ea7aa69d52047bc4fdbd618c6c0cc44b82e (patch)
treef37b4b65e509c902d2066b429fcc15e4a89d42ef /src
parent4d3f0f66e6f437a8edcee6a9df70bbdf205795b4 (diff)
parent7377964d4c9791a29e3679bafc65f6bfbb0bb019 (diff)
Merge pull request #2134 from jorgenschaefer/detect-ipv6-with-sockstat6
Use /proc/net/sockstat6 to detect IPv6 support
Diffstat (limited to 'src')
-rw-r--r--src/basic/socket-util.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
index 79901a6a06..be144e157d 100644
--- a/src/basic/socket-util.c
+++ b/src/basic/socket-util.c
@@ -440,17 +440,10 @@ const char* socket_address_get_path(const SocketAddress *a) {
}
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;
}
bool socket_address_matches_fd(const SocketAddress *a, int fd) {