mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
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:
parent
12d6389c14
commit
29b5ad083a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user