devices: propagate the hop limit from an IPv6 RA to the kernel config

If we set accept_ra_defrtr=0 then the kernel will ignore the "hop
limit" too. So parse it out of the RA and set it manually.
This commit is contained in:
Dan Winship 2014-02-21 17:21:59 -05:00
parent 10b699c51f
commit 10a4df690c

View file

@ -430,6 +430,7 @@ static const char *ip6_properties_to_save[] = {
"accept_ra_pinfo",
"accept_ra_rtr_pref",
"disable_ipv6",
"hop_limit",
"use_tempaddr",
};
@ -3479,6 +3480,13 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, NMDevice *device
}
}
if (changed & NM_RDISC_CONFIG_HOP_LIMIT) {
char val[16];
g_snprintf (val, sizeof (val), "%d", rdisc->hop_limit);
nm_device_ipv6_sysctl_set (device, "hop_limit", val);
}
nm_device_activate_schedule_ip6_config_result (device);
}