1. 31 May, 2018 13 commits
  2. 30 May, 2018 2 commits
  3. 29 May, 2018 11 commits
  4. 28 May, 2018 14 commits
    • Aleksander Morgado's avatar
      policy: don't block connection if device is gone · d97eab6c
      Aleksander Morgado authored
      If the active connection is deactivated because the device is gone,
      don't block autoconnection. Otherwise, whenever the device comes
      back (e.g. maybe it was reset in the middle of a connection attempt),
      the autoconnection logic won't be triggered, as the settings are still
      I'm able to reproduce this by performing a WWAN modem reset in the
      middle of a connection attempt.
    • Thomas Haller's avatar
      clients/tests: run nmcli commands in parallel · baaab522
      Thomas Haller authored
      Most nmcli calls from clients/tests don't change the server's state.
      Hence, they can easily run in parallel.
      Run tests in parallel. No longer handle one nmcli invocation after the other.
      Instead, spawn groups of processes in parallel, and track the pending jobs.
      Only at certain synchronization points we call self.async_wait() to
      wait for all previous jobs to complete.
      This reduces the test time on my machine from 7 to 3 seconds. Arguably,
      that matters less during a full `make check -j 8`, because the entire
      set of tests anyway takes longer than 7 seconds. So when running the
      entire test suite, the machine is kept busy anyway. It matters however
      for manual invocations.
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      all: add stable-id specifier "${DEVICE}" · eb821ead
      Thomas Haller authored
      Add new stable-id specifier "${DEVICE}" to explicitly declare that the
      connection's identity differs per-device.
      Note that for settings like "ipv6.addr-gen-mode=stable" we already hash
      the interface's name. So, in combination with addr-gen-mode, using this
      specifier has no real use. But for example, we don't do that for
      Point being, in various context we possibly already include a per-device
      token into the generation algorithm. But that is not the case for all
      contexts and uses.
      Especially the DHCPv4 client identifier is supposed to differ between interfaces
      (according to RFC). We don't do that by default with "ipv4.dhcp-client-id=stable",
      but with "${DEVICE}" can can now be configured by the user.
      Note that the fact that the client-id is the same accross interfaces, is not a
      common problem, because profiles are usually restricted to one device via
    • Thomas Haller's avatar
      device: hash a per-host key for ipv4.dhcp-client-id=stable · d1a94a85
      Thomas Haller authored
      Otherwise, the generated client-id depends purely on the profile's
      stable-id. It means, the same profile (that is, either the same UUID
      or same stable-id) on different hosts will result in identical client-ids.
      That is clearly not desired. Hash a per-host secret-key as well.
      Note, that we don't hash the interface name. So, activating the
      profile on different interfaces, will still yield the same client-id.
      But also note, that commonly a profile is restricted to one device,
      via "connection.interface-name".
      Note that this is a change in behavior. However, "ipv4.dhcp-client-id=stable"
      was only added recently and not yet released.
      Fixes: 62a78639
    • Thomas Haller's avatar
      core: let nm_utils_secret_key_read() handle failures internally · dbcb1d6d
      Thomas Haller authored
      and add nm_utils_secret_key_get() to cache the secret-key, to only
      obtain it once.
      nm_utils_secret_key_read() is not expected to fail. However, in case
      of an unexpected error, don't propagate the error to the caller,
      but instead handle it internally.
      That means, in case of error:
        - log a warning within nm_utils_secret_key_read() itself.
        - always return a generated secret-key. In case of error, the
          key won't be persisted (obviously). But the caller can ignore
          the error and just proceed with an in-memory key.
      Hence, also add nm_utils_secret_key_get() to cache the key. This way,
      we only try to actually generate/read the secret-key once.  Since that
      might fail and return an in-memory key, we must for future invocations
      return the same key, without generating a new one.
    • Thomas Haller's avatar
      core: ensure NUL terminated secret_key buffer · d0f1dc65
      Thomas Haller authored
      The secret_key is binary random data, so one shouldn't ever use it as a
      NUL terminated string directly.
      Still, just ensure that the entire buffer is always NUL terminated.
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      libnm: allow nm_utils_hwaddr_valid() of length zero · 4e463df1
      Thomas Haller authored
      nm_utils_hwaddr_valid() is used for validating strings. It should
      not assert against calling it with an empty string "". That is just
      an invalid hwaddr.
    • Lubomir Rintel's avatar
      rpm/build.sh: suggest dnf builddep after BUILDTYPE=SRPM · c28b334f
      Lubomir Rintel authored
      Convenient for copy & paste.
    • Lubomir Rintel's avatar
      rpm: prefer python3 · de326a4e
      Lubomir Rintel authored
      From Fedora 28 on we can build without Python 2. That is good,
      because it's eventually going to be removed.
      Based on a change in Fedora dist-git by Iryna Shcherbina.
    • Beniamino Galvani's avatar
      cli: fix property matching · 1f7780cb
      Beniamino Galvani authored
      @ret was not initialized when there was only one partial match.
      Also, refactor the code to return all matching values.
      Fixes: 3fd9bf9d
    • Beniamino Galvani's avatar
    • Thomas Haller's avatar
      clients/tests: refactor by moving replace-text helper function · 78e877ee
      Thomas Haller authored
      Have less logic in TestNmcli.