From: Hans Dedecker Date: Sun, 5 Aug 2018 12:46:22 +0000 (+0200) Subject: interface-ip: always override downstream IPv6 mtu X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=115a694ab9a44cd52a8ab18e07909c753de9fb94;p=oweals%2Fnetifd.git 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 --- 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;