1. 20 Apr, 2017 3 commits
  2. 19 Apr, 2017 9 commits
  3. 18 Apr, 2017 14 commits
    • Beniamino Galvani's avatar
    • Beniamino Galvani's avatar
      264624f9
    • Beniamino Galvani's avatar
      core: allow setting SR-IOV num_vfs · 32975b6a
      Beniamino Galvani authored
      32975b6a
    • Beniamino Galvani's avatar
      all: detect SR-IOV device support · f13fd452
      Beniamino Galvani authored
      f13fd452
    • Beniamino Galvani's avatar
    • Thomas Haller's avatar
      device: leave device up when setting it as unmanaged by user · 9e8218f9
      Thomas Haller authored
      Before, setting a device to unmanaged causes it to go down and clear
      the interface state.
      
      It may be useful to instruct NetworkManager not to touch the device
      anymore but leave the current state up. Changing behavior for
      
        nmcli device set "$DEV" managed no
      
      To get the previous behavior, one has to first disconnect the interface
      via
      
        nmcli device disconnect "$DEV"
        nmcli device set "$DEV" managed no
      
      Note that non-permanent addresses like from DHCP will eventually time
      out because NetworkManager stops the DHCP client. When instructing
      NetworkManager to let go of the device, you have to take it over in
      any way you see fit.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1371433
      9e8218f9
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      core: enable "log-with-ptr" by default for platform and route-manager · 41148cab
      Thomas Haller authored
      Arguably, we currently only have one instance of NMPlatform,
      NMRouteManager, NMDefaultRouteManager -- the one owned by the
      NMNetns singleton.
      
      Hence, all these instances we create with "log-with-ptr" set explicitly
      to false.
      
      In the future we want to support namespaces, and it will be be common to
      have multiple instances. For that we have "log-with-ptr" so we are able
      to disambiguiate the logging.
      
      Change the default to TRUE because it makes more sense. It has currently
      no effect as the default is never used.
      41148cab
    • Thomas Haller's avatar
      device: don't use platform singleton getter in device subclasses · 94d9ee12
      Thomas Haller authored
      Reduce the use of NM_PLATFORM_GET / nm_platform_get() to get
      the platform singleton instance.
      
      For one, this is a step towards supporting namespaces, where we need
      to use different NMNetns/NMPlatform instances depending on in which
      namespace the device lives.
      
      Also, we should reduce our use of singletons. They are difficult to
      coordinate on shutdown. Instead there should be a clear order of
      dependencies, expressed by owning a reference to those singelton
      instances. We already own a reference to the platform singelton,
      so use it and avoid NM_PLATFORM_GET.
      94d9ee12
    • Thomas Haller's avatar
      device: keep NMNetns instance per device · c48a19b7
      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
      c48a19b7
    • Thomas Haller's avatar
      core: add NMNetns to bundle platform and route managers · 0af2f5c2
      Thomas Haller authored
      NMPlatform, NMRouteManager and NMDefaultRouteManager are singletons
      instances. Users of those are for example NMDevice, which registers
      to GObject signals of both NMPlatform and NMRouteManager.
      
      Hence, as NMDevice:dispose() disconnects the signal handlers, it must
      ensure that those singleton instances live longer then the NMDevice
      instance. That is usually accomplished by having users of singleton
      instances own a reference to those instances.
      For NMDevice that effectively means that it shall own a reference to
      several singletons.
      
      NMPlatform, NMRouteManager, and NMDefaultRouteManager are all
      per-namespace. In general it doesn't make sense to have more then
      one instances of these per name space. Nnote that currently we don't
      support multiple namespaces yet. If we will ever support multiple
      namespaces, then a NMDevice would have a reference to all of these
      manager instances. Hence, introduce a new class NMNetns which bundles
      them together.
      0af2f5c2
    • Beniamino Galvani's avatar
      manager: set interface as removed when the link disappears · df537d2e
      Beniamino Galvani authored
      Set the device state as removed when the link disappears, so that in
      the call to unrealize() when the device is unmanaged we also perform a
      cleanup of it and especially, we terminate any DHCP client instances
      running on the device.
      
      If we keep DHCP clients running, we can hit assertions later when we
      start another instance on the same interface, because we kill the old
      dhclient from the pidfile, and the g_child_watch_add() done by the
      first client instance is not able to waitpid() it, complaining with:
      
        GChildWatchSource: Exit status of a child process was requested but
        ECHILD was received by waitpid(). Most likely the process is
        ignoring SIGCHLD, or some other thread is invoking waitpid() with a
        nonpositive first argument; either behavior can break applications
        that use g_child_watch_add()/g_spawn_sync() either directly or
        indirectly.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1436602
      df537d2e
    • Beniamino Galvani's avatar
      clients: fix setting of enum properties · afca8a4c
      Beniamino Galvani authored
      Ensure we call G_IS_ENUM_CLASS() or G_IS_FLAGS_CLASS() only on classed
      types.
      
       $ nmcli connection modify foobar wifi.powersave 1
       Thread 1 "nmcli" received signal SIGSEGV, Segmentation fault.
       0x0000000000440a4d in _set_fcn_gobject_enum at
       clients/common/nm-meta-setting-desc.c:985
       985                 || G_IS_ENUM_CLASS (gtype_prop)) {
      
      Fixes: f53218ed
      afca8a4c
    • Dan Williams's avatar
  4. 17 Apr, 2017 1 commit
  5. 15 Apr, 2017 9 commits
  6. 14 Apr, 2017 4 commits