summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2019-05-08 21:33:05 +0200
committerHans Dedecker <dedeckeh@gmail.com>2019-05-08 21:41:42 +0200
commitf6fb70005a52bb6bd6affd0fdc664664339a616b (patch)
tree8b6a2c380a9c51ef3ae2f437c0b6f4e871116374
parent975a5c42f880f65dba31d10d5e933529e56c5b2f (diff)
interface-ip: fine tune IPv6 mtu warning
Failing to set the IPv6 mtu is only a real issue if the mtu to be set is smaller than the current mtu as in that case it would break IPv6 path mtu; adapt the logic to generate the warning accordingly Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r--interface-ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 0721a84..6900cd7 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -982,7 +982,7 @@ interface_set_prefix_address(struct device_prefix_assignment *assignment,
int mtu_old = system_update_ipv6_mtu(l3_downlink, 0);
if (mtu > 0 && mtu_old != mtu) {
- if (system_update_ipv6_mtu(l3_downlink, mtu) < 0)
+ if (system_update_ipv6_mtu(l3_downlink, mtu) < 0 && mtu < mtu_old)
netifd_log_message(L_WARNING, "Failed to set IPv6 mtu to %d "
"on interface '%s'\n", mtu, iface->name);
}