1. 16 Aug, 2014 1 commit
    • Dan Winship's avatar
      all: fix up multiple-include-guard defines · c81fb49a
      Dan Winship authored
      Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
      libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
      guard, which meant that nm-test-utils.h could not tell which of them
      was being included (and so, eg, if you tried to include
      nm-ip4-config.h in a libnm test, it would fail to compile because
      nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
      
      Fix this by changing the include guards in the non-API-stable parts of
      the tree:
      
        - libnm-glib/nm-ip4-config.h remains   NM_IP4_CONFIG_H
        - libnm/nm-ip4-config.h now uses     __NM_IP4_CONFIG_H__
        - src/nm-ip4-config.h now uses       __NETWORKMANAGER_IP4_CONFIG_H__
      
      And likewise for all other headers.
      
      The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
      src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
      __NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
      consistent with the general scheme, do still mostly make sense in
      isolation.
      c81fb49a
  2. 15 Aug, 2014 1 commit
  3. 13 Aug, 2014 1 commit
  4. 12 Aug, 2014 1 commit
  5. 11 Aug, 2014 1 commit
  6. 08 Aug, 2014 4 commits
    • Dan Williams's avatar
      dhcp: fix killing wrong process ID on dhclient release · 2bd5cf51
      Dan Williams authored
      The prototype of dhclient_start() changed in 30cdd124 but that
      commit didn't update stop() correctly.  Clearly treating a gboolean
      as pid_t isn't going to work.  Second, we don't want to watch the
      child process on DHCP release because we're just going to kill it
      shortly after.
      2bd5cf51
    • Dan Winship's avatar
      libnm-util: don't warn about unrecognized properties · b64c82a3
      Dan Winship authored
      libnm-util is expected to end up behind the curve in terms of knowing
      about new NMSetting properties, so if it sees an unknown property, it
      should just assume that there will also be a backward-compatibility
      equivalent rather than printing a warning.
      
      (In particular, it should not warn when it sees the
      "ipv4.address-labels" property now that it now longer knows about it.)
      b64c82a3
    • Dan Winship's avatar
      core: fix a warning and a leak · 58a66cc7
      Dan Winship authored
      For devices where we don't set the hardware address at construct time,
      the first call to nm_device_update_hw_address() was hitting a
      return-if-fail.
      
      Also, when updating the hardware address, we were leaking the old
      value.
      58a66cc7
    • Thomas Haller's avatar
      libnm-glib/test: fix test failure for test-remote-settings-client · 2ac34e43
      Thomas Haller authored
      Due to behavioral change of test-networkmanager-service.py, the test
      /remote_settings/remove_connection fails (test_remove_connection() at
      test-remote-settings-client.c:318).
      
      Fixes: 66a34803Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
      2ac34e43
  7. 07 Aug, 2014 20 commits
    • Thomas Haller's avatar
    • Dan Winship's avatar
      libnm-core, libnm-util: convert test-crypto, test-setting-8021x.c to gtestutils · 964b9f35
      Dan Winship authored
      Rather than having test-crypto and test-setting-8021x be programs that
      you have to pass arguments to to get them to run a single test, just
      have them run all of the tests themselves.
      
      This lets us get rid of the big "check-local" rule in Makefile.am and
      just use TESTS to run everything.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=734388
      964b9f35
    • Dan Winship's avatar
      Merge branch 'libnm-nmobj' (bgo #734228) · 7cd69584
      Dan Winship authored
      7cd69584
    • Dan Winship's avatar
      libnm: add a test for connection-deleted-while-being-created · 66a34803
      Dan Winship authored
      Since NMRemoteSettings doesn't announce new connections until it has
      fetched their properties, it's possible that a connection could get
      deleted while we're waiting for it to be created. NMRemoteSettings has
      code to deal with this, so add a test to make sure that it works.
      66a34803
    • Thomas Haller's avatar
      d83f3777
    • Dan Winship's avatar
      libnm: fix a g_signal_handler_find() call in NMRemoteSettings · 9ec70a88
      Dan Winship authored
      NMRemoteSettings was looking for a signal handler on an
      NMRemoteConnection using only G_SIGNAL_MATCH_FUNC, which means it
      would get tripped up if a connection was known to two different
      NMRemoteSettings objects at once. Although that can't happen now, it
      might in the future if NMRemoteConnection became an NMObject, so use
      G_SIGNAL_MATCH_DATA too.
      9ec70a88
    • Dan Winship's avatar
      libnm: remove NMRemoteConnection::updated signal · f8762f7d
      Dan Winship authored
      Remove NMRemoteConnection::updated, which since 0.9.10 has been
      redundant with NMConnection::changed. (We still handle the incoming
      D-Bus signal, we just don't re-emit it as "updated", since the call to
      nm_connection_replace_settings() already results in it emitting
      "changed".)
      f8762f7d
    • Dan Winship's avatar
      libnm: port NMRemoteSettings to NMObject · 57e802f3
      Dan Winship authored
      NMRemoteSettings duplicates a bunch of NMObject's functionality that
      it doesn't need to. In libnm-glib, it wouldn't have been possible to
      port NMRemoteSettings to NMObject without breaking ABI, but now in
      libnm we can do that.
      
      As a side effect of this, NMRemoteSettings gains a "connections"
      property, and "connection-added" and "connection-removed" signals
      (with the former replacing the old "new-connection" signal). This also
      removes the "connections-loaded" signal, since the connections will
      now always be loaded (via the initialization of the "connections"
      property) during init()/init_async().
      
      Also, this removes NMRemoteConnection's "removed" signal, since it's
      redundant with the new NMRemoteSettings::connection-removed (and
      having the signal on NMRemoteSettings instead is more consistent with
      other objects).
      57e802f3
    • Dan Winship's avatar
      libnm: add NMRemoteConnection:visible property · d7e99f83
      Dan Winship authored
      Rather than having a private "visible" signal, have a public "visible"
      property.
      d7e99f83
    • Dan Winship's avatar
      libnm: remove redundant NM name watching code · c4a86eba
      Dan Winship authored
      NMClient was watching to see whether NetworkManager was running, but
      its parent class NMObject was already doing that anyway, so NMClient
      doesn't need to do it itself.
      
      This also requires making NMClient:init_async() wait for NMObject's
      init_async() code to finish before calling GetPermissions, rather than
      running the two in parallel like before (since we don't know if NM is
      running or not until after NMObject's init_async() returns). This is
      probably more correct anyway in terms of inheritance, and it's not as
      much slower than the original code as it sounds, since previously
      we were calling NameHasOwner twice (in serial) anyway.
      c4a86eba
    • Dan Winship's avatar
      libnm: synchronize NMClient and NMRemoteSettings "is NM running" properties · 8ce06b81
      Dan Winship authored
      Rename NMClient:manager-running and NMRemoteSettings:service-running
      to both be :nm-running.
      8ce06b81
    • Dan Winship's avatar
      libnm, libnm-glib: belatedly replace _nm_client_is_object_path() · 7e791ce3
      Dan Winship authored
      _nm_client_is_object_path() had been copied from
      g_variant_is_object_path() with a note that it should be replaced when
      we depended on GLib > 2.24, but it got missed when we actually updated
      the dependency. Fix it now. (Also fix a nearby typo.)
      7e791ce3
    • Dan Winship's avatar
    • Dan Winship's avatar
      core: update data types of some hwaddr properties · b019348f
      Dan Winship authored
      Now that we have nm_utils_hwaddr_matches() for comparing addresses
      (even when one is a string and the other binary), there are now places
      where it's more convenient to store hardware addresses as strings
      rather than binary, since we want them in string form for most
      non-comparison purposes. So update for that.
      
      In particular, this also changes nm_device_get_hw_address() to return
      a string.
      
      Also, simplify the update_permanent_hw_address() implementations by
      assuming that they will only be called once. (Since they will.)
      b019348f
    • Dan Winship's avatar
      libnm-core, etc: add nm_utils_hwaddr_matches() · 44b9a870
      Dan Winship authored
      Add nm_utils_hwaddr_matches(), for comparing hardware addresses for
      equality, allowing either binary or ASCII hardware addresses to be
      passed, and handling the special rules for InfiniBand hardware
      addresses automatically. Update code to use it.
      44b9a870
    • Dan Winship's avatar
      libnm-core: include ETH_ALEN/INFINIBAND_ALEN defines in nm-utils.h · 357efd26
      Dan Winship authored
      Include <linux/if_ether.h> and <linux/if_infiniband.h> from
      nm-utils.h, to get ETH_ALEN and INFINIBAND_ALEN, and remove those
      includes (as well as <net/ethernet.h> and <netinet/ether.h>, and
      various headers that had been included to get the ARPHRD_* constants)
      from other files where they're not needed now.
      357efd26
    • Dan Winship's avatar
      all: remove use of struct ether_addr / ether_aton() · ea456aaa
      Dan Winship authored
      Lots of old code used struct ether_addr to store hardware addresses,
      and ether_aton() to parse them, but more recent code generally uses
      guint8 arrays, and the nm_utils_hwaddr_* methods, to be able to share
      code between ETH_ALEN and INFINIBAND_ALEN cases. So update the old
      code to match the new. (In many places, this ends up getting rid of
      casts between struct ether_addr and guint8* anyway.)
      
      (Also, in some places, variables were switched from struct ether_addr
      to guint8[] a while back, but some code still used "&" when referring
      to them even though that's unnecessary now. Clean that up.)
      ea456aaa
    • Dan Winship's avatar
      libnm-core: rewrite nm_utils_hwaddr_ntoa() · 0dcba8a9
      Dan Winship authored
      Rather than returning from the middle of the loop, just rearrange
      things so we can exit the loop like normal people.
      0dcba8a9
    • Dan Winship's avatar
      libnm-core, etc: drop type-based hwaddr funcs, port to length-based ones · 35f36ba4
      Dan Winship authored
      Drop the arptype-based nm_utils_hwaddr funcs, and rename the
      length-based ones to no longer have _len in their names. This also
      switches nm_utils_hwaddr_atoba() to using a length rather than an
      arptype, and adds a length argument to nm_utils_hwaddr_valid() (making
      nm_utils_hwaddr_valid() now a replacement for nm_utils_hwaddr_aton()
      in some places, where we were only using aton() to do validity
      checking).
      35f36ba4
    • Thomas Haller's avatar
  8. 06 Aug, 2014 2 commits
  9. 05 Aug, 2014 1 commit
  10. 04 Aug, 2014 4 commits
  11. 01 Aug, 2014 4 commits