NetworkManager 0.9.10 should:

  1. Cooperate with changes made outside of it
    1. Examples of external changes
      1. address and route changes made with /sbin/ip or ifconfig
      2. (bonus) changes to parent/child relationships made via sysfs, brctl, or vconfig
      3. interface renames done with /sbin/ip
    2. These changes should be recognized and reflected in the D-Bus API
      1. in the IP4Config and IP6Config interfaces of NMDevice, which should be updated with new/removed addresses and routes
      2. The changes should be propagated to the device's active NMConnection and the connection marked 'unsaved'
  2. Read and use existing ("foreign") interface configuration on start/restart without touching the interface, until an administrator tells NM to do something with the interface.
    1. addresses and routes assigned to the interface should be preserved and exported via D-Bus
    2. parent/child relationships should be preserved (eg, if interface is a slave, NM should recognize that)
    3. an immediate restart of NM should not change any networking configuration or settings
    4. if an interface was started externally using DHCP:
      1. if it was started by NM (easy to determine from the DHCP client's /proc/xxx/cmdline), and NM was restarted, then NM should recognize this and kill + respawn DHCP with its helper
      2. if it was not started by NM, NM should not touch the existing DHCP client, but simply read the addresses/routes from the interface; yes, this means NM cannot provide the DHCP4Config and DHCP6Config objects, nor does it know anything about DNS servers or search domains, but so be it.
    5. Basically, if a device has existing configuration when NM starts, it is "read-only" until something tells NM to touch it. This doesn't mean we need a "gboolean read_only" in NMDevicePrivate, but that we should modify NetworkManager to ensure that when managing these devices, nothing gets changed at start. This probably involves bypassing most of the activation process and jumping directly from UNMANAGED to ACTIVATED, since we already have all the IP/L2 configuration required, there's no need to go through all those stages. This also ensures the device is not touched.

  3. Caveats
    1. this does not apply to WiFi, 3G/WWAN, WiMAX, Bluetooth, ADSL, VPNs, or wired 802.1x

      1. we may try to make this work in the future, but this often requires modifying helpers like vpnc, openvpn, ppp, etc to report current runtime settings, otherwise there's no way to figure out what the non-address/route values (like DNS, searches, gateway, etc) were when the connection was started
  4. Questions
    1. how do we determine that an externally modified device is "down"? one possibility is if all routes and addresses are removed, but this ignores Layer2-only configurations
    2. How do we handle IPv6? NetworkManager sets accept_ra=0 and does userspace RA, while an externally changed device may have accept_ra=1 and be using kernel RA. I think the best thing to do is to leave accept_ra=1 on startup and only switch to userspace RA if NM is told to touch the device by the administrator. NM would still listen for and recognize the kernel-determined routes and addresses, but how would it get DNS servers and search domains since the kernel doesn't cache them? We removed all that netlink code to parse NDUSEROPT.

Projects/NetworkManager/Cooperation (last edited 2013-11-21 19:20:51 by WilliamJonMcCann)