summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-08-05 14:46:22 +0200
committerHans Dedecker <dedeckeh@gmail.com>2018-08-07 22:14:44 +0200
commit115a694ab9a44cd52a8ab18e07909c753de9fb94 (patch)
tree71b9babad05337a66653f8768354b08007801ce6
parenta0a1e52eb300b574098ae18fc7e6849ff50c2e5e (diff)
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 <dedeckeh@gmail.com>
-rw-r--r--interface-ip.c7
1 files 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;