1. 04 Apr, 2018 1 commit
    • Thomas Haller's avatar
      checkpoint: allow resetting the rollback timeout via D-Bus · f6730322
      Thomas Haller authored
      This allows to adjust the timeout of an existing checkpoint.
      The main usecase of checkpoints, is to have a fail-safe when
      configuring the network remotely. By allowing to reset the timeout,
      the user can perform a series of actions, and keep bumping the
      timeout. That way, the entire series is still guarded by the same
      checkpoint, but the user can start with short timeout, and
      re-adjust the timeout as he goes along.
      The libnm API only implements the async form (at least for now).
      Sync methods are fundamentally wrong with D-Bus, and it's probably
      not needed. Also, follow glib convenction, where the async form
      doesn't have the _async name suffix. Also, accept a D-Bus path
      as argument, not a NMCheckpoint instance. The libnm API should
      not be more restricted than the underlying D-Bus API. It would
      be cumbersome to require the user to lookup the NMCheckpoint
      instance first, especially since libnm doesn't provide an efficient
      or convenient lookup-by-path method. On the other hand, retrieving
      the path from a NMCheckpoint instance is always possible.
  2. 16 Feb, 2018 1 commit
  3. 10 Jan, 2018 2 commits
    • Beniamino Galvani's avatar
      ppp: introduce SetIfindex pppd plugin D-Bus method · dd98ada3
      Beniamino Galvani authored
      If IPV6CP terminates before IPCP, pppd enters the RUNNING phase and we
      start IP configuration without having an IP interface set, which
      triggers assertions.
      Instead, add a SetIfindex() D-Bus method that gets called by the
      plugin when pppd becomes RUNNING. The method sets the IP ifindex of
      the device and starts IP configuration.
    • Inigo Martínez's avatar
      meson: Improve dependency system · 5e16bcf2
      Inigo Martínez authored
      Some targets are missing dependencies on some generated sources in
      the meson port. These makes the build to fail due to missing source
      files on a highly parallelized build.
      These dependencies have been resolved by taking advantage of meson's
      internal dependencies which can be used to pass source files,
      include directories, libraries and compiler flags.
      One of such internal dependencies called `core_dep` was already in
      use. However, in order to avoid any confusion with another new
      internal dependency called `nm_core_dep`, which is used to include
      directories and source files from the `libnm-core` directory, the
      `core_dep` dependency has been renamed to `nm_dep`.
      These changes have allowed minimizing the build details which are
      inherited by using those dependencies. The parallelized build has
      also been improved.
  4. 05 Jan, 2018 1 commit
    • Beniamino Galvani's avatar
      ip-tunnel: add support for tunnel flags · da4c9e51
      Beniamino Galvani authored
      Implement support for IP tunnel flags. Currently only some IPv6 tunnel
      flags are supported. Example:
       # nmcli connection add type ip-tunnel mode ip6ip6 \
         ip-tunnel.flags ip6-ign-encap-limit,ip6-use-orig-tclass \
         ifname abc ip-tunnel.parent ens8 ipv4.method disabled \
         ipv6.method manual ipv6.address ::8888 remote ::42
       # ip -d l
        61: abc@ens8: <NOARP,UP,LOWER_UP> mtu 1460 qdisc noqueue ...
          link/tunnel6 :: brd ::42 promiscuity 0
          ip6tnl ip6ip6 remote ::42 local :: dev ens8 encaplimit none
          hoplimit 0 tclass inherit ...
  5. 13 Dec, 2017 1 commit
  6. 05 Dec, 2017 3 commits
    • Thomas Haller's avatar
      settings: support setting a connection as volatile via Update2() · 35dc6421
      Thomas Haller authored
      Extend the Update2 flags to allow marking a connection as volatile.
      Making a connection as volatile means that the connection stays alive
      as long as an active connection references it.
      It is correct that Update2() returns before the connection is actually
      deleted. It might take an arbitrary long time until the volatile
      mechanism cleans up the connection.
      Also add two more IN_MEMORY flags: "detached" and "only".
      The existing NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY would not detach nor
      delete the possible file on disk. That is, the mode only changes what NM
      thinks is the current content of the connection profile. It would not delete
      the file on disk nor would it detach the profile in-memory from the file.
      As such, later persisting the connection again to disk would overwrite
      the file, and deleting the profile, would delete the file.
      Now add two new IN_MEMORY modes.
      NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACH is like making the connection
      in-memory only, but forgetting that there might be any profile on disk.
      That means, a later Delete() would not delete the file. Similarly, a
      later Update2() that persists the connection again, would not overwrite
      the existing file on disk, instead it would choose a new file name.
      On the other hand, NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY would delete
      a potential file from disk right away.
      It's clear that "volatile" only makes sense with either "in-memory-detached"
      or "in-memory-only". That is, the file on disk should be deleted right away
      (before the in-memory part is garbage collected) or the file on disk should
      be forgotten.
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      all: add new D-Bus API org.freedesktop.NetworkManager.Settings.Connection.Update2() · 98ee18d8
      Thomas Haller authored
      We already have Update(), UpdateUnsaved() and Save(), which serve
      similar purposes. We will need a form of update with another argument.
      Most notably, to block autoconnect while doing the update.
      Other use cases could be to prevent reapplying connection.zone and
      connection.metered, to to reapply all changes.
      Instead of adding a specific update function that only serves that
      new use-case, add a extensible Update2() function. It can be extended
      to cope with future variants of update.
  7. 09 Nov, 2017 1 commit
  8. 30 Oct, 2017 3 commits
  9. 05 Oct, 2017 1 commit
  10. 17 Aug, 2017 1 commit
  11. 05 Aug, 2017 1 commit
    • Beniamino Galvani's avatar
      device: add NMDevicePPP · df72cad1
      Beniamino Galvani authored
      The new device type represents a PPP interface, and will implement the
      activation of new-style PPPoE connections, i.e. the ones that don't
      claim the parent device.
  12. 30 Jun, 2017 1 commit
  13. 26 Jun, 2017 1 commit
  14. 19 May, 2017 1 commit
    • Thomas Haller's avatar
      device: sanitze UTF-8 values for D-Bus · 08709065
      Thomas Haller authored
        ip link add name $'d\xccf\\c' type dummy
      Use nm_utils_str_utf8safe_escape() to sanitize non UTF-8 sequences
      before exposing them on D-Bus. The operation can be reverted client
      side via nm_utils_str_utf8safe_unescape() or simply g_strcompress().
      Note that this preserves all valid UTF-8 sequences as-is, with exception
      of the backslash escape character and ASCII control characters. Thus, this
      is a change in behavior for strings that contain such characters.
      Note that nmcli is not changed to somehow unescape the string before
      printing. As the string is not valid UTF-8 (or contains ASCII characters
      that need escaping), they are not printable as-is, so unescaping before
      printing makes little sense.
  15. 17 Mar, 2017 3 commits
  16. 22 Feb, 2017 1 commit
    • Beniamino Galvani's avatar
      core: add support for dummy devices · b42f780e
      Beniamino Galvani authored
      Add support for creating dummy devices. This commit adds a D-Bus
      interface 'org.freedesktop.NetworkManager.Device.Dummy' which is used
      primarily for determining the device type but does not carry any
  17. 16 Feb, 2017 1 commit
  18. 16 Jan, 2017 1 commit
  19. 12 Dec, 2016 2 commits
    • Beniamino Galvani's avatar
      dns: export current configuration through D-Bus · e3c67177
      Beniamino Galvani authored
      It is useful to let clients retrieve the current DNS configuration,
      which can be displayed to users or used (together with dns=none) to
      implement custom DNS configuration logic through external tools.
    • Beniamino Galvani's avatar
      dns: export DNS manager D-Bus object · 14105ece
      Beniamino Galvani authored
      Extend the D-Bus API and introduce a new NMDnsManager interface that
      contains all the information related to DNS configuration.
      At the moment the new DnsManager object only contains basic properties
      describing the current DNS mode and resolv.conf manager.
  20. 23 Nov, 2016 1 commit
  21. 19 Oct, 2016 1 commit
  22. 26 Sep, 2016 1 commit
  23. 23 Sep, 2016 3 commits
  24. 02 Sep, 2016 1 commit
  25. 01 Sep, 2016 1 commit
  26. 17 Aug, 2016 3 commits
    • Thomas Haller's avatar
      device: always expose device statistics information · fbbebc21
      Thomas Haller authored
      Instead of updating the device-statistic counters only periodically as
      we refresh the link, update them on every link-changed event from
      That means, also for devices that have RefreshRateMs at zero, the values
      will be updated at random times when the link information changes.
      The difference is, that previously the counters would be zero unless
      RefreshRateMs was set. Now, they have some (probably stale) values
      which however are not guaranteed to be kept up-to-date.
      Also, now we refresh more often then promised by RefreshRateMs. But the API
      technically doesn't specify that, so if we find there is a problem with
      this, we may revert it later.
    • Alfonso Sanchez-Beato's avatar
      device: add statistics interface · 24b193ab
      Alfonso Sanchez-Beato authored
      Add statistics interface to all device instances. When active, the
      properties of this interface are refreshed whenever there is network
      activity for the device.
      Activation is performed by changing RefreshRateMs property. If set to
      zero, the interface is deactivated. If set to other value, the rest of
      the interface properties are refreshed whenever the related network
      metric changes, being RefreshRateMs the minimum time between property
      changes, in milliseconds.
    • Beniamino Galvani's avatar
  27. 01 Jun, 2016 2 commits
    • Thomas Haller's avatar
      config,dns: support Reload flags to specify that only parts should be reloaded · 0acee972
      Thomas Haller authored
      Support 3 new flags for Reload:
        - 0x01 (CONF): reload the configuration from disk
        - 0x02 (DNS_RC): write DNS configuration to resolv.conf
        - 0x04 (DNS_FULL): restart DNS plugin
      Omitting all flags is the same as reloading everything, thus SIGHUP.
    • Thomas Haller's avatar
      manager: add Reload() D-Bus command · 1d0e0eef
      Thomas Haller authored
      Add new Reload D-Bus command to reload NetworkManager configuration.
      For now, this is like sending SIGHUP to the process. There are several
      advantages here:
        - it is guarded via PolicyKit authentication while signals
          can only be sent by root.
        - the user can wait for the reload to be complete instead of sending
          an asynchronous signal. For now, we operation completes after
          nm_config_reload() returns, but later we could delay the response
          further until specific parts are fully reloaded.
        - SIGHUP reloads everything including re-reading configuration from
          disk while SIGUSR1 reloads just certain parts such as writing out DNS
          configuration anew.
          Now, the Reload command has a flags argument which is more granular
          in selecting parts which are to be reloaded. For example, via
          signals the user can:
            1) send SIGUSR1: this writes out the DNS configuration to
               resolv.conf and possibly reloads other parts without
               re-reading configuration and without restarting the DNS plugin.
            2) send SIGHUP: this reloads configuration from disk,
               writes out resolv.conf and restarts the DNS plugin.
          There is no way, to only restart the DNS plugin without also reloading
          everything else.