summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-11-10 21:30:59 +0100
committerTom Gundersen <teg@jklm.no>2015-11-11 15:42:38 +0100
commite7ab854c6cff0d7330d4ddf2d89bf431ca9a0939 (patch)
tree245cb582f55dd847b6ebebab32640e449a50e9a8 /src/network/networkd-address.c
parent3b015d40c19d9338b66bf916d84dec601019c811 (diff)
networkd: link - track state of IPv6LL address
This is managed by the kernel, but we should track whether or not we have a configured IPv6LL address. This fixes two issues: - we now wait for IPv6LL before considering the link ready - we now wait for IPv6LL before attempting to do NDisc or DHCPv6 these protocols relies on an LL address being available.
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r--src/network/networkd-address.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 5231427b14..c0562e5788 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -329,6 +329,7 @@ static int address_release(Address *address) {
int address_update(Address *address, unsigned char flags, unsigned char scope, struct ifa_cacheinfo *cinfo) {
bool ready;
+ int r;
assert(address);
assert(cinfo);
@@ -342,8 +343,17 @@ int address_update(Address *address, unsigned char flags, unsigned char scope, s
if (address->link) {
link_update_operstate(address->link);
- if (!ready && address_is_ready(address))
+ if (!ready && address_is_ready(address)) {
link_check_ready(address->link);
+
+ if (address->family == AF_INET6 &&
+ in_addr_is_link_local(AF_INET6, &address->in_addr) &&
+ !address->link->ipv6ll_address) {
+ r = link_ipv6ll_gained(address->link);
+ if (r < 0)
+ return r;
+ }
+ }
}
return 0;