Skip to content

Commit

Permalink
networkd-ndisc: handle missing mtu gracefully (#4913)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mic92 authored and poettering committed Dec 19, 2016
1 parent 12d6389 commit 29b5ad0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/network/networkd-ndisc.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 29b5ad0

Please sign in to comment.