Skip to content
  • Dan Williams's avatar
    core: only manage those bridges created by NetworkManager (rh #905035) · 17338069
    Dan Williams authored
    Until we handle bridges non-destructively, only manage bridges
    created by NM.  When quitting write out a file listing all
    bridges created by NM and a timestamp, and when starting read
    that file and if the timestamp is within 30 minutes, manage
    any bridge that was listed in that file.  This scheme, while
    not foolproof (eg, if NM crashes), should ensure that NM can
    recognize bridges it created if it's restarted.  The file
    is stored in /run or /var/run, which is cleaned each restart,
    ensuring that the state does not persist across reboots.
    
    If an automatic or user-initiated activation request for
    a bridge NM does not manage is received, that request is
    denied.  Only if the bridge interface does not yet exist, or
    was present in the managed bridges file, will an
    NMDeviceBridge be created and activation be possible.
    17338069