projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12d6389
)
networkd-ndisc: handle missing mtu gracefully (#4913)
author
Jörg Thalheim
<joerg@higgsboson.tk>
Mon, 19 Dec 2016 14:34:07 +0000
(15:34 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 19 Dec 2016 14:34:07 +0000
(15:34 +0100)
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.
src/network/networkd-ndisc.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-ndisc.c
b/src/network/networkd-ndisc.c
index
5320592
..
5097ab9
100644
(file)
--- 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;
}