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 <dedeckeh@gmail.com>
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;