1. 03 Apr, 2019 1 commit
  2. 27 Mar, 2019 5 commits
    • Beniamino Galvani's avatar
      lldp: support IEEE 802.3 TLVs · 8200078e
      Beniamino Galvani authored
      Add support for IEEE 802.3 organizationally specific TLVs:
      
       - MAC/PHY configuration/status (IEEE 802.1AB-2009 clause F.2)
       - power via medium dependent interface (clause F.3)
       - maximum frame size (clause F.4)
      8200078e
    • Beniamino Galvani's avatar
      lldp: support multiple PPVIDs · 452851cc
      Beniamino Galvani authored
      As done for VLANs, add a new 'ppvids' attribute that reports all 'port
      and protocol VLAN ID' TLVs for the neighbor.
      452851cc
    • Beniamino Galvani's avatar
      lldp: support multiple vlans · c4be4ea2
      Beniamino Galvani authored
      Previously we exported the contents of VLAN Name TLV in the 'vid'
      (uint32) and 'vlan-name' (string) attributes. This is not entirely
      correct as the TLV can appear multiple times.
      
      We need a way to export all the VLAN IDs and names for the
      neighbor. Add a new 'vlans' attribute which obsoletes the other two
      and is an array of dictionaries, where each dictionary contains the
      'vid' and 'name' keys.
      c4be4ea2
    • Beniamino Galvani's avatar
      lldp: add support for management address TLV · 6c52d946
      Beniamino Galvani authored
      Support the management address TLV (IEEE 802.1AB-2009 clause
      8.5.9). The TLV can appear multiple times and so it is exported on
      D-Bus as an array of dictionaries.
      6c52d946
    • Beniamino Galvani's avatar
      cli: add lldp output tests · b1d5f11b
      Beniamino Galvani authored
      Check the result of 'nmcli device lldp' command.
      b1d5f11b
  3. 19 Mar, 2019 1 commit
    • Lubomir Rintel's avatar
      all: goodbye libnm-glib · 1de8383a
      Lubomir Rintel authored
      This removes libnm-glib, libnm-glib-vpn, and libnm-util for good.
      The it has been replaced with libnm since NetworkManager 1.0, disabled
      by default since 1.12 and no up-to-date distributions ship it for years
      now.
      
      Removing the libraries allows us to:
      
      * Remove the horrible hacks that were in place to deal with accidental use
        of both the new and old library in a single process.
      * Relief the translators of maintenance burden of similar yet different
        strings.
      * Get rid of known bad code without chances of ever getting fixed
        (libnm-glib/nm-object.c and libnm-glib/nm-object-cache.c)
      * Generally lower the footprint of the releases and our workspace
      
      If there are some really really legacy users; they can just build
      libnm-glib and friends from the NetworkManager-1.16 distribution. The
      D-Bus API is stable and old libnm-glib will keep working forever.
      
      https://github.com/NetworkManager/NetworkManager/pull/308
      1de8383a
  4. 11 Mar, 2019 1 commit
    • Frédéric Danis's avatar
      tests: Fix variant_from_dbus() for arrays of UInt32 · 10502f17
      Frédéric Danis authored
      Using test-networkmanager-servic.py, I get the following error when
      trying to add manual config with a dns address:
      
          Error: g-io-error-quark: Traceback (most recent call last):
            File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 707, in _message_cb
              retval = candidate_method(self, *args, **keywords)
            File "tools/test-networkmanager-service.py", line 1727, in AddConnection
              return self.add_connection(con_hash)
            File "tools/test-networkmanager-service.py", line 1731, in add_connection
              con_inst = Connection(self.c_counter, con_hash, do_verify_strict)
            File "tools/test-networkmanager-service.py", line 1601, in __init__
              NmUtil.con_hash_verify(con_hash, do_verify_strict=do_verify_strict)
            File "tools/test-networkmanager-service.py", line 497, in con_hash_verify
              BusErr.raise_nmerror(e)
            File "tools/test-networkmanager-service.py", line 419, in raise_nmerror
              raise e
          Exception: Unsupported value ipv4.dns = dbus.Array([dbus.UInt32(168430090L), dbus.UInt32(218893066L)], signature=dbus.Signature('u'), variant_level=1) (Cannot convert array element to type 'u': Must be number, not Variant)
      
      https://mail.gnome.org/archives/networkmanager-list/2019-March/msg00013.html
      (cherry picked from commit 9a71d7d2)
      10502f17
  5. 07 Mar, 2019 1 commit
    • Frédéric Danis's avatar
      tests: Fix variant_from_dbus() for arrays of UInt32 · 9a71d7d2
      Frédéric Danis authored
      Using test-networkmanager-servic.py, I get the following error when
      trying to add manual config with a dns address:
      
          Error: g-io-error-quark: Traceback (most recent call last):
            File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 707, in _message_cb
              retval = candidate_method(self, *args, **keywords)
            File "tools/test-networkmanager-service.py", line 1727, in AddConnection
              return self.add_connection(con_hash)
            File "tools/test-networkmanager-service.py", line 1731, in add_connection
              con_inst = Connection(self.c_counter, con_hash, do_verify_strict)
            File "tools/test-networkmanager-service.py", line 1601, in __init__
              NmUtil.con_hash_verify(con_hash, do_verify_strict=do_verify_strict)
            File "tools/test-networkmanager-service.py", line 497, in con_hash_verify
              BusErr.raise_nmerror(e)
            File "tools/test-networkmanager-service.py", line 419, in raise_nmerror
              raise e
          Exception: Unsupported value ipv4.dns = dbus.Array([dbus.UInt32(168430090L), dbus.UInt32(218893066L)], signature=dbus.Signature('u'), variant_level=1) (Cannot convert array element to type 'u': Must be number, not Variant)
      
      https://mail.gnome.org/archives/networkmanager-list/2019-March/msg00013.html
      9a71d7d2
  6. 05 Feb, 2019 1 commit
  7. 14 Jan, 2019 1 commit
    • Thomas Haller's avatar
      all: return output dictionary from "AddAndActivate2" · fbb038af
      Thomas Haller authored
      Add a "a{sv}" output argument to "AddAndActivate2" D-Bus API.
      "AddAndActivate2" replaces "AddAndActivate" with more options.
      It also has a dictionary argument to be forward compatible so that we
      hopefully won't need an "AddAndActivate3". However, it lacked a similar
      output dictionary. Add it for future extensibility. I think this is
      really to workaround a shortcoming of D-Bus, which does provide strong
      typing and type information about its API, but does not allow to extend
      an existing API in a backward compatible manner. So we either resort to
      Method(), Method2(), Method3() variants, or a catch-all variant with a
      generic "a{sv}" input/output argument.
      
      In libnm, rename "nm_client_add_and_activate_connection_options()" to
      "nm_client_add_and_activate_connection2()". I think libnm API should have
      an obvious correspondence with D-Bus API. Or stated differently, if
      "AddAndActivateOptions" would be a better name, then the D-Bus API should
      be renamed. We should prefer one name over the other, but regardless
      of which is preferred, the naming for D-Bus and libnm API should
      correspond.
      
      In this case, I do think that AddAndActivate2() is a better name than
      AddAndActivateOptions(). Hence I rename the libnm API.
      
      Also, unless necessary, let libnm still call "AddAndActivate" instead of
      "AddAndActivate2". Our backward compatibility works the way that libnm
      requires a server version at least as new as itself. As such, libnm
      theoretically could assume that server version is new enough to support
      "AddAndActivate2" and could always use the more powerful variant.
      However, we don't need to break compatibility intentionally and for
      little gain. Here, it's easy to let libnm also handle old server API, by
      continuing to use "AddAndActivate" for nm_client_add_and_activate_connection().
      Note that during package update, we don't restart the currently running
      NetworkManager instance. In such a scenario, it can easily happen that
      nmcli/libnm is newer than the server version. Let's try a bit harder
      to not break that.
      
      Changes as discussed in [1].
      
      [1] !37 (comment 79876)
      fbb038af
  8. 12 Dec, 2018 1 commit
  9. 01 Dec, 2018 2 commits
  10. 17 Nov, 2018 1 commit
  11. 08 Nov, 2018 1 commit
  12. 02 Nov, 2018 1 commit
  13. 25 Oct, 2018 3 commits
  14. 24 Oct, 2018 1 commit
  15. 17 Oct, 2018 1 commit
  16. 04 Oct, 2018 1 commit
    • Thomas Haller's avatar
      acd/tests: skip NAcd tests under valgrind · 343b99f8
      Thomas Haller authored
      Under valgrind, we cannot create an NAcd instance.
      
          --10916-- WARNING: unhandled amd64-linux syscall: 321
          --10916-- You may be able to write your own handler.
          --10916-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
          --10916-- Nevertheless we consider this a bug.  Please report
          --10916-- it at http://valgrind.org/support/bug_reports.html.
      
      This limitation already poses a problem, because running NetworkManager
      under valgrind might fail. However, for tests it doesn't matter and we
      can just skip them.
      343b99f8
  17. 01 Oct, 2018 1 commit
  18. 28 Sep, 2018 1 commit
  19. 19 Sep, 2018 2 commits
    • Beniamino Galvani's avatar
      build: meson: fix computing NM exported symbols · 19a718bc
      Beniamino Galvani authored
      The script didn't include all the symbols needed by plugins because
      libNetworkManager.a, as built by meson, doesn't include symbols from
      other static libraries that are linked in. Since we used
      libNetworkManager.a to know which symbols are potentiall available
      from NM, the result was an incomplete list.
      
      Unfortunately, the only way to include the whole static library is to
      create a dependency object and use 'link_whole', but this is only
      available in meson >= 0.46. Since 'link_whole' is available for
      executables in meson >= 0.40, create a fake executable and use that to
      enumerate symbols.
      
      Also add tests to check that plugins can be loaded correctly.
      
      Fixes: dfa2a2b4
      19a718bc
    • Beniamino Galvani's avatar
      build: meson: support $DESTDIR in installation script · 98b4a19a
      Beniamino Galvani authored
      Adapt the meson post-installation script to handle the $DESTDIR
      variable supplied by user to specify the installation target
      directory. While at it, convert the script to shell because it seems
      simpler to me.
      98b4a19a
  20. 17 Sep, 2018 1 commit
  21. 13 Sep, 2018 2 commits
  22. 05 Sep, 2018 1 commit
  23. 27 Aug, 2018 1 commit
  24. 11 Jul, 2018 1 commit
  25. 28 Jun, 2018 2 commits
  26. 18 Jun, 2018 5 commits
    • Thomas Haller's avatar
      tests: don't exit test-networkmanager-service.py after 20 seconds · 296da442
      Thomas Haller authored
      Tests might just take longer than 20 seconds.
      
      Also, we already watch stdin to determine whether the service
      should exit.
      
      (cherry picked from commit 4e18ef49)
      296da442
    • Thomas Haller's avatar
      tests: don't exit test-networkmanager-service.py after 20 seconds · 4e18ef49
      Thomas Haller authored
      Tests might just take longer than 20 seconds.
      
      Also, we already watch stdin to determine whether the service
      should exit.
      4e18ef49
    • Thomas Haller's avatar
      tests: improve NetworkManager stub service for Wi-Fi scanning · efddb0ce
      Thomas Haller authored
      Now that nmcli initiates a scan before displaying Wi-Fi networks,
      the stub service must properly support that as well.
      
      For the moment, the stub service chooses "now" as LastScan timestamp.
      This causes nmcli not to trigger a new scan, because nmcli gives
      unstable output if multiple nmcli processes in parallel race to
      trigger a Wi-Fi scan. That should be fixed.
      
      (cherry picked from commit 56a0488b)
      efddb0ce
    • Thomas Haller's avatar
      tests: fix race in setting signal strength for Wi-Fi AP in NM stub · e05ce581
      Thomas Haller authored
      This opens the tests up to races. If we want to change the strength, we
      need to do it in a controlled, race-free manner. This is especially the
      case, because clients/tests run a large number of nmcli instances in
      parallel, and it's thus racy which signal the nmcli processes will
      see.
      
      This also fixes a bug at
      
          self._dbus_property_set(IFACE_WIFI_AP, PRP_WIFI_AP_STRENGTH, strength)
      
      @strength must be a D-Bus type, so that python-dbus knows the correct
      type for serialization.
      
      (cherry picked from commit 7e118c00)
      e05ce581
    • Thomas Haller's avatar
      tests: improve NetworkManager stub service for Wi-Fi scanning · 56a0488b
      Thomas Haller authored
      Now that nmcli initiates a scan before displaying Wi-Fi networks,
      the stub service must properly support that as well.
      
      For the moment, the stub service chooses "now" as LastScan timestamp.
      This causes nmcli not to trigger a new scan, because nmcli gives
      unstable output if multiple nmcli processes in parallel race to
      trigger a Wi-Fi scan. That should be fixed.
      56a0488b