From 10a4df690c18894845e425da5e66931fe40d7e97 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 21 Feb 2014 17:21:59 -0500 Subject: [PATCH] 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. --- src/devices/nm-device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index a8b200f5b4..e5db1f5f89 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -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); }