Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • NetworkManager NetworkManager
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 165
    • Issues 165
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • NetworkManagerNetworkManager
  • NetworkManagerNetworkManager
  • Issues
  • #786
Closed
Open
Issue created Aug 27, 2021 by xperia64@xperia64

_set_state_full unmanaged->unavailable transition fails to bring up link on devices dynamically set to managed later

In a setup where all interfaces are explicitly unmanaged by default, and manually set to managed later via nmcli or d-bus, NetworkManager fails to bring the interface up if link wasn't already enabled by some external tool (e.g. ip link set eth0 up).

I have attached my config file for this setup here: 10-unmanage-others.conf

I have narrowed down the issue to this line of nm-device: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/5cd6eafb2aa6fa218fabed70261670cd332680c3/src/core/devices/nm-device.c#L16627

When NetworkManager assumes control of a previously unmanaged device, the intent I believe from the above is that it should try to assume the same settings of whatever was managing the interface prior (NM_DEVICE_SYS_IFACE_STATE_ASSUME). However, if no other utility ever configured the interface, NetworkManager will never bring link up because it's not in the NM_DEVICE_SYS_IFACE_STATE_MANAGED state.

I propose that the above line should check whether link is entirely down in the NM_DEVICE_SYS_IFACE_STATE_ASSUME state, and at least set IFF_UP under these conditions. I know interfaces can have IPs set even in the down state, so those should probably be kept when assuming, but a minimal IFF_UP seems to be needed as I'm not aware of any other means in NetworkManager to explicitly ask for IFF_UP.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking