summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-11-06 07:28:12 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-11-06 07:33:10 +0100
commit93e583aaba6f50fbd24aca71189a80fd77277edf (patch)
tree4e8225aa16ed0d556de6ab7c882b0d9d7fde32d4
parentNEWS: mention new rpm macros (diff)
downloadsystemd-93e583aaba6f50fbd24aca71189a80fd77277edf.tar.xz
systemd-93e583aaba6f50fbd24aca71189a80fd77277edf.zip
Revert "ndisc: Also set link hoplimit"
This reverts commit 0ba8374bb8a7032ca13ba98d10e8d7c3378ca9c6. - link->network->ipv6_hop_limit must not be updated, as it may be used by multiple interfaces, - We may receive multiple RA from multiple routers with different hop limit, and we should not make the default hop limit flicking, - First of all, there is no reason that we need to update the default hop limit, - The original issue should be caused by the hash and compare functions for Route object.
-rw-r--r--src/network/networkd-ndisc.c7
-rw-r--r--src/network/networkd-sysctl.c2
-rw-r--r--src/network/networkd-sysctl.h1
3 files changed, 2 insertions, 8 deletions
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index f4f662cf96..08af9c73b9 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -199,12 +199,7 @@ static int ndisc_request_route(Route *in, Link *link, sd_ndisc_router *rt) {
r = sd_ndisc_router_get_hop_limit(rt, &hop_limit);
if (r < 0 && r != -ENODATA)
return log_link_warning_errno(link, r, "Failed to get default router hop limit from RA: %m");
-
- link->network->ipv6_hop_limit = hop_limit;
- r = link_set_ipv6_hop_limit(link);
- if (r < 0)
- log_link_warning_errno(link, r, "Cannot set IPv6 hop limit for interface, ignoring: %m");
- }
+ }
route->source = NETWORK_CONFIG_SOURCE_NDISC;
route->provider.in6 = router;
diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c
index 1a5dffe6f5..0b8169a017 100644
--- a/src/network/networkd-sysctl.c
+++ b/src/network/networkd-sysctl.c
@@ -165,7 +165,7 @@ static int link_set_ipv6_dad_transmits(Link *link) {
return sysctl_write_ip_property_int(AF_INET6, link->ifname, "dad_transmits", link->network->ipv6_dad_transmits);
}
-int link_set_ipv6_hop_limit(Link *link) {
+static int link_set_ipv6_hop_limit(Link *link) {
assert(link);
/* Make this a NOP if IPv6 is not available */
diff --git a/src/network/networkd-sysctl.h b/src/network/networkd-sysctl.h
index 99243f7a25..064438462c 100644
--- a/src/network/networkd-sysctl.h
+++ b/src/network/networkd-sysctl.h
@@ -28,7 +28,6 @@ typedef enum IPReversePathFilter {
int link_set_sysctl(Link *link);
int link_set_ipv6_mtu(Link *link);
-int link_set_ipv6_hop_limit(Link *link);
const char* ipv6_privacy_extensions_to_string(IPv6PrivacyExtensions i) _const_;
IPv6PrivacyExtensions ipv6_privacy_extensions_from_string(const char *s) _pure_;