mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 04:40:32 +01:00
core: let kernel add IPv6LL address when method=ignore (rh #1132938)
The IPv6LL address handling in userspace patches failed to handle the case where the IPv6 method was 'ignore'. Previously the kernel would usually add the IPv6LL address itself, but if NM has turned off kernel IPv6LL then obviously this wouldn't happen. So when the method is 'ignore', turn off userspace IPv6LL handling and bounce disable_ipv6 to make the kernel add the IPv6LL address if it wants to.
This commit is contained in:
parent
7e548d962a
commit
d37b7bed30
1 changed files with 15 additions and 1 deletions
|
|
@ -3988,11 +3988,25 @@ act_stage3_ip6_config_start (NMDevice *self,
|
|||
priv->dhcp6_mode = NM_RDISC_DHCP_LEVEL_NONE;
|
||||
|
||||
if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0) {
|
||||
if (!priv->master)
|
||||
if (!priv->master) {
|
||||
/* When activating an IPv6 'ignore' connection we need to revert back
|
||||
* to kernel IPv6LL, but the kernel won't actually assign an address
|
||||
* to the interface until disable_ipv6 is bounced.
|
||||
*/
|
||||
set_nm_ipv6ll (self, FALSE);
|
||||
nm_device_ipv6_sysctl_set (self, "disable_ipv6", "1");
|
||||
restore_ip6_properties (self);
|
||||
}
|
||||
return NM_ACT_STAGE_RETURN_STOP;
|
||||
}
|
||||
|
||||
/* Any method past this point requires an IPv6LL address. Use NM-controlled
|
||||
* IPv6LL if this is not an assumed connection, since assumed connections
|
||||
* will already have IPv6 set up.
|
||||
*/
|
||||
if (!nm_device_uses_generated_assumed_connection (self))
|
||||
set_nm_ipv6ll (self, TRUE);
|
||||
|
||||
/* Re-enable IPv6 on the interface */
|
||||
set_disable_ipv6 (self, "0");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue