Skip to content
  • Thomas Haller's avatar
    device: keep NMNetns instance per device · 8a6eef6a
    Thomas Haller authored
    This also ensures that we own a reference to the
    NMPlatform, NMRouteManager and NMDefaultRouteManager
    instances. See bug rh#1440089 where we might access
    the singleton getter after destroing the singleton
    instance of NMRouteManager. This is prevented by
    keeping a reference to those instances -- indirectly
    via the netns instance.
    
    Later, we may add support for multiple namespaces. Then it might
    make sense to swap the NMNetns instance of a device when moving
    the device between namespaces.
    
    Also, drop the use of singelton instances.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1440089
    (cherry picked from commit c48a19b7)
    8a6eef6a