Skip to content

Commit 93e583a

Browse files
committed
Revert "ndisc: Also set link hoplimit"
This reverts commit 0ba8374. - 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.
1 parent a4a047c commit 93e583a

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/network/networkd-ndisc.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,7 @@ static int ndisc_request_route(Route *in, Link *link, sd_ndisc_router *rt) {
199199
r = sd_ndisc_router_get_hop_limit(rt, &hop_limit);
200200
if (r < 0 && r != -ENODATA)
201201
return log_link_warning_errno(link, r, "Failed to get default router hop limit from RA: %m");
202-
203-
link->network->ipv6_hop_limit = hop_limit;
204-
r = link_set_ipv6_hop_limit(link);
205-
if (r < 0)
206-
log_link_warning_errno(link, r, "Cannot set IPv6 hop limit for interface, ignoring: %m");
207-
}
202+
}
208203

209204
route->source = NETWORK_CONFIG_SOURCE_NDISC;
210205
route->provider.in6 = router;

src/network/networkd-sysctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static int link_set_ipv6_dad_transmits(Link *link) {
165165
return sysctl_write_ip_property_int(AF_INET6, link->ifname, "dad_transmits", link->network->ipv6_dad_transmits);
166166
}
167167

168-
int link_set_ipv6_hop_limit(Link *link) {
168+
static int link_set_ipv6_hop_limit(Link *link) {
169169
assert(link);
170170

171171
/* Make this a NOP if IPv6 is not available */

src/network/networkd-sysctl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ typedef enum IPReversePathFilter {
2828

2929
int link_set_sysctl(Link *link);
3030
int link_set_ipv6_mtu(Link *link);
31-
int link_set_ipv6_hop_limit(Link *link);
3231

3332
const char* ipv6_privacy_extensions_to_string(IPv6PrivacyExtensions i) _const_;
3433
IPv6PrivacyExtensions ipv6_privacy_extensions_from_string(const char *s) _pure_;

0 commit comments

Comments
 (0)