1. 19 Nov, 2014 1 commit
  2. 13 Nov, 2014 1 commit
    • Dan Winship's avatar
      all: consistently include config.h · 3bfb163a
      Dan Winship authored
      config.h should be included from every .c file, and it should be
      included before any other include. Fix that.
      
      (As a side effect of how I did this, this also changes us to
      consistently use "config.h" rather than <config.h>. To the extent that
      it matters [which is not much], quotes are more correct anyway, since
      we're talking about a file in our own build tree, not a system
      include.)
      3bfb163a
  3. 07 Nov, 2014 3 commits
    • Dan Winship's avatar
      all: allow route metrics to be "0" · e374923b
      Dan Winship authored
      Change NMIPRoute to use "-1" for "default", so that "0" is a valid
      metric. Update everything for that.
      e374923b
    • Dan Winship's avatar
      libnm-core: add NMSettingIPConfig:gateway, drop NMIPAddress:gateway · f17699f4
      Dan Winship authored
      The gateway is a global property of the IPv4/IPv6 configuration, not
      an attribute of any particular address. So represent it as such in the
      API; remove the gateway from NMIPAddress, and add it to
      NMSettingIPConfig.
      
      Behind the scenes, the gateway is still serialized along with the
      first address in NMSettingIPConfig:addresses, and is deserialized from
      that if the settings dictionary doesn't contain a 'gateway' key.
      
      Adjust nmcli's interactive mode to prompt for IP addresses and gateway
      separately. (Patch partly from Jirka Klimeš.)
      f17699f4
    • Dan Winship's avatar
      libnm-core, all: merge IPv4 and IPv6 address/route types · 21c8a6b2
      Dan Winship authored
      Merge NMIP4Address and NMIP6Address into NMIPAddress, and NMIP4Route
      and NMIP6Route into NMIPRoute. The new types represent IP addresses as
      strings, rather than in binary, and so are address-family agnostic.
      21c8a6b2
  4. 18 Sep, 2014 3 commits
    • Dan Winship's avatar
      libnm-core: change connection hash tables to variants in API · acf86f68
      Dan Winship authored
      In preparation for porting to GDBus, make nm_connection_to_dbus(),
      etc, represent connections as GVariants of type 'a{sa{sv}}' rather
      than as GHashTables-of-GHashTables-of-GValues.
      
      This means we're constantly converting back and forth internally, but
      this is just a stepping stone on the way to the full GDBus port, and
      all of that code will go away again later.
      acf86f68
    • Dan Winship's avatar
      dispatcher: port to GDBus · 1a5cfc1f
      Dan Winship authored
      Port nm-dispatcher to GDBus, mostly, using dbus-glib's GVariant
      utilities to translate the return value of nm_connection_to_dbus().
      1a5cfc1f
    • Dan Winship's avatar
      dispatcher: trivial code rearrangement · 408e86dd
      Dan Winship authored
      Reorganize some code in preparation for the GDBus port. (Most of the
      diff is actually just reindentation.)
      
      This also makes explicit something that was probably a bug;
      IP4_NUM_ROUTES is always set, even if it's "0" (while the same is not
      true of IP6_NUM_ROUTES). (This behavior is preserved for
      compatibility.)
      408e86dd
  5. 01 Aug, 2014 1 commit
    • Dan Winship's avatar
      libnm: rename NetworkManager.h and NetworkManagerVPN.h · 3ddce748
      Dan Winship authored
      "NetworkManager.h"'s name (and non-standard capitalization) suggest
      that it's some sort of high-level super-important header, but it's
      really just low-level D-Bus stuff. Rename it to "nm-dbus-interface.h"
      and likewise "NetworkManagerVPN.h" to "nm-vpn-dbus-interface.h"
      3ddce748
  6. 06 Jun, 2014 1 commit
  7. 18 Apr, 2014 1 commit
  8. 09 Dec, 2013 1 commit
  9. 07 Nov, 2013 1 commit
  10. 22 Oct, 2013 1 commit
    • Thomas Haller's avatar
      core: cleanup freeing of glib collections of pointers · 3eb1d5e9
      Thomas Haller authored
      When freeing one of the collections such as GArray, GPtrArray, GSList,
      etc. it is common that the items inside the connections must be
      freed/unrefed too.
      
      The previous code often iterated over the collection first with
      e.g. g_ptr_array_foreach and passing e.g. g_free as GFunc argument.
      For one, this has the problem, that g_free has a different signature
      GDestroyNotify then the expected GFunc. Moreover, this can be
      simplified either by setting a clear function
      (g_ptr_array_set_clear_func) or by passing the destroy function to the
      free function (g_slist_free_full).
      Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
      3eb1d5e9
  11. 03 Aug, 2013 1 commit
  12. 21 Jun, 2013 1 commit
    • Tomas Hozza's avatar
      dispatcher: expose domains in IP4/6 config · ac536c21
      Tomas Hozza authored
      Previously the function add_domains() expected the
      "domains" value to be of type DBUS_TYPE_G_ARRAY_OF_STRING
      but the value is in fact of type G_TYPE_STRV. Also
      added check to log critical message in case of "val"
      not holding G_TYPE_STRV type.
      
      This caused dispatcher not to export IPx_DOMAINS
      environment variable.
      Signed-off-by: Tomas Hozza's avatarTomas Hozza <thozza@redhat.com>
      ac536c21
  13. 11 May, 2011 2 commits
  14. 10 May, 2011 1 commit
  15. 03 May, 2011 1 commit
    • Dan Williams's avatar
      dispatcher: enhance dispatcher script environment (bgo #648382) · f898dbf1
      Dan Williams authored
      For VPN connections, the interface name would be that of the VPN's
      IP interface, but the script environment would be the that of the
      VPN's parent device.  Enhance the environment by adding any VPN
      specific details as additional environment variables prefixed by
      "VPN_".  Leave the existing environment setup intact for backwards
      compatiblity.
      
      Additionally, the dispatcher never got updated for IPv6 support,
      so push IPv6 configuration and DHCPv6 configuration into the
      environment too.
      
      Even better, push everything the dispatcher needs to it instead
      of making the dispatcher make D-Bus requests back to NM, which
      sometimes fails if NM has already torn down the device or the
      connection which the device was using.
      
      And add some testcases to ensure that we don't break backwards compat,
      the testcases here were grabbed from a 0.8.4 machine with a hacked up
      dispatcher to dump everything it was given from NM.
      f898dbf1