Skip to content

Commit

Permalink
networkd: fix ndisc assert 12452
Browse files Browse the repository at this point in the history
allow ndisc client to configure on later stage.

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
```

From the conf it's crear that RA accepting is enables. But hmm
initially when networkd started the ipv6ll was not there. Later
on it gailed that and tried to start ndisc client . 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 79cca6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 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 Down

0 comments on commit 79cca6f

Please sign in to comment.