diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-14 02:42:51 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-06-15 14:56:42 +0200 |
commit | bafa9641446852f7fa15ca12d08a223d345c78ea (patch) | |
tree | 5fb2f36e09a048b61f341ced732ed1a78ac26378 /src/network/networkd-manager.c | |
parent | Merge pull request #12796 from yuwata/test-network-use-wait-online (diff) | |
download | systemd-bafa9641446852f7fa15ca12d08a223d345c78ea.tar.xz systemd-bafa9641446852f7fa15ca12d08a223d345c78ea.zip |
network: read link specific sysctl value
This introduce link_sysctl_ipv6_enabled() and replaces
manager_sysctl_ipv6_enabled() with it.
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r-- | src/network/networkd-manager.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index e1f4d7623f..92e3b0a0f1 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -1382,8 +1382,6 @@ int manager_new(Manager **ret) { if (!m->state_file) return -ENOMEM; - m->sysctl_ipv6_enabled = -1; - r = sd_event_default(&m->event); if (r < 0) return r; @@ -1886,18 +1884,3 @@ int manager_request_product_uuid(Manager *m, Link *link) { return 0; } - -int manager_sysctl_ipv6_enabled(Manager *manager) { - _cleanup_free_ char *value = NULL; - int r; - - if (manager->sysctl_ipv6_enabled >= 0) - return manager->sysctl_ipv6_enabled; - - r = sysctl_read_ip_property(AF_INET6, "all", "disable_ipv6", &value); - if (r < 0) - return log_warning_errno(r, "Failed to read net.ipv6.conf.all.disable_ipv6 sysctl property: %m"); - - manager->sysctl_ipv6_enabled = value[0] == '0'; - return manager->sysctl_ipv6_enabled; -} |