Skip to content

Commit

Permalink
networkd: Allow ndisc client and radv to configure on later stage
Browse files Browse the repository at this point in the history
The conf
```
[Match]
Name=enp7s0f0

[Network]
DHCP=true
IPv6PrivacyExtensions=true
IPv6AcceptRA=true <============================================
IPv6MTUBytes=1492
DNSDefaultRoute=false

[DHCP]
UseDNS=false
UseHostname=false
UseNTP=false
UseDomains=route
UseMTU=true

[IPv6AcceptRA]
UseDNS=no
UseDomains=route
```

The log
```
enp7s0f0: Gained IPv6LL
Assertion 'link->ndisc' failed at ../systemd-stable/src/network/networkd-link.c:1829, function link_acquire_ipv6_conf(). Abor
Assertion 'link->radv' failed at ../systemd/src/network/networkd-link.c:1842, function link_acquire_ipv6_conf(). Aborting.
Aborted
```

From the conf it's clear that RA accepting is enables. But hmm
initially when networkd started the ipv6ll was not there. Later
on it gained that and tried to start ndisc client and radv .
Hence crashed. So allow ndisc client to configure on later stage.

Closes systemd#12452
  • Loading branch information
Susant Sahani committed May 1, 2019
1 parent 64538af commit d3ede25
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/network/networkd-link.c
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,11 @@ static int link_acquire_ipv6_conf(Link *link) {
assert(link);

if (link_ipv6_accept_ra_enabled(link)) {
assert(link->ndisc);
if (!link->ndisc) {
r = ndisc_configure(link);
if (r < 0)
return r;
}

log_link_debug(link, "Discovering IPv6 routers");

Expand All @@ -1835,9 +1839,14 @@ static int link_acquire_ipv6_conf(Link *link) {
}

if (link_radv_enabled(link)) {
assert(link->radv);
assert(in_addr_is_link_local(AF_INET6, (const union in_addr_union*)&link->ipv6ll_address) > 0);

if (!link->radv) {
r = radv_configure(link);
if (r < 0)
return r;
}

log_link_debug(link, "Starting IPv6 Router Advertisements");

r = sd_radv_start(link->radv);
Expand Down

0 comments on commit d3ede25

Please sign in to comment.