mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 05:10:09 +01:00
ip6: only honor kernel-provided RA flags if an RA was received (rh #588560)
The kernel apparently caches the value and will send Managed/Other flags in the newlink message even if the router is no longer reachable and and RA hasn't been received for a while. So we need to make sure we check for IF_RA_RCVD before paying attention to Managed/Other.
This commit is contained in:
parent
f3057a6844
commit
3e68d33583
1 changed files with 4 additions and 3 deletions
|
|
@ -390,9 +390,10 @@ nm_ip6_device_sync_from_netlink (NMIP6Device *device, gboolean config_changed)
|
|||
device->iface, state_to_string (device->state));
|
||||
|
||||
/* We only care about router advertisements if we want a real IPv6 address */
|
||||
if (device->target_state == NM_IP6_DEVICE_GOT_ADDRESS) {
|
||||
if ( (device->ra_flags & IF_RA_RCVD)
|
||||
&& (device->state < NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT))
|
||||
if ( (device->target_state == NM_IP6_DEVICE_GOT_ADDRESS)
|
||||
&& (device->ra_flags & IF_RA_RCVD)) {
|
||||
|
||||
if (device->state < NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT)
|
||||
device->state = NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT;
|
||||
|
||||
if (device->ra_flags & IF_RA_MANAGED) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue