mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
ndisc: Also set link hoplimit
The per route hop limit does not place the hop limit in the IPv6 header. https://github.com/systemd/systemd/issues/28437#issuecomment-1711055181
This commit is contained in:
parent
c8cb548f0b
commit
0ba8374bb8
@ -199,7 +199,12 @@ 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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
static int link_set_ipv6_hop_limit(Link *link) {
|
||||
int link_set_ipv6_hop_limit(Link *link) {
|
||||
assert(link);
|
||||
|
||||
/* Make this a NOP if IPv6 is not available */
|
||||
|
@ -28,6 +28,7 @@ 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_;
|
||||
|
Loading…
Reference in New Issue
Block a user