From 115a694ab9a44cd52a8ab18e07909c753de9fb94 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Sun, 5 Aug 2018 14:46:22 +0200 Subject: [PATCH] interface-ip: always override downstream IPv6 mtu Always override the downstream IPv6 mtu in case it differs with the IPv6 mtu of the upstream link. This allows to increase the downstream IPv6 mtu in case RA messages are received on the upstream link having a mtu attribute higher than the downstream IPv6 mtu. At the same be verbose when failing to set the IPv6 mtu on the downstream link. Signed-off-by: Hans Dedecker --- interface-ip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/interface-ip.c b/interface-ip.c index b577e66..b7c1807 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -849,8 +849,11 @@ interface_set_prefix_address(struct device_prefix_assignment *assignment, int mtu = system_update_ipv6_mtu(uplink->l3_dev.dev, 0); int mtu_old = system_update_ipv6_mtu(l3_downlink, 0); - if (mtu > 0 && mtu_old > mtu) - system_update_ipv6_mtu(l3_downlink, mtu); + if (mtu > 0 && mtu_old != mtu) { + if (system_update_ipv6_mtu(l3_downlink, mtu) < 0) + netifd_log_message(L_WARNING, "Failed to set IPv6 mtu to %d" + "on interface '%s'\n", mtu, iface->name); + } } assignment->enabled = true; -- 2.25.1