networkd-ndisc: handle missing mtu gracefully (#4913)

At least bird's implementation of router advertisement does not
set MTU option by default (instead it supplies an option to the user).
In this case just leave MTU as it is.
This commit is contained in:
Jörg Thalheim 2016-12-19 15:34:07 +01:00 committed by Lennart Poettering
parent 12d6389c14
commit 29b5ad083a

View file

@ -118,7 +118,9 @@ static void ndisc_router_process_default(Link *link, sd_ndisc_router *rt) {
}
r = sd_ndisc_router_get_mtu(rt, &mtu);
if (r < 0) {
if (r == -ENODATA)
mtu = 0;
else if (r < 0) {
log_link_warning_errno(link, r, "Failed to get default router MTU from RA: %m");
return;
}