network: several fixlets for NDisc (#42218)

Unfortunately, previously the path to test-ndisc-send has been wrong, so
some test cases have not been checked in our mkosi CIs. And two test
cases have been broken.

The test case `test_ndisc_redirect` was not updated when the logic in
networkd was changed by 9142bd5a8e. The
change itself should be OK. So, the test case is updated.

The test case `test_ndisc_mtu` was broken when the commit
32417c1723 is merged. The commit is not
correct, as we cannot set IPv6 MTU larger than interface MTU. So, the
offending commit is reverted.
This commit is contained in:
Luca Boccassi
2026-05-21 12:05:34 +01:00
committed by GitHub
2 changed files with 26 additions and 5 deletions
+3 -3
View File
@@ -545,11 +545,11 @@ int link_set_ipv6_mtu(Link *link, int log_level) {
if (mtu == 0)
return 0;
if (mtu > link->max_mtu) {
if (mtu > link->mtu) {
log_link_full(link, log_level,
"Reducing requested IPv6 MTU %"PRIu32" to the interface's maximum MTU %"PRIu32".",
mtu, link->max_mtu);
mtu = link->max_mtu;
mtu, link->mtu);
mtu = link->mtu;
}
r = sysctl_write_ip_property_uint32(AF_INET6, link->ifname, "mtu", mtu, manager_get_sysctl_shadow(link->manager));