diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network/networkd-link.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 7b488162f9..f716e8231a 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1058,6 +1058,7 @@ static int link_up_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { static int link_up(Link *link) { _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL; + uint8_t ipv6ll_mode; int r; assert(link); @@ -1109,12 +1110,11 @@ static int link_up(Link *link) { return r; } - if (!link_ipv6ll_enabled(link)) { - r = sd_rtnl_message_append_u8(req, IFLA_INET6_ADDR_GEN_MODE, IN6_ADDR_GEN_MODE_NONE); - if (r < 0) { - log_link_error(link, "Could not append IFLA_INET6_ADDR_GEN_MODE: %s", strerror(-r)); - return r; - } + ipv6ll_mode = link_ipv6ll_enabled(link) ? IN6_ADDR_GEN_MODE_EUI64 : IN6_ADDR_GEN_MODE_NONE; + r = sd_rtnl_message_append_u8(req, IFLA_INET6_ADDR_GEN_MODE, ipv6ll_mode); + if (r < 0) { + log_link_error(link, "Could not append IFLA_INET6_ADDR_GEN_MODE: %s", strerror(-r)); + return r; } if (!in_addr_is_null(AF_INET6, &link->network->ipv6_token)) { |