summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@higgsboson.tk>2016-12-19 15:34:07 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-19 15:34:07 +0100
commit29b5ad083a6925efec8e188013d1298742e0baaa (patch)
tree52fdcd6c6e1d643867519b580c17adef463bdc0b /src/network
parent12d6389c14816811c2418062b914b36a8a27ef5d (diff)
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.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-ndisc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index 5320592f7a..5097ab9d72 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -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;
}