Skip to content
  • Thomas Haller's avatar
    platform: add network namespace support to platform · c7b38625
    Thomas Haller authored
    Add a new NMPNetns class. This allows creation, deletion and
    switching of network namespaces. The API only offers push/pop
    operations to switch the namespace. This way the API enforces
    the user to always restore the previous namespace.
    
    A NMPlatform instance not only uses the netlink socket, but also
    sysfs, udev, ethtool, mii. Still, a NMPlatform instance lives
    entirely inside one namespace and is not spanning multiple namespaces.
    To properly support network namespaces, the platform instance must
    switch the namespace as necessary, transparent to the caller.
    Udev is only supported in the main namespace.
    
    For now, network namespaces are not actually used and are disabled
    via the NM_PLATFORM_NETNS_SUPPORT argument.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762408
    c7b38625