diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-02 16:39:45 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-07 02:50:50 +0900 |
commit | 086b8853d1902bd984144d08cae0e69e11bd583b (patch) | |
tree | 90df7ea04659d2c95ebf5dba60138dc6d765b2d5 /src/network/networkd-link.c | |
parent | 5ae0fb7fb75efeea1a965cda1ff9181f0bcd47d2 (diff) | |
download | systemd-086b8853d1902bd984144d08cae0e69e11bd583b.tar.gz |
network: move link_radv_enabled()
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 0610af16d5..0f48402cb6 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -135,15 +135,6 @@ static bool link_ipv6_enabled(Link *link) { return false; } -static bool link_radv_enabled(Link *link) { - assert(link); - - if (!link_ipv6ll_enabled(link)) - return false; - - return link->network->router_prefix_delegation != RADV_PREFIX_DELEGATION_NONE; -} - bool link_ip_forward_enabled(Link *link, int family) { assert(link); assert(IN_SET(family, AF_INET, AF_INET6)); @@ -1185,7 +1176,7 @@ static int link_acquire_ipv6_conf(Link *link) { return log_link_warning_errno(link, r, "Could not start IPv6 Router Discovery: %m"); } - if (link_radv_enabled(link)) { + if (link->radv) { assert(link->radv); assert(in_addr_is_link_local(AF_INET6, (const union in_addr_union*)&link->ipv6ll_address) > 0); @@ -2406,11 +2397,9 @@ static int link_configure(Link *link) { return r; } - if (link_radv_enabled(link)) { - r = radv_configure(link); - if (r < 0) - return r; - } + r = radv_configure(link); + if (r < 0) + return r; if (link_lldp_rx_enabled(link)) { r = link_lldp_rx_configure(link); |