diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-04-27 11:30:28 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-05-17 15:22:16 +0200 |
commit | 66ecc207e203db5434610395cd04c40ae8727b58 (patch) | |
tree | 4808a261a6e58dcdbc9e8616f18cce65b2a49b83 /src/basic/socket-util.c | |
parent | 4f8a2329ef626675895974d53a6afad68a0d255a (diff) |
Prep v229: Add missing fixes from upstream [1/6] src/basic
Diffstat (limited to 'src/basic/socket-util.c')
-rw-r--r-- | src/basic/socket-util.c | 13 |
1 files changed, 2 insertions, 11 deletions
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 |