diff options
author | Tom Gundersen <teg@jklm.no> | 2015-02-12 14:15:41 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-02-12 14:23:02 +0100 |
commit | 5c3072eab6d2e11d89452987b017541d4654ac05 (patch) | |
tree | 533dcc729850bc8684bc40237d83bbd8e0cbec87 | |
parent | 424d110ac010afb6577580aebd1448f28d7d982d (diff) |
networkd: explicitly enable/disable ipv6ll addresses
The kernel does not like getting an empty container, so just always pass the parameter, even if
it is the default.
-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)) { |