1. 28 May, 2019 3 commits
  2. 02 Apr, 2019 1 commit
  3. 11 Mar, 2019 1 commit
  4. 07 Mar, 2019 1 commit
  5. 23 Feb, 2019 1 commit
    • Thomas Haller's avatar
      build/meson: increase timeouts for some tests · b1f6d53b
      Thomas Haller authored
      The defaults for test timeouts in meson is 30 seconds. That is not long
      enough when running
        $ NMTST_USE_VALGRIND=1 ninja -C build test
      Note that meson supports --timeout-multiplier, and automatically
      increases the timeout when running under valgrind. However, meson
      does not understand that we are running tests under valgrind via
      NMTST_USE_VALGRIND=1 environment variable.
      Timeouts are really not expected to be reached and are a mean of last
      resort. Hence, increasing the timeout to a large value is likely to
      have no effect or to fix test failures where the timeout was too rigid.
      It's unlikely that the test indeed hangs and the increase of timeout
      causes a unnecessary increase of waittime before aborting.
  6. 22 Feb, 2019 1 commit
    • Thomas Haller's avatar
      all: move nm_utils_hexstr2bin*() to shared · 53b747ff
      Thomas Haller authored
      libnm exposes simplified variants of hexstr2bin in its public API. I
      think that was a mistake, because libnm should provide NetworkManager
      specific utils. It should not provide such string functions.
      However, nmcli used to need this, so it was added to libnm.
      The better approach is to add it to our internally shared static
      library, so that all interested components can make use of it.
  7. 21 Feb, 2019 3 commits
  8. 15 Feb, 2019 1 commit
  9. 12 Feb, 2019 4 commits
  10. 11 Feb, 2019 1 commit
  11. 06 Feb, 2019 1 commit
  12. 05 Feb, 2019 1 commit
  13. 04 Feb, 2019 1 commit
  14. 20 Dec, 2018 1 commit
  15. 19 Dec, 2018 2 commits
    • Thomas Haller's avatar
      all: don't use static buffer for nm_utils_inet*_ntop() · a51c09dc
      Thomas Haller authored
      While nm_utils_inet*_ntop() accepts a %NULL buffer to fallback
      to a static buffer, don't do that.
      I find the possibility of using a static buffer here error prone
      and something that should be avoided. There is of course the downside,
      that in some cases it requires an additional line of code to allocate
      the buffer on the stack as auto-variable.
    • Aleksander Morgado's avatar
      settings,gsm: deprecate and stop using 'number' property · 6ed21e83
      Aleksander Morgado authored
      The 'number' property in GSM settings is a legacy thing that comes
      from when ModemManager used user-provided numbers, if any, to connect
      3GPP modems.
      Since ModemManager 1.0, this property is completely unused for 3GPP
      modems, and so it doesn't make sense to use it in the NetworkManager
      settings. Ofono does not use it either.
      For AT+PPP-based 3GPP modems, the 'number' to call to establish the
      data connection is decided by ModemManager itself, e.g. for standard
      GSM/UMTS/LTE modems it will connect a given predefined PDP context,
      and for other modems like Iridium it will have the number to call
      hardcoded in the plugin itself.
  16. 13 Dec, 2018 1 commit
  17. 12 Dec, 2018 2 commits
    • Beniamino Galvani's avatar
      ifcfg-rh: fix persisting sriov setting · d48f389c
      Beniamino Galvani authored
      The writer should write all properties of the sriov setting when the
      setting exists without additional logic. Likewise, the reader should
      instantiate a sriov setting when any sriov key is present and blindly
      set properties from keys.
      The old code did not always preserve the presence of a sriov setting
      after a write/read cycle.
      Fixes: c02d1c48
    • Beniamino Galvani's avatar
      cli: strictly validate SR-IOV attributes · 769e0726
      Beniamino Galvani authored
      Report an error when the user tries to add an unknown attribute
      instead of silently accepting (and ignoring) it.
      Note that this commit also changes the behavior of public API
      nm_utils_sriov_vf_from_str() to return an error when an unknown
      attribute is found. I think the previous behavior was buggy as wrong
      attributes were simply ignored without any way for the user to know.
      Fixes: a9b4532f
  18. 03 Dec, 2018 3 commits
    • Thomas Haller's avatar
      keyfile: add helper functions to record loaded UUID files · 3fc5765e
      Thomas Haller authored
      This code will be used later.
      We want to remember which keyfiles are currently loaded (or hidden).
      With the addition or multiple keyfile directories (soon), there are
      two cases where this matters:
       - if there are multiple keyfiles which reference the same UUID,
         we can only load one of them. That is already a problem today
         with only one keyfile directory, where multiple files can reference
         the same UUID.
         The implementation will pick the file based on priorities (like
         the file modification date). However, the user may call explicitly
         call `nmcli connection load`. In that case, we cannot reload
         all files to find out whether the to be loaded file is hidden
         according to the defined priorities. We cannot do that, because we
         must not make decisions based on files on disk, which we are not told
         to reload. So, during a `nmcli connection load` we must look at
         unrelated files, to determine how to load the file.
         Instead, we do allow the user to load any file, even if it would be
         shadowed by other files. When we do that, we may want to persist which
         file is currently loaded, so that a service restart and a `nmcli connection
         reload` does not undo the load again. This can be later later be solved by
         writing a symlink
         which targets the currently active file.
       - if a profile was loaded from read-only persistant storage, the user
         may still delete the profile. We also need to remember the deletion
         of the file. That will be achieved by symlinking "/dev/null" as
      Add helper functions to read and write these symlinks.
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      keyfile/tests: add tests for ignoring keyfile filenames · 4d8ce80e
      Thomas Haller authored
      In particular, have a full path (with slashes), and a filename
      with trailing slash (a directory).
  19. 29 Nov, 2018 1 commit
    • Lubomir Rintel's avatar
      all: say Wi-Fi instead of "wifi" or "WiFi" · b385ad01
      Lubomir Rintel authored
      Correct the spelling across the *entire* tree, including translations,
      comments, etc. It's easier that way.
      Even the places where it's not exposed to the user, such as tests, so
      that we learn how is it spelled correctly.
  20. 23 Oct, 2018 7 commits
  21. 22 Oct, 2018 1 commit
  22. 19 Oct, 2018 1 commit
  23. 18 Oct, 2018 1 commit
    • Thomas Haller's avatar
      keyfile: write keyfiles to "/run" directory with ".nmconnection" file suffix · 648c256b
      Thomas Haller authored
      For profiles in "/etc/NetworkManager/system-connections", we did not enforce
      that the keyfiles have a special suffix, nor did we generate the
      filenames in such a manner. In hindsight, I think that was a mistake.
      Recently we added "/run/NetworkManager/system-connections" as additional
      keyfile directory. Enforce a suffix and write keyfiles with such a name.
      In principle, we could also start writing keyfiles in /etc with the
      same suffix. But let's not do that, because we anyway cannot enforce
      An ugly part is, that during `nmcli connection load` we need to
      determine whether the to-be-loaded connection is under /etc or /run.
      Preferably, we would allow any kind of symlinking as what matters
      is the file object (inode) and not the path. Anyway, we don't do
      that but compare plain paths. That means, paths which are not
      in an expected form, will be rejected. In particular, the paths
      starting with "/run/..." and "/var/run/..." will be treated differently,
      and one of them will be rejected.
      Note that ifcfg-rh plugin strictly enforces that the path
      starts with IFCFG_DIR as well. So, while this is a breaking
      change for keyfile, I think it's reasonable.