summary refs log tree commit diff
path: root/libnm-util
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-util')
-rw-r--r--libnm-util/Makefile.am19
-rw-r--r--libnm-util/Makefile.in45
-rw-r--r--libnm-util/NetworkManager.h4
-rw-r--r--libnm-util/crypto.c3
-rw-r--r--libnm-util/crypto.h2
-rw-r--r--libnm-util/crypto_gnutls.c146
-rw-r--r--libnm-util/crypto_nss.c4
-rw-r--r--libnm-util/libnm-util.ver2
-rw-r--r--libnm-util/nm-connection.c3
-rw-r--r--libnm-util/nm-dbus-glib-types.h45
-rw-r--r--libnm-util/nm-gvaluearray-compat.h104
-rw-r--r--libnm-util/nm-param-spec-specialized.c7
-rw-r--r--libnm-util/nm-param-spec-specialized.h2
-rw-r--r--libnm-util/nm-setting-8021x.c1
-rw-r--r--libnm-util/nm-setting-adsl.c1
-rw-r--r--libnm-util/nm-setting-bluetooth.c1
-rw-r--r--libnm-util/nm-setting-bond.c1
-rw-r--r--libnm-util/nm-setting-bridge-port.c1
-rw-r--r--libnm-util/nm-setting-bridge.c1
-rw-r--r--libnm-util/nm-setting-cdma.c1
-rw-r--r--libnm-util/nm-setting-connection.c1
-rw-r--r--libnm-util/nm-setting-dcb.c1
-rw-r--r--libnm-util/nm-setting-gsm.c1
-rw-r--r--libnm-util/nm-setting-infiniband.c1
-rw-r--r--libnm-util/nm-setting-ip4-config.c43
-rw-r--r--libnm-util/nm-setting-ip4-config.h3
-rw-r--r--libnm-util/nm-setting-ip6-config.c3
-rw-r--r--libnm-util/nm-setting-olpc-mesh.c1
-rw-r--r--libnm-util/nm-setting-ppp.c2
-rw-r--r--libnm-util/nm-setting-pppoe.c1
-rw-r--r--libnm-util/nm-setting-private.h4
-rw-r--r--libnm-util/nm-setting-serial.c2
-rw-r--r--libnm-util/nm-setting-team-port.c1
-rw-r--r--libnm-util/nm-setting-team.c1
-rw-r--r--libnm-util/nm-setting-vlan.c10
-rw-r--r--libnm-util/nm-setting-vlan.h8
-rw-r--r--libnm-util/nm-setting-vpn.c1
-rw-r--r--libnm-util/nm-setting-vpn.h4
-rw-r--r--libnm-util/nm-setting-wimax.c17
-rw-r--r--libnm-util/nm-setting-wimax.h5
-rw-r--r--libnm-util/nm-setting-wired.c1
-rw-r--r--libnm-util/nm-setting-wireless-security.c1
-rw-r--r--libnm-util/nm-setting-wireless.c42
-rw-r--r--libnm-util/nm-setting-wireless.h3
-rw-r--r--libnm-util/nm-setting.c5
-rw-r--r--libnm-util/nm-utils-enum-types.c3
-rw-r--r--libnm-util/nm-utils.c5
-rw-r--r--libnm-util/nm-value-transforms.c3
-rw-r--r--libnm-util/nm-version.h14
-rw-r--r--libnm-util/tests/Makefile.am4
-rw-r--r--libnm-util/tests/Makefile.in22
-rw-r--r--libnm-util/tests/test-crypto.c3
-rw-r--r--libnm-util/tests/test-general.c5
-rw-r--r--libnm-util/tests/test-libnm-linking.c3
-rw-r--r--libnm-util/tests/test-secrets.c2
-rw-r--r--libnm-util/tests/test-setting-8021x.c2
-rw-r--r--libnm-util/tests/test-setting-dcb.c25
-rw-r--r--libnm-util/tests/test-settings-defaults.c2
58 files changed, 432 insertions, 216 deletions
diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am
index f83780dc..6e637908 100644
--- a/libnm-util/Makefile.am
+++ b/libnm-util/Makefile.am
@@ -4,17 +4,18 @@ SUBDIRS = . tests
 
 AM_CPPFLAGS = \
 	-I${top_srcdir} \
-	-I${top_srcdir}/include \
-	-I$(top_builddir)/include \
+	-I${top_srcdir}/shared \
+	-I$(top_builddir)/shared \
 	-DG_LOG_DOMAIN=\""libnm-util"\" \
 	-DLOCALEDIR=\"$(datadir)/locale\" \
+	-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY \
 	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
 	$(GLIB_CFLAGS) \
 	$(DBUS_CFLAGS) \
 	$(UUID_CFLAGS)
 
 if WITH_GNUTLS
-AM_CPPFLAGS += $(LIBGCRYPT_CFLAGS) $(GNUTLS_CFLAGS)
+AM_CPPFLAGS += $(GNUTLS_CFLAGS)
 endif
 
 if WITH_NSS
@@ -24,7 +25,7 @@ endif
 lib_LTLIBRARIES=libnm-util.la
 
 libnm_util_include_HEADERS = 		\
-	$(top_builddir)/include/nm-version-macros.h \
+	$(top_builddir)/shared/nm-version-macros.h \
 	NetworkManager.h		\
 	NetworkManagerVPN.h		\
 	nm-connection.h			\
@@ -63,9 +64,11 @@ nodist_libnm_util_include_HEADERS = \
 
 libnm_util_la_private_headers = \
 	crypto.h			\
+	nm-dbus-glib-types.h		\
+	nm-gvaluearray-compat.h		\
 	nm-param-spec-specialized.h	\
-	nm-utils-private.h		\
-	nm-setting-private.h
+	nm-setting-private.h		\
+	nm-utils-private.h
 
 libnm_util_la_csources = \
 	crypto.c			\
@@ -121,7 +124,7 @@ libnm_util_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \
 
 if WITH_GNUTLS
 libnm_util_la_SOURCES += crypto_gnutls.c
-libnm_util_la_LIBADD += $(LIBGCRYPT_LIBS) $(GNUTLS_LIBS)
+libnm_util_la_LIBADD += $(GNUTLS_LIBS)
 endif
 
 if WITH_NSS
@@ -145,7 +148,7 @@ libtest_crypto_la_LIBADD = \
 
 if WITH_GNUTLS
 libtest_crypto_la_SOURCES += crypto_gnutls.c
-libtest_crypto_la_LIBADD += $(LIBGCRYPT_LIBS) $(GNUTLS_LIBS)
+libtest_crypto_la_LIBADD += $(GNUTLS_LIBS)
 endif
 
 if WITH_NSS
diff --git a/libnm-util/Makefile.in b/libnm-util/Makefile.in
index 03f0eb24..d6085cca 100644
--- a/libnm-util/Makefile.in
+++ b/libnm-util/Makefile.in
@@ -90,14 +90,14 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-@WITH_GNUTLS_TRUE@am__append_1 = $(LIBGCRYPT_CFLAGS) $(GNUTLS_CFLAGS)
+@WITH_GNUTLS_TRUE@am__append_1 = $(GNUTLS_CFLAGS)
 @WITH_NSS_TRUE@am__append_2 = $(NSS_CFLAGS)
 @WITH_GNUTLS_TRUE@am__append_3 = crypto_gnutls.c
-@WITH_GNUTLS_TRUE@am__append_4 = $(LIBGCRYPT_LIBS) $(GNUTLS_LIBS)
+@WITH_GNUTLS_TRUE@am__append_4 = $(GNUTLS_LIBS)
 @WITH_NSS_TRUE@am__append_5 = crypto_nss.c
 @WITH_NSS_TRUE@am__append_6 = $(NSS_LIBS)
 @WITH_GNUTLS_TRUE@am__append_7 = crypto_gnutls.c
-@WITH_GNUTLS_TRUE@am__append_8 = $(LIBGCRYPT_LIBS) $(GNUTLS_LIBS)
+@WITH_GNUTLS_TRUE@am__append_8 = $(GNUTLS_LIBS)
 @WITH_NSS_TRUE@am__append_9 = crypto_nss.c
 @WITH_NSS_TRUE@am__append_10 = $(NSS_LIBS)
 @HAVE_INTROSPECTION_TRUE@am__append_11 = NetworkManager-1.0.gir
@@ -157,8 +157,7 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \
 	"$(DESTDIR)$(libnm_util_includedir)"
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-@WITH_GNUTLS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \
-@WITH_GNUTLS_TRUE@	$(am__DEPENDENCIES_1)
+@WITH_GNUTLS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
 @WITH_NSS_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
 libnm_util_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -176,8 +175,9 @@ am__libnm_util_la_SOURCES_DIST = crypto.c nm-connection.c \
 	nm-setting-wired.c nm-setting-wireless.c \
 	nm-setting-wireless-security.c nm-setting-vpn.c \
 	nm-utils-enum-types.c nm-utils.c nm-value-transforms.c \
-	crypto.h nm-param-spec-specialized.h nm-utils-private.h \
-	nm-setting-private.h crypto_gnutls.c crypto_nss.c
+	crypto.h nm-dbus-glib-types.h nm-gvaluearray-compat.h \
+	nm-param-spec-specialized.h nm-setting-private.h \
+	nm-utils-private.h crypto_gnutls.c crypto_nss.c
 am__objects_1 = crypto.lo nm-connection.lo \
 	nm-param-spec-specialized.lo nm-setting.lo nm-setting-8021x.lo \
 	nm-setting-adsl.lo nm-setting-bluetooth.lo nm-setting-bond.lo \
@@ -335,7 +335,6 @@ BLUEZ5_LIBS = @BLUEZ5_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
-CKDB_PATH = @CKDB_PATH@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
@@ -347,8 +346,6 @@ CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_GLIB_100_CFLAGS = @DBUS_GLIB_100_CFLAGS@
-DBUS_GLIB_100_LIBS = @DBUS_GLIB_100_LIBS@
 DBUS_LIBS = @DBUS_LIBS@
 DBUS_SYS_DIR = @DBUS_SYS_DIR@
 DEFS = @DEFS@
@@ -358,6 +355,7 @@ DHCPCD_PATH = @DHCPCD_PATH@
 DISTRO_NETWORK_SERVICE = @DISTRO_NETWORK_SERVICE@
 DLLTOOL = @DLLTOOL@
 DNSMASQ_PATH = @DNSMASQ_PATH@
+DNSSEC_TRIGGER_SCRIPT = @DNSSEC_TRIGGER_SCRIPT@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -412,16 +410,13 @@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
 INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
 IPTABLES_PATH = @IPTABLES_PATH@
-IWMX_SDK_CFLAGS = @IWMX_SDK_CFLAGS@
-IWMX_SDK_LIBS = @IWMX_SDK_LIBS@
 KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@
 LCOV = @LCOV@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBAUDIT_CFLAGS = @LIBAUDIT_CFLAGS@
+LIBAUDIT_LIBS = @LIBAUDIT_LIBS@
 LIBDL = @LIBDL@
-LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
-LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
-LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBM = @LIBM@
@@ -458,6 +453,8 @@ NEWT_LIBS = @NEWT_LIBS@
 NM = @NM@
 NMEDIT = @NMEDIT@
 NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@
+NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT = @NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT@
+NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT = @NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT@
 NM_MAJOR_VERSION = @NM_MAJOR_VERSION@
 NM_MICRO_VERSION = @NM_MICRO_VERSION@
 NM_MINOR_VERSION = @NM_MINOR_VERSION@
@@ -486,7 +483,6 @@ POLKIT_LIBS = @POLKIT_LIBS@
 POSUB = @POSUB@
 PPPD_PATH = @PPPD_PATH@
 PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
-PPPOE_PATH = @PPPOE_PATH@
 QT_CFLAGS = @QT_CFLAGS@
 QT_LIBS = @QT_LIBS@
 RANLIB = @RANLIB@
@@ -501,6 +497,8 @@ SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@
 SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@
 SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@
 SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@
+SYSTEMD_JOURNAL_CFLAGS = @SYSTEMD_JOURNAL_CFLAGS@
+SYSTEMD_JOURNAL_LIBS = @SYSTEMD_JOURNAL_LIBS@
 SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@
 SYSTEMD_LOGIN_LIBS = @SYSTEMD_LOGIN_LIBS@
 SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
@@ -561,6 +559,7 @@ mkdir_p = @mkdir_p@
 nmbinary = @nmbinary@
 nmconfdir = @nmconfdir@
 nmdatadir = @nmdatadir@
+nmlibdir = @nmlibdir@
 nmrundir = @nmrundir@
 nmstatedir = @nmstatedir@
 oldincludedir = @oldincludedir@
@@ -568,6 +567,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -584,14 +584,15 @@ with_netconfig = @with_netconfig@
 with_resolvconf = @with_resolvconf@
 with_valgrind = @with_valgrind@
 SUBDIRS = . tests
-AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/include \
-	-I$(top_builddir)/include -DG_LOG_DOMAIN=\""libnm-util"\" \
+AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/shared \
+	-I$(top_builddir)/shared -DG_LOG_DOMAIN=\""libnm-util"\" \
 	-DLOCALEDIR=\"$(datadir)/locale\" \
+	-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY \
 	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE $(GLIB_CFLAGS) \
 	$(DBUS_CFLAGS) $(UUID_CFLAGS) $(am__append_1) $(am__append_2)
 lib_LTLIBRARIES = libnm-util.la
 libnm_util_include_HEADERS = \
-	$(top_builddir)/include/nm-version-macros.h \
+	$(top_builddir)/shared/nm-version-macros.h \
 	NetworkManager.h		\
 	NetworkManagerVPN.h		\
 	nm-connection.h			\
@@ -630,9 +631,11 @@ nodist_libnm_util_include_HEADERS = \
 
 libnm_util_la_private_headers = \
 	crypto.h			\
+	nm-dbus-glib-types.h		\
+	nm-gvaluearray-compat.h		\
 	nm-param-spec-specialized.h	\
-	nm-utils-private.h		\
-	nm-setting-private.h
+	nm-setting-private.h		\
+	nm-utils-private.h
 
 libnm_util_la_csources = \
 	crypto.c			\
diff --git a/libnm-util/NetworkManager.h b/libnm-util/NetworkManager.h
index d83e4ab5..8101082b 100644
--- a/libnm-util/NetworkManager.h
+++ b/libnm-util/NetworkManager.h
@@ -151,6 +151,8 @@ typedef enum {
  * @NM_DEVICE_TYPE_ADSL: ADSL modem
  * @NM_DEVICE_TYPE_BRIDGE: a bridge master interface
  * @NM_DEVICE_TYPE_TEAM: a team master interface
+ * @NM_DEVICE_TYPE_TUN: a TUN/TAP interface
+ * @NM_DEVICE_TYPE_IP_TUNNEL: an IP tunnel interface
  *
  * #NMDeviceType values indicate the type of hardware represented by
  * an #NMDevice.
@@ -174,6 +176,8 @@ typedef enum {
 	NM_DEVICE_TYPE_BRIDGE     = 13,
 	NM_DEVICE_TYPE_GENERIC    = 14,
 	NM_DEVICE_TYPE_TEAM       = 15,
+	NM_DEVICE_TYPE_TUN        = 16,
+	NM_DEVICE_TYPE_IP_TUNNEL  = 17,
 } NMDeviceType;
 
 /**
diff --git a/libnm-util/crypto.c b/libnm-util/crypto.c
index 8a10af94..757fdbe0 100644
--- a/libnm-util/crypto.c
+++ b/libnm-util/crypto.c
@@ -23,13 +23,12 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <string.h>
 #include <strings.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include <glib/gi18n-lib.h>
 
+#include "nm-default.h"
 #include "crypto.h"
 
 GQuark
diff --git a/libnm-util/crypto.h b/libnm-util/crypto.h
index 315d8fec..74d1adbf 100644
--- a/libnm-util/crypto.h
+++ b/libnm-util/crypto.h
@@ -24,7 +24,7 @@
 #ifndef __CRYPTO_H__
 #define __CRYPTO_H__
 
-#include <glib.h>
+#include "nm-default.h"
 
 #define MD5_HASH_LEN 20
 #define CIPHER_DES_EDE3_CBC "DES-EDE3-CBC"
diff --git a/libnm-util/crypto_gnutls.c b/libnm-util/crypto_gnutls.c
index 3bec24ad..4e3e4e7c 100644
--- a/libnm-util/crypto_gnutls.c
+++ b/libnm-util/crypto_gnutls.c
@@ -18,19 +18,17 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  *
- * Copyright 2007 - 2009 Red Hat, Inc.
+ * Copyright 2007 - 2015 Red Hat, Inc.
  */
 
 #include "config.h"
 
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-
-#include <gcrypt.h>
 #include <gnutls/gnutls.h>
+#include <gnutls/crypto.h>
 #include <gnutls/x509.h>
 #include <gnutls/pkcs12.h>
 
+#include "nm-default.h"
 #include "crypto.h"
 
 #define SALT_LEN 8
@@ -65,8 +63,8 @@ crypto_md5_hash (const char *salt,
                  gsize buflen,
                  GError **error)
 {
-	gcry_md_hd_t ctx;
-	gcry_error_t err;
+	gnutls_hash_hd_t ctx;
+	int err;
 	int nkey = buflen;
 	const gsize digest_len = 16;
 	int count = 0;
@@ -81,26 +79,27 @@ crypto_md5_hash (const char *salt,
 	g_return_val_if_fail (buffer != NULL, FALSE);
 	g_return_val_if_fail (buflen > 0, FALSE);
 
-	err = gcry_md_open (&ctx, GCRY_MD_MD5, 0);
-	if (err) {
+	if (gnutls_hash_get_len (GNUTLS_DIG_MD5) > MD5_HASH_LEN) {
 		g_set_error (error, NM_CRYPTO_ERROR,
 		             NM_CRYPTO_ERR_MD5_INIT_FAILED,
-		             _("Failed to initialize the MD5 engine: %s / %s."),
-		             gcry_strsource (err), gcry_strerror (err));
+		             _("Hash length too long (%d > %d)."),
+		             gnutls_hash_get_len (GNUTLS_DIG_MD5), MD5_HASH_LEN);
 		return FALSE;
 	}
 
 	while (nkey > 0) {
 		int i = 0;
 
+		err = gnutls_hash_init (&ctx, GNUTLS_DIG_MD5);
+		if (err < 0)
+			goto error;
+
 		if (count++)
-			gcry_md_write (ctx, digest, digest_len);
-		gcry_md_write (ctx, password, password_len);
+			gnutls_hash (ctx, digest, digest_len);
+		gnutls_hash (ctx, password, password_len);
 		if (salt)
-			gcry_md_write (ctx, salt, SALT_LEN); /* Only use 8 bytes of salt */
-		gcry_md_final (ctx);
-		memcpy (digest, gcry_md_read (ctx, 0), digest_len);
-		gcry_md_reset (ctx);
+			gnutls_hash (ctx, salt, SALT_LEN); /* Only use 8 bytes of salt */
+		gnutls_hash_deinit (ctx, digest);
 
 		while (nkey && (i < digest_len)) {
 			*(p++) = digest[i++];
@@ -109,8 +108,14 @@ crypto_md5_hash (const char *salt,
 	}
 
 	memset (digest, 0, sizeof (digest));
-	gcry_md_close (ctx);
 	return TRUE;
+error:
+	memset (digest, 0, sizeof (digest));
+	g_set_error (error, NM_CRYPTO_ERROR,
+	             NM_CRYPTO_ERR_MD5_INIT_FAILED,
+	             _("Failed to initialize the MD5 engine: %s (%s)"),
+	             gnutls_strerror_name (err), gnutls_strerror (err));
+	return FALSE;
 }
 
 char *
@@ -124,21 +129,22 @@ crypto_decrypt (const char *cipher,
                 gsize *out_len,
                 GError **error)
 {
-	gcry_cipher_hd_t ctx;
-	gcry_error_t err;
+	gnutls_cipher_hd_t ctx;
+	gnutls_datum_t key_dt, iv_dt;
+	int err;
 	int cipher_mech, i;
 	char *output = NULL;
 	gboolean success = FALSE;
 	gsize pad_len, real_iv_len;
 
 	if (!strcmp (cipher, CIPHER_DES_EDE3_CBC)) {
-		cipher_mech = GCRY_CIPHER_3DES;
+		cipher_mech = GNUTLS_CIPHER_3DES_CBC;
 		real_iv_len = SALT_LEN;
 	} else if (!strcmp (cipher, CIPHER_DES_CBC)) {
-		cipher_mech = GCRY_CIPHER_DES;
+		cipher_mech = GNUTLS_CIPHER_DES_CBC;
 		real_iv_len = SALT_LEN;
 	} else if (!strcmp (cipher, CIPHER_AES_CBC)) {
-		cipher_mech = GCRY_CIPHER_AES;
+		cipher_mech = GNUTLS_CIPHER_AES_128_CBC;
 		real_iv_len = 16;
 	} else {
 		g_set_error (error, NM_CRYPTO_ERROR,
@@ -158,39 +164,26 @@ crypto_decrypt (const char *cipher,
 
 	output = g_malloc0 (data->len);
 
-	err = gcry_cipher_open (&ctx, cipher_mech, GCRY_CIPHER_MODE_CBC, 0);
-	if (err) {
-		g_set_error (error, NM_CRYPTO_ERROR,
-		             NM_CRYPTO_ERR_CIPHER_INIT_FAILED,
-		             _("Failed to initialize the decryption cipher context: %s / %s."),
-		             gcry_strsource (err), gcry_strerror (err));
-		goto out;
-	}
+	key_dt.data = (unsigned char *) key;
+	key_dt.size = key_len;
+	iv_dt.data = (unsigned char *) iv;
+	iv_dt.size = iv_len;
 
-	err = gcry_cipher_setkey (ctx, key, key_len);
-	if (err) {
-		g_set_error (error, NM_CRYPTO_ERROR,
-		             NM_CRYPTO_ERR_CIPHER_SET_KEY_FAILED,
-		             _("Failed to set symmetric key for decryption: %s / %s."),
-		             gcry_strsource (err), gcry_strerror (err));
-		goto out;
-	}
-
-	err = gcry_cipher_setiv (ctx, iv, iv_len);
-	if (err) {
+	err = gnutls_cipher_init (&ctx, cipher_mech, &key_dt, &iv_dt);
+	if (err < 0) {
 		g_set_error (error, NM_CRYPTO_ERROR,
-		             NM_CRYPTO_ERR_CIPHER_SET_IV_FAILED,
-		             _("Failed to set IV for decryption: %s / %s."),
-		             gcry_strsource (err), gcry_strerror (err));
+		             NM_CRYPTO_ERR_CIPHER_INIT_FAILED,
+		             _("Failed to initialize the decryption cipher context: %s (%s)"),
+		             gnutls_strerror_name (err), gnutls_strerror (err));
 		goto out;
 	}
 
-	err = gcry_cipher_decrypt (ctx, output, data->len, data->data, data->len);
-	if (err) {
+	err = gnutls_cipher_decrypt2 (ctx, data->data, data->len, output, data->len);
+	if (err < 0) {
 		g_set_error (error, NM_CRYPTO_ERROR,
 		             NM_CRYPTO_ERR_CIPHER_DECRYPT_FAILED,
-		             _("Failed to decrypt the private key: %s / %s."),
-		             gcry_strsource (err), gcry_strerror (err));
+		             _("Failed to decrypt the private key: %s (%s)"),
+		             gnutls_strerror_name (err), gnutls_strerror (err));
 		goto out;
 	}
 	pad_len = output[data->len - 1];
@@ -227,7 +220,7 @@ out:
 			output = NULL;
 		}
 	}
-	gcry_cipher_close (ctx);
+	gnutls_cipher_deinit (ctx);
 	return output;
 }
 
@@ -241,8 +234,9 @@ crypto_encrypt (const char *cipher,
                 gsize *out_len,
                 GError **error)
 {
-	gcry_cipher_hd_t ctx;
-	gcry_error_t err;
+	gnutls_cipher_hd_t ctx;
+	gnutls_datum_t key_dt, iv_dt;
+	int err;
 	int cipher_mech;
 	char *output = NULL;
 	gboolean success = FALSE;
@@ -252,10 +246,10 @@ crypto_encrypt (const char *cipher,
 	gsize salt_len;
 
 	if (!strcmp (cipher, CIPHER_DES_EDE3_CBC)) {
-		cipher_mech = GCRY_CIPHER_3DES;
+		cipher_mech = GNUTLS_CIPHER_3DES_CBC;
 		salt_len = SALT_LEN;
 	} else if (!strcmp (cipher, CIPHER_AES_CBC)) {
-		cipher_mech = GCRY_CIPHER_AES;
+		cipher_mech = GNUTLS_CIPHER_AES_128_CBC;
 		salt_len = iv_len;
 	} else {
 		g_set_error (error, NM_CRYPTO_ERROR,
@@ -278,40 +272,26 @@ crypto_encrypt (const char *cipher,
 
 	output = g_malloc0 (output_len);
 
-	err = gcry_cipher_open (&ctx, cipher_mech, GCRY_CIPHER_MODE_CBC, 0);
-	if (err) {
-		g_set_error (error, NM_CRYPTO_ERROR,
-		             NM_CRYPTO_ERR_CIPHER_INIT_FAILED,
-		             _("Failed to initialize the encryption cipher context: %s / %s."),
-		             gcry_strsource (err), gcry_strerror (err));
-		goto out;
-	}
-
-	err = gcry_cipher_setkey (ctx, key, key_len);
-	if (err) {
-		g_set_error (error, NM_CRYPTO_ERROR,
-		             NM_CRYPTO_ERR_CIPHER_SET_KEY_FAILED,
-		             _("Failed to set symmetric key for encryption: %s / %s."),
-		             gcry_strsource (err), gcry_strerror (err));
-		goto out;
-	}
+	key_dt.data = (unsigned char *) key;
+	key_dt.size = key_len;
+	iv_dt.data = (unsigned char *) iv;
+	iv_dt.size = iv_len;
 
-	/* gcrypt only wants 8 bytes of the IV (same as the DES block length) */
-	err = gcry_cipher_setiv (ctx, iv, salt_len);
-	if (err) {
+	err = gnutls_cipher_init (&ctx, cipher_mech, &key_dt, &iv_dt);
+	if (err < 0) {
 		g_set_error (error, NM_CRYPTO_ERROR,
-		             NM_CRYPTO_ERR_CIPHER_SET_IV_FAILED,
-		             _("Failed to set IV for encryption: %s / %s."),
-		             gcry_strsource (err), gcry_strerror (err));
+		             NM_CRYPTO_ERR_CIPHER_INIT_FAILED,
+		             _("Failed to initialize the encryption cipher context: %s (%s)"),
+		             gnutls_strerror_name (err), gnutls_strerror (err));
 		goto out;
 	}
 
-	err = gcry_cipher_encrypt (ctx, output, output_len, padded_buf, padded_buf_len);
-	if (err) {
+	err = gnutls_cipher_encrypt2 (ctx, padded_buf, padded_buf_len, output, output_len);
+	if (err < 0) {
 		g_set_error (error, NM_CRYPTO_ERROR,
 		             NM_CRYPTO_ERR_CIPHER_DECRYPT_FAILED,
-		             _("Failed to encrypt the data: %s / %s."),
-		             gcry_strsource (err), gcry_strerror (err));
+		             _("Failed to encrypt the data: %s (%s)"),
+		             gnutls_strerror_name (err), gnutls_strerror (err));
 		goto out;
 	}
 
@@ -333,7 +313,7 @@ out:
 			output = NULL;
 		}
 	}
-	gcry_cipher_close (ctx);
+	gnutls_cipher_deinit (ctx);
 	return output;
 }
 
@@ -484,6 +464,6 @@ crypto_verify_pkcs8 (const GByteArray *data,
 gboolean
 crypto_randomize (void *buffer, gsize buffer_len, GError **error)
 {
-	gcry_randomize (buffer, buffer_len, GCRY_STRONG_RANDOM);
+	gnutls_rnd (GNUTLS_RND_RANDOM, buffer, buffer_len);
 	return TRUE;
 }
diff --git a/libnm-util/crypto_nss.c b/libnm-util/crypto_nss.c
index edd19b54..b71806dd 100644
--- a/libnm-util/crypto_nss.c
+++ b/libnm-util/crypto_nss.c
@@ -23,9 +23,6 @@
 
 #include "config.h"
 
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-
 #include <prinit.h>
 #include <nss.h>
 #include <pk11pub.h>
@@ -36,6 +33,7 @@
 #include <ciferfam.h>
 #include <p12plcy.h>
 
+#include "nm-default.h"
 #include "crypto.h"
 
 static gboolean initialized = FALSE;
diff --git a/libnm-util/libnm-util.ver b/libnm-util/libnm-util.ver
index 9d78e502..1ad853f5 100644
--- a/libnm-util/libnm-util.ver
+++ b/libnm-util/libnm-util.ver
@@ -355,6 +355,7 @@ global:
 	nm_setting_ip4_config_get_dhcp_client_id;
 	nm_setting_ip4_config_get_dhcp_hostname;
 	nm_setting_ip4_config_get_dhcp_send_hostname;
+	nm_setting_ip4_config_get_dhcp_timeout;
 	nm_setting_ip4_config_get_dns;
 	nm_setting_ip4_config_get_dns_search;
 	nm_setting_ip4_config_get_ignore_auto_dns;
@@ -562,6 +563,7 @@ global:
 	nm_setting_wireless_get_mtu;
 	nm_setting_wireless_get_num_mac_blacklist_items;
 	nm_setting_wireless_get_num_seen_bssids;
+	nm_setting_wireless_get_powersave;
 	nm_setting_wireless_get_rate;
 	nm_setting_wireless_get_security;
 	nm_setting_wireless_get_seen_bssid;
diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c
index e952835d..ea1492b7 100644
--- a/libnm-util/nm-connection.c
+++ b/libnm-util/nm-connection.c
@@ -22,10 +22,9 @@
 
 #include "config.h"
 
-#include <glib-object.h>
-#include <glib/gi18n-lib.h>
 #include <dbus/dbus-glib.h>
 #include <string.h>
+#include "nm-default.h"
 #include "nm-connection.h"
 #include "nm-utils.h"
 #include "nm-dbus-glib-types.h"
diff --git a/libnm-util/nm-dbus-glib-types.h b/libnm-util/nm-dbus-glib-types.h
new file mode 100644
index 00000000..ad11ab68
--- /dev/null
+++ b/libnm-util/nm-dbus-glib-types.h
@@ -0,0 +1,45 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2008 Red Hat, Inc.
+ */
+
+#ifndef __NM_DBUS_GLIB_TYPES_H__
+#define __NM_DBUS_GLIB_TYPES_H__
+
+#include <dbus/dbus-glib.h>
+
+#define DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH    (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH))
+#define DBUS_TYPE_G_ARRAY_OF_STRING         (dbus_g_type_get_collection ("GPtrArray", G_TYPE_STRING))
+#define DBUS_TYPE_G_ARRAY_OF_UINT           (dbus_g_type_get_collection ("GArray", G_TYPE_UINT))
+#define DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_UCHAR_ARRAY))
+#define DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT  (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_ARRAY_OF_UINT))
+#define DBUS_TYPE_G_MAP_OF_VARIANT          (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
+#define DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT   (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, DBUS_TYPE_G_MAP_OF_VARIANT))
+#define DBUS_TYPE_G_MAP_OF_STRING           (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING))
+#define DBUS_TYPE_G_LIST_OF_STRING          (dbus_g_type_get_collection ("GSList", G_TYPE_STRING))
+
+#define DBUS_TYPE_G_IP6_ADDRESS             (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_INVALID))
+#define DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS    (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_IP6_ADDRESS))
+#define DBUS_TYPE_G_IP6_ROUTE               (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, G_TYPE_INVALID))
+#define DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE      (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_IP6_ROUTE))
+
+#define DBUS_TYPE_NM_IP_ADDRESS             DBUS_TYPE_G_MAP_OF_VARIANT
+#define DBUS_TYPE_NM_IP_ADDRESSES           (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_NM_IP_ADDRESS))
+#define DBUS_TYPE_NM_IP_ROUTE               DBUS_TYPE_G_MAP_OF_VARIANT
+#define DBUS_TYPE_NM_IP_ROUTES              (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_NM_IP_ROUTE))
+
+#endif /* __NM_DBUS_GLIB_TYPES_H__ */
diff --git a/libnm-util/nm-gvaluearray-compat.h b/libnm-util/nm-gvaluearray-compat.h
new file mode 100644
index 00000000..424e6be7
--- /dev/null
+++ b/libnm-util/nm-gvaluearray-compat.h
@@ -0,0 +1,104 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2013 Red Hat, Inc.
+ */
+
+#ifndef __NM_GVALUEARRAY_COMPAT_H__
+#define __NM_GVALUEARRAY_COMPAT_H__
+
+#define g_value_array_get_type() \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_get_type (); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+#define g_value_array_get_nth(value_array, index_) \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_get_nth (value_array, index_); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+#define g_value_array_new(n_prealloced) \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_new (n_prealloced); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+static inline void
+__g_value_array_free (GValueArray *value_array)
+{
+	G_GNUC_EXTENSION ({
+		G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+		g_value_array_free (value_array);
+		G_GNUC_END_IGNORE_DEPRECATIONS
+	});
+}
+#define g_value_array_free __g_value_array_free
+
+#define g_value_array_copy(value_array) \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_copy (value_array); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+#define g_value_array_prepend(value_array, value) \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_prepend (value_array, value); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+#define g_value_array_append(value_array, value) \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_append (value_array, value); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+#define g_value_array_insert(value_array, index_, value) \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_insert (value_array, index_, value); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+#define g_value_array_remove(value_array, index_) \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_remove (value_array, index_); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+#define g_value_array_sort(value_array, compare_func) \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_sort (value_array, compare_func); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+#define g_value_array_sort_with_data(value_array, compare_func, user_data) \
+  G_GNUC_EXTENSION ({ \
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+    g_value_array_sort_with_data (value_array, compare_func, user_data); \
+    G_GNUC_END_IGNORE_DEPRECATIONS \
+  })
+
+#endif  /* __NM_GVALUEARRAY_COMPAT_H__ */
diff --git a/libnm-util/nm-param-spec-specialized.c b/libnm-util/nm-param-spec-specialized.c
index acb8aec3..7f242acf 100644
--- a/libnm-util/nm-param-spec-specialized.c
+++ b/libnm-util/nm-param-spec-specialized.c
@@ -22,8 +22,9 @@
 
 #include "config.h"
 
+#include "nm-default.h"
+#include "nm-gvaluearray-compat.h"
 #include "nm-param-spec-specialized.h"
-#include "nm-glib-compat.h"
 
 struct _NMParamSpecSpecialized {
 	GParamSpec parent;
@@ -953,9 +954,7 @@ main (int argc, char *argv[])
 {
 	DBusGConnection *bus;
 
-#if !GLIB_CHECK_VERSION (2, 35, 0)
-	g_type_init ();
-#endif
+	nm_g_type_init ();
 
 	bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
 
diff --git a/libnm-util/nm-param-spec-specialized.h b/libnm-util/nm-param-spec-specialized.h
index 7803e919..0f1228f6 100644
--- a/libnm-util/nm-param-spec-specialized.h
+++ b/libnm-util/nm-param-spec-specialized.h
@@ -23,7 +23,7 @@
 #ifndef NM_PARAM_SPEC_SPECIALIZED_H
 #define NM_PARAM_SPEC_SPECIALIZED_H
 
-#include <glib-object.h>
+#include "nm-default.h"
 
 typedef struct _NMParamSpecSpecialized NMParamSpecSpecialized;
 
diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c
index 678d70ab..30febf9c 100644
--- a/libnm-util/nm-setting-8021x.c
+++ b/libnm-util/nm-setting-8021x.c
@@ -24,7 +24,6 @@
 
 #include <string.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-8021x.h"
 #include "nm-param-spec-specialized.h"
diff --git a/libnm-util/nm-setting-adsl.c b/libnm-util/nm-setting-adsl.c
index 51560a78..55d04ce1 100644
--- a/libnm-util/nm-setting-adsl.c
+++ b/libnm-util/nm-setting-adsl.c
@@ -22,7 +22,6 @@
 #include "config.h"
 
 #include <string.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-adsl.h"
 #include "nm-setting-ppp.h"
diff --git a/libnm-util/nm-setting-bluetooth.c b/libnm-util/nm-setting-bluetooth.c
index 2867d73b..76bf2831 100644
--- a/libnm-util/nm-setting-bluetooth.c
+++ b/libnm-util/nm-setting-bluetooth.c
@@ -24,7 +24,6 @@
 
 #include <string.h>
 #include <net/ethernet.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-param-spec-specialized.h"
 #include "nm-dbus-glib-types.h"
diff --git a/libnm-util/nm-setting-bond.c b/libnm-util/nm-setting-bond.c
index fa12cf0e..c6e860bd 100644
--- a/libnm-util/nm-setting-bond.c
+++ b/libnm-util/nm-setting-bond.c
@@ -27,7 +27,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-bond.h"
 #include "nm-param-spec-specialized.h"
diff --git a/libnm-util/nm-setting-bridge-port.c b/libnm-util/nm-setting-bridge-port.c
index b3afa500..9da21925 100644
--- a/libnm-util/nm-setting-bridge-port.c
+++ b/libnm-util/nm-setting-bridge-port.c
@@ -25,7 +25,6 @@
 #include <ctype.h>
 #include <stdlib.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-bridge-port.h"
 #include "nm-utils.h"
diff --git a/libnm-util/nm-setting-bridge.c b/libnm-util/nm-setting-bridge.c
index bdaa75f9..1e475d30 100644
--- a/libnm-util/nm-setting-bridge.c
+++ b/libnm-util/nm-setting-bridge.c
@@ -25,7 +25,6 @@
 #include <ctype.h>
 #include <stdlib.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 #include <linux/if_ether.h>
 
 #include "nm-setting-bridge.h"
diff --git a/libnm-util/nm-setting-cdma.c b/libnm-util/nm-setting-cdma.c
index 94b10b1f..10981652 100644
--- a/libnm-util/nm-setting-cdma.c
+++ b/libnm-util/nm-setting-cdma.c
@@ -22,7 +22,6 @@
 #include "config.h"
 
 #include <string.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-cdma.h"
 #include "nm-utils.h"
diff --git a/libnm-util/nm-setting-connection.c b/libnm-util/nm-setting-connection.c
index bda89d63..abbe99ba 100644
--- a/libnm-util/nm-setting-connection.c
+++ b/libnm-util/nm-setting-connection.c
@@ -23,7 +23,6 @@
 #include "config.h"
 
 #include <string.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-utils.h"
 #include "nm-dbus-glib-types.h"
diff --git a/libnm-util/nm-setting-dcb.c b/libnm-util/nm-setting-dcb.c
index 89ee3878..da3febaa 100644
--- a/libnm-util/nm-setting-dcb.c
+++ b/libnm-util/nm-setting-dcb.c
@@ -23,7 +23,6 @@
 
 #include <string.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-dcb.h"
 #include "nm-param-spec-specialized.h"
diff --git a/libnm-util/nm-setting-gsm.c b/libnm-util/nm-setting-gsm.c
index e422c92e..bc9f31bc 100644
--- a/libnm-util/nm-setting-gsm.c
+++ b/libnm-util/nm-setting-gsm.c
@@ -23,7 +23,6 @@
 #include "config.h"
 
 #include <string.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-gsm.h"
 #include "nm-utils.h"
diff --git a/libnm-util/nm-setting-infiniband.c b/libnm-util/nm-setting-infiniband.c
index 1036702f..95fa0c69 100644
--- a/libnm-util/nm-setting-infiniband.c
+++ b/libnm-util/nm-setting-infiniband.c
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <dbus/dbus-glib.h>
 #include <linux/if_infiniband.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-infiniband.h"
 #include "nm-param-spec-specialized.h"
diff --git a/libnm-util/nm-setting-ip4-config.c b/libnm-util/nm-setting-ip4-config.c
index 4db43cbc..efc226b3 100644
--- a/libnm-util/nm-setting-ip4-config.c
+++ b/libnm-util/nm-setting-ip4-config.c
@@ -24,16 +24,14 @@
 
 #include <string.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
+#include "nm-default.h"
 #include "nm-setting-ip4-config.h"
 #include "nm-param-spec-specialized.h"
 #include "nm-utils.h"
 #include "nm-dbus-glib-types.h"
-#include "nm-glib-compat.h"
 #include "nm-setting-private.h"
 
-
 /**
  * SECTION:nm-setting-ip4-config
  * @short_description: Describes IPv4 addressing, routing, and name service properties
@@ -84,6 +82,7 @@ typedef struct {
 	char *dhcp_client_id;
 	gboolean dhcp_send_hostname;
 	char *dhcp_hostname;
+	int dhcp_timeout;
 	gboolean never_default;
 	gboolean may_fail;
 } NMSettingIP4ConfigPrivate;
@@ -99,6 +98,7 @@ enum {
 	PROP_IGNORE_AUTO_ROUTES,
 	PROP_IGNORE_AUTO_DNS,
 	PROP_DHCP_CLIENT_ID,
+	PROP_DHCP_TIMEOUT,
 	PROP_DHCP_SEND_HOSTNAME,
 	PROP_DHCP_HOSTNAME,
 	PROP_NEVER_DEFAULT,
@@ -803,6 +803,24 @@ nm_setting_ip4_config_get_dhcp_hostname (NMSettingIP4Config *setting)
 }
 
 /**
+ * nm_setting_ip4_config_get_dhcp_timeout:
+ * @setting: the #NMSettingIP4Config
+ *
+ * Returns the value contained in the #NMSettingIP4Config:dhcp-timeout
+ * property.
+ *
+ * Returns: The number of seconds after which unfinished DHCP transaction
+ * fails or zero for "default".
+ **/
+int
+nm_setting_ip4_config_get_dhcp_timeout (NMSettingIP4Config *setting)
+{
+	g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), 0);
+
+	return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->dhcp_timeout;
+}
+
+/**
  * nm_setting_ip4_config_get_never_default:
  * @setting: the #NMSettingIP4Config
  *
@@ -1052,6 +1070,9 @@ set_property (GObject *object, guint prop_id,
 		g_free (priv->dhcp_hostname);
 		priv->dhcp_hostname = g_value_dup_string (value);
 		break;
+	case PROP_DHCP_TIMEOUT:
+		priv->dhcp_timeout = g_value_get_uint (value);
+		break;
 	case PROP_NEVER_DEFAULT:
 		priv->never_default = g_value_get_boolean (value);
 		break;
@@ -1105,6 +1126,9 @@ get_property (GObject *object, guint prop_id,
 	case PROP_DHCP_HOSTNAME:
 		g_value_set_string (value, nm_setting_ip4_config_get_dhcp_hostname (setting));
 		break;
+	case PROP_DHCP_TIMEOUT:
+		g_value_set_uint (value, nm_setting_ip4_config_get_dhcp_timeout (setting));
+		break;
 	case PROP_NEVER_DEFAULT:
 		g_value_set_boolean (value, priv->never_default);
 		break;
@@ -1328,6 +1352,19 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class)
 		                      G_PARAM_STATIC_STRINGS));
 
 	/**
+	 * NMSettingIP4Config:dhcp-timeout:
+	 *
+	 * Number of seconds after which the unfinished DHCP transaction fails
+	 * or zero for default.
+	 **/
+	g_object_class_install_property
+		(object_class, PROP_DHCP_TIMEOUT,
+		 g_param_spec_uint (NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT, "", "",
+		                    0, G_MAXUINT32, 0,
+		                    G_PARAM_READWRITE |
+		                    G_PARAM_STATIC_STRINGS));
+
+	/**
 	 * NMSettingIP4Config:never-default:
 	 *
 	 * If %TRUE, this connection will never be the default IPv4 connection,
diff --git a/libnm-util/nm-setting-ip4-config.h b/libnm-util/nm-setting-ip4-config.h
index 6e9a9a22..1365de29 100644
--- a/libnm-util/nm-setting-ip4-config.h
+++ b/libnm-util/nm-setting-ip4-config.h
@@ -66,6 +66,7 @@ GQuark nm_setting_ip4_config_error_quark (void);
 #define NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID     "dhcp-client-id"
 #define NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME "dhcp-send-hostname"
 #define NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME      "dhcp-hostname"
+#define NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT       "dhcp-timeout"
 #define NM_SETTING_IP4_CONFIG_NEVER_DEFAULT      "never-default"
 #define NM_SETTING_IP4_CONFIG_MAY_FAIL           "may-fail"
 
@@ -223,6 +224,8 @@ gboolean      nm_setting_ip4_config_get_ignore_auto_dns    (NMSettingIP4Config *
 const char *  nm_setting_ip4_config_get_dhcp_client_id     (NMSettingIP4Config *setting);
 gboolean      nm_setting_ip4_config_get_dhcp_send_hostname (NMSettingIP4Config *setting);
 const char *  nm_setting_ip4_config_get_dhcp_hostname      (NMSettingIP4Config *setting);
+NM_AVAILABLE_IN_1_2
+int           nm_setting_ip4_config_get_dhcp_timeout       (NMSettingIP4Config *setting);
 
 gboolean      nm_setting_ip4_config_get_never_default      (NMSettingIP4Config *setting);
 
diff --git a/libnm-util/nm-setting-ip6-config.c b/libnm-util/nm-setting-ip6-config.c
index b929ebac..2ddce6c1 100644
--- a/libnm-util/nm-setting-ip6-config.c
+++ b/libnm-util/nm-setting-ip6-config.c
@@ -23,13 +23,12 @@
 
 #include <string.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
+#include "nm-default.h"
 #include "nm-setting-ip6-config.h"
 #include "nm-param-spec-specialized.h"
 #include "nm-utils.h"
 #include "nm-dbus-glib-types.h"
-#include "nm-glib-compat.h"
 #include "nm-setting-private.h"
 
 /**
diff --git a/libnm-util/nm-setting-olpc-mesh.c b/libnm-util/nm-setting-olpc-mesh.c
index e4b6dae5..8d812869 100644
--- a/libnm-util/nm-setting-olpc-mesh.c
+++ b/libnm-util/nm-setting-olpc-mesh.c
@@ -25,7 +25,6 @@
 #include <string.h>
 #include <netinet/ether.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "NetworkManager.h"
 #include "nm-setting-olpc-mesh.h"
diff --git a/libnm-util/nm-setting-ppp.c b/libnm-util/nm-setting-ppp.c
index a01d3e10..06f220fe 100644
--- a/libnm-util/nm-setting-ppp.c
+++ b/libnm-util/nm-setting-ppp.c
@@ -22,8 +22,6 @@
 
 #include "config.h"
 
-#include <glib/gi18n-lib.h>
-
 #include "nm-setting-ppp.h"
 #include "nm-setting-private.h"
 
diff --git a/libnm-util/nm-setting-pppoe.c b/libnm-util/nm-setting-pppoe.c
index deaeb2e8..5747d306 100644
--- a/libnm-util/nm-setting-pppoe.c
+++ b/libnm-util/nm-setting-pppoe.c
@@ -23,7 +23,6 @@
 #include "config.h"
 
 #include <string.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-pppoe.h"
 #include "nm-setting-ppp.h"
diff --git a/libnm-util/nm-setting-private.h b/libnm-util/nm-setting-private.h
index 1b271d0c..6956463c 100644
--- a/libnm-util/nm-setting-private.h
+++ b/libnm-util/nm-setting-private.h
@@ -21,7 +21,7 @@
 #ifndef NM_SETTING_PRIVATE_H
 #define NM_SETTING_PRIVATE_H
 
-#include "nm-glib-compat.h"
+#include "nm-default.h"
 
 #define NM_SETTING_SECRET_FLAGS_ALL \
 	(NM_SETTING_SECRET_FLAG_NONE | \
@@ -101,7 +101,7 @@ gboolean _nm_setting_clear_secrets_with_flags (NMSetting *setting,
 /* Ensure the setting's GType is registered at library load time */
 #define NM_SETTING_REGISTER_TYPE(x) \
 static void __attribute__((constructor)) register_setting (void) \
-{ g_type_init (); g_type_ensure (x); }
+{ nm_g_type_init (); g_type_ensure (x); }
 
 NMSetting *nm_setting_find_in_list (GSList *settings_list, const char *setting_name);
 
diff --git a/libnm-util/nm-setting-serial.c b/libnm-util/nm-setting-serial.c
index 24f2c898..c60cffb2 100644
--- a/libnm-util/nm-setting-serial.c
+++ b/libnm-util/nm-setting-serial.c
@@ -24,8 +24,8 @@
 
 #include <string.h>
 
+#include "nm-default.h"
 #include "nm-setting-serial.h"
-#include "nm-glib-compat.h"
 #include "nm-setting-private.h"
 
 /**
diff --git a/libnm-util/nm-setting-team-port.c b/libnm-util/nm-setting-team-port.c
index 9992f58a..7e17d5e3 100644
--- a/libnm-util/nm-setting-team-port.c
+++ b/libnm-util/nm-setting-team-port.c
@@ -24,7 +24,6 @@
 #include <ctype.h>
 #include <stdlib.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-team-port.h"
 #include "nm-utils.h"
diff --git a/libnm-util/nm-setting-team.c b/libnm-util/nm-setting-team.c
index 19bc9596..07531503 100644
--- a/libnm-util/nm-setting-team.c
+++ b/libnm-util/nm-setting-team.c
@@ -23,7 +23,6 @@
 #include <string.h>
 #include <stdlib.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-team.h"
 #include "nm-param-spec-specialized.h"
diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c
index d3bc0a37..310a7da8 100644
--- a/libnm-util/nm-setting-vlan.c
+++ b/libnm-util/nm-setting-vlan.c
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-vlan.h"
 #include "nm-param-spec-specialized.h"
@@ -585,9 +584,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
 		}
 	}
 
-	if (priv->flags & ~(NM_VLAN_FLAG_REORDER_HEADERS |
-	                    NM_VLAN_FLAG_GVRP |
-	                    NM_VLAN_FLAG_LOOSE_BINDING)) {
+	if (priv->flags & ~NM_VLAN_FLAGS_ALL) {
 		g_set_error_literal (error,
 		                     NM_SETTING_VLAN_ERROR,
 		                     NM_SETTING_VLAN_ERROR_INVALID_PROPERTY,
@@ -801,12 +798,13 @@ nm_setting_vlan_class_init (NMSettingVlanClass *setting_class)
 	 * interface.  Flags include %NM_VLAN_FLAG_REORDER_HEADERS (reordering of
 	 * output packet headers), %NM_VLAN_FLAG_GVRP (use of the GVRP protocol),
 	 * and %NM_VLAN_FLAG_LOOSE_BINDING (loose binding of the interface to its
-	 * master device's operating state).
+	 * master device's operating state), %NM_VLAN_FLAG_MVRP (use of the MVRP
+	 * protocol).
 	 **/
 	g_object_class_install_property
 		(object_class, PROP_FLAGS,
 		 g_param_spec_uint (NM_SETTING_VLAN_FLAGS, "", "",
-		                    0, G_MAXUINT32, NM_VLAN_FLAG_REORDER_HEADERS,
+		                    0, G_MAXUINT32, 0,
 		                    G_PARAM_READWRITE |
 		                    G_PARAM_CONSTRUCT |
 		                    NM_SETTING_PARAM_INFERRABLE |
diff --git a/libnm-util/nm-setting-vlan.h b/libnm-util/nm-setting-vlan.h
index 3e209480..ce42dd41 100644
--- a/libnm-util/nm-setting-vlan.h
+++ b/libnm-util/nm-setting-vlan.h
@@ -98,6 +98,8 @@ typedef enum {
  * @NM_VLAN_FLAG_LOOSE_BINDING: indicates that this interface's operating
  *  state is tied to the underlying network interface but other details
  *  (like routing) are not.
+ * @NM_VLAN_FLAG_MVRP: indicates that this interface should use MVRP to register
+ *  itself with it's switch
  *
  * #NMVlanFlags values control the behavior of the VLAN interface.
  **/
@@ -105,10 +107,16 @@ typedef enum {
 	NM_VLAN_FLAG_REORDER_HEADERS = 0x1,
 	NM_VLAN_FLAG_GVRP            = 0x2,
 	NM_VLAN_FLAG_LOOSE_BINDING   = 0x4,
+	NM_VLAN_FLAG_MVRP            = 0x8,
 
 	/* NOTE: if adding flags update nm-setting-vlan.c::verify() */
 } NMVlanFlags;
 
+#define NM_VLAN_FLAGS_ALL  (NM_VLAN_FLAG_REORDER_HEADERS | \
+                            NM_VLAN_FLAG_GVRP | \
+                            NM_VLAN_FLAG_LOOSE_BINDING | \
+                            NM_VLAN_FLAG_MVRP)
+
 GType nm_setting_vlan_get_type (void);
 NMSetting *nm_setting_vlan_new (void);
 
diff --git a/libnm-util/nm-setting-vpn.c b/libnm-util/nm-setting-vpn.c
index 1feeb588..95f08adf 100644
--- a/libnm-util/nm-setting-vpn.c
+++ b/libnm-util/nm-setting-vpn.c
@@ -25,7 +25,6 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-vpn.h"
 #include "nm-param-spec-specialized.h"
diff --git a/libnm-util/nm-setting-vpn.h b/libnm-util/nm-setting-vpn.h
index fbc9fe34..acce6e63 100644
--- a/libnm-util/nm-setting-vpn.h
+++ b/libnm-util/nm-setting-vpn.h
@@ -112,6 +112,10 @@ void              nm_setting_vpn_foreach_secret    (NMSettingVPN *setting,
                                                     NMVPNIterFunc func,
                                                     gpointer user_data);
 
+#ifdef NM_VPN_LIBNM_COMPAT
+#define NMSettingVpn NMSettingVPN
+#endif
+
 G_END_DECLS
 
 #endif /* NM_SETTING_VPN_H */
diff --git a/libnm-util/nm-setting-wimax.c b/libnm-util/nm-setting-wimax.c
index acb00f5e..7581f2f2 100644
--- a/libnm-util/nm-setting-wimax.c
+++ b/libnm-util/nm-setting-wimax.c
@@ -25,7 +25,6 @@
 #include <string.h>
 #include <net/ethernet.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-wimax.h"
 #include "nm-param-spec-specialized.h"
@@ -38,6 +37,10 @@
  *
  * The #NMSettingWimax object is a #NMSetting subclass that describes properties
  * necessary for connection to 802.16e Mobile WiMAX networks.
+ *
+ * NetworkManager no longer supports WiMAX; while this API remains available for
+ * backward-compatibility reasons, it serves no real purpose, since WiMAX
+ * connections cannot be activated.
  **/
 
 /**
@@ -46,6 +49,8 @@
  * Registers an error quark for #NMSettingWimax if necessary.
  *
  * Returns: the error quark used for #NMSettingWimax errors.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
  **/
 GQuark
 nm_setting_wimax_error_quark (void)
@@ -86,6 +91,8 @@ enum {
  * Creates a new #NMSettingWimax object with default values.
  *
  * Returns: the new empty #NMSettingWimax object
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
  **/
 NMSetting *
 nm_setting_wimax_new (void)
@@ -101,6 +108,8 @@ nm_setting_wimax_new (void)
  * specific WiMAX network this setting describes a connection to.
  *
  * Returns: the WiMAX NSP name
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
  **/
 const char *
 nm_setting_wimax_get_network_name (NMSettingWimax *setting)
@@ -118,6 +127,8 @@ nm_setting_wimax_get_network_name (NMSettingWimax *setting)
  * to.
  *
  * Returns: the MAC address
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
  **/
 const GByteArray *
 nm_setting_wimax_get_mac_address (NMSettingWimax *setting)
@@ -240,6 +251,8 @@ nm_setting_wimax_class_init (NMSettingWimaxClass *setting_class)
 	 *
 	 * Network Service Provider (NSP) name of the WiMAX network this connection
 	 * should use.
+	 *
+	 * Deprecated: 1.2: WiMAX is no longer supported.
 	 **/
 	g_object_class_install_property
 		(object_class, PROP_NETWORK_NAME,
@@ -254,6 +267,8 @@ nm_setting_wimax_class_init (NMSettingWimaxClass *setting_class)
 	 * If specified, this connection will only apply to the WiMAX device whose
 	 * MAC address matches. This property does not change the MAC address of the
 	 * device (known as MAC spoofing).
+	 *
+	 * Deprecated: 1.2: WiMAX is no longer supported.
 	 **/
 	g_object_class_install_property
 		(object_class, PROP_MAC_ADDRESS,
diff --git a/libnm-util/nm-setting-wimax.h b/libnm-util/nm-setting-wimax.h
index 781d717c..9d7a07af 100644
--- a/libnm-util/nm-setting-wimax.h
+++ b/libnm-util/nm-setting-wimax.h
@@ -49,6 +49,7 @@ typedef enum {
 } NMSettingWimaxError;
 
 #define NM_SETTING_WIMAX_ERROR nm_setting_wimax_error_quark ()
+NM_DEPRECATED_IN_1_2
 GQuark nm_setting_wimax_error_quark (void);
 
 #define NM_SETTING_WIMAX_NETWORK_NAME "network-name"
@@ -62,10 +63,14 @@ typedef struct {
 	NMSettingClass parent;
 } NMSettingWimaxClass;
 
+NM_DEPRECATED_IN_1_2
 GType nm_setting_wimax_get_type (void);
 
+NM_DEPRECATED_IN_1_2
 NMSetting        *nm_setting_wimax_new              (void);
+NM_DEPRECATED_IN_1_2
 const char       *nm_setting_wimax_get_network_name (NMSettingWimax *setting);
+NM_DEPRECATED_IN_1_2
 const GByteArray *nm_setting_wimax_get_mac_address  (NMSettingWimax *setting);
 
 G_END_DECLS
diff --git a/libnm-util/nm-setting-wired.c b/libnm-util/nm-setting-wired.c
index aba5fb98..5233fc53 100644
--- a/libnm-util/nm-setting-wired.c
+++ b/libnm-util/nm-setting-wired.c
@@ -26,7 +26,6 @@
 #include <net/ethernet.h>
 #include <netinet/ether.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-wired.h"
 #include "nm-param-spec-specialized.h"
diff --git a/libnm-util/nm-setting-wireless-security.c b/libnm-util/nm-setting-wireless-security.c
index 574ff3bd..719dfaa6 100644
--- a/libnm-util/nm-setting-wireless-security.c
+++ b/libnm-util/nm-setting-wireless-security.c
@@ -24,7 +24,6 @@
 
 #include <string.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting-wireless-security.h"
 #include "nm-setting-8021x.h"
diff --git a/libnm-util/nm-setting-wireless.c b/libnm-util/nm-setting-wireless.c
index 99f4c9b1..2720f4af 100644
--- a/libnm-util/nm-setting-wireless.c
+++ b/libnm-util/nm-setting-wireless.c
@@ -26,7 +26,6 @@
 #include <net/ethernet.h>
 #include <netinet/ether.h>
 #include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
 
 #include "NetworkManager.h"
 #include "nm-setting-wireless.h"
@@ -87,6 +86,7 @@ typedef struct {
 	GSList *seen_bssids;
 	char *security;
 	gboolean hidden;
+	guint32 powersave;
 } NMSettingWirelessPrivate;
 
 enum {
@@ -105,6 +105,7 @@ enum {
 	PROP_SEEN_BSSIDS,
 	PROP_SEC,
 	PROP_HIDDEN,
+	PROP_POWERSAVE,
 
 	LAST_PROP
 };
@@ -662,6 +663,22 @@ nm_setting_wireless_get_hidden (NMSettingWireless *setting)
 }
 
 /**
+ * nm_setting_wireless_get_powersave:
+ * @setting: the #NMSettingWireless
+ *
+ * Returns: the #NMSettingWireless:powersave property of the setting
+ *
+ * Since: 1.2
+ **/
+guint32
+nm_setting_wireless_get_powersave (NMSettingWireless *setting)
+{
+	g_return_val_if_fail (NM_IS_SETTING_WIRELESS (setting), 0);
+
+	return NM_SETTING_WIRELESS_GET_PRIVATE (setting)->powersave;
+}
+
+/**
  * nm_setting_wireless_add_seen_bssid:
  * @setting: the #NMSettingWireless
  * @bssid: the new BSSID to add to the list
@@ -953,6 +970,9 @@ set_property (GObject *object, guint prop_id,
 	case PROP_HIDDEN:
 		priv->hidden = g_value_get_boolean (value);
 		break;
+	case PROP_POWERSAVE:
+		priv->powersave = g_value_get_uint (value);
+		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 		break;
@@ -1008,6 +1028,9 @@ get_property (GObject *object, guint prop_id,
 	case PROP_HIDDEN:
 		g_value_set_boolean (value, nm_setting_wireless_get_hidden (setting));
 		break;
+	case PROP_POWERSAVE:
+		g_value_set_uint (value, nm_setting_wireless_get_powersave (setting));
+		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 		break;
@@ -1244,4 +1267,21 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_class)
 		                       FALSE,
 		                       G_PARAM_READWRITE |
 		                       G_PARAM_STATIC_STRINGS));
+
+	/**
+	 * NMSettingWireless:powersave:
+	 *
+	 * If set to %FALSE, Wi-Fi power saving behavior is disabled.  If set to
+	 * %TRUE, Wi-Fi power saving behavior is enabled.  All other values are
+	 * reserved.  Note that even though only boolean values are allowed, the
+	 * property type is an unsigned integer to allow for future expansion.
+	 *
+	 * Since: 1.2
+	 **/
+	g_object_class_install_property
+		(object_class, PROP_POWERSAVE,
+		 g_param_spec_uint (NM_SETTING_WIRELESS_POWERSAVE, "", "",
+		                    0, G_MAXUINT32, 0,
+		                    G_PARAM_READWRITE |
+		                    G_PARAM_STATIC_STRINGS));
 }
diff --git a/libnm-util/nm-setting-wireless.h b/libnm-util/nm-setting-wireless.h
index 18f78cff..77eff73e 100644
--- a/libnm-util/nm-setting-wireless.h
+++ b/libnm-util/nm-setting-wireless.h
@@ -73,6 +73,7 @@ GQuark nm_setting_wireless_error_quark (void);
 #define NM_SETTING_WIRELESS_MTU         "mtu"
 #define NM_SETTING_WIRELESS_SEEN_BSSIDS "seen-bssids"
 #define NM_SETTING_WIRELESS_HIDDEN      "hidden"
+#define NM_SETTING_WIRELESS_POWERSAVE   "powersave"
 
 /* Deprecated */
 #define NM_SETTING_WIRELESS_SEC         "security"
@@ -150,6 +151,8 @@ void              nm_setting_wireless_clear_mac_blacklist_items   (NMSettingWire
 
 guint32           nm_setting_wireless_get_mtu                (NMSettingWireless *setting);
 gboolean          nm_setting_wireless_get_hidden             (NMSettingWireless *setting);
+NM_AVAILABLE_IN_1_2
+guint32           nm_setting_wireless_get_powersave          (NMSettingWireless *setting);
 
 gboolean          nm_setting_wireless_add_seen_bssid         (NMSettingWireless *setting,
                                                               const char *bssid);
diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c
index 35ae01da..372b06b5 100644
--- a/libnm-util/nm-setting.c
+++ b/libnm-util/nm-setting.c
@@ -23,7 +23,6 @@
 #include "config.h"
 
 #include <string.h>
-#include <glib/gi18n-lib.h>
 
 #include "nm-setting.h"
 #include "nm-setting-private.h"
@@ -103,9 +102,7 @@ static void
 _ensure_registered (void)
 {
 	if (G_UNLIKELY (registered_settings == NULL)) {
-#if !GLIB_CHECK_VERSION (2, 35, 0)
-		g_type_init ();
-#endif
+		nm_g_type_init ();
 		_nm_value_transforms_register ();
 		registered_settings = g_hash_table_new (g_str_hash, g_str_equal);
 		registered_settings_by_type = g_hash_table_new (_nm_gtype_hash, _nm_gtype_equal);
diff --git a/libnm-util/nm-utils-enum-types.c b/libnm-util/nm-utils-enum-types.c
index e5dde28e..8c2c1bbf 100644
--- a/libnm-util/nm-utils-enum-types.c
+++ b/libnm-util/nm-utils-enum-types.c
@@ -3,6 +3,8 @@
 
 /* Generated by glib-mkenums. Do not edit */
 
+#include "config.h"
+
 #include "nm-utils-enum-types.h"
 
 #include "nm-version-macros.h" 
@@ -527,6 +529,7 @@ nm_vlan_flags_get_type (void)
         { NM_VLAN_FLAG_REORDER_HEADERS, "NM_VLAN_FLAG_REORDER_HEADERS", "reorder-headers" },
         { NM_VLAN_FLAG_GVRP, "NM_VLAN_FLAG_GVRP", "gvrp" },
         { NM_VLAN_FLAG_LOOSE_BINDING, "NM_VLAN_FLAG_LOOSE_BINDING", "loose-binding" },
+        { NM_VLAN_FLAG_MVRP, "NM_VLAN_FLAG_MVRP", "mvrp" },
         { 0, NULL, NULL }
       };
       GType g_define_type_id =
diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c
index 143063e7..1659a1a3 100644
--- a/libnm-util/nm-utils.c
+++ b/libnm-util/nm-utils.c
@@ -28,12 +28,11 @@
 #include <uuid/uuid.h>
 #include <libintl.h>
 #include <gmodule.h>
-#include <gio/gio.h>
-#include <glib/gi18n-lib.h>
 
+#include "nm-default.h"
+#include "nm-gvaluearray-compat.h"
 #include "nm-utils.h"
 #include "nm-utils-private.h"
-#include "nm-glib-compat.h"
 #include "nm-dbus-glib-types.h"
 #include "nm-setting-private.h"
 #include "crypto.h"
diff --git a/libnm-util/nm-value-transforms.c b/libnm-util/nm-value-transforms.c
index 00e7e775..fd4aaf60 100644
--- a/libnm-util/nm-value-transforms.c
+++ b/libnm-util/nm-value-transforms.c
@@ -23,10 +23,11 @@
 
 #include <string.h>
 
+#include "nm-default.h"
+#include "nm-gvaluearray-compat.h"
 #include "nm-utils.h"
 #include "nm-utils-private.h"
 #include "nm-dbus-glib-types.h"
-#include "nm-glib-compat.h"
 
 static void
 _nm_utils_convert_op_to_string (const GValue *src_value, GValue *dest_value)
diff --git a/libnm-util/nm-version.h b/libnm-util/nm-version.h
index 63895dda..fd94e210 100644
--- a/libnm-util/nm-version.h
+++ b/libnm-util/nm-version.h
@@ -76,16 +76,18 @@
 # define NM_AVAILABLE_IN_1_0
 #endif
 
-#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_0_4
-# define NM_AVAILABLE_IN_1_0_4          G_UNAVAILABLE(1,0.4)
+#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_2
+# define NM_DEPRECATED_IN_1_2           G_DEPRECATED
+# define NM_DEPRECATED_IN_1_2_FOR(f)    G_DEPRECATED_FOR(f)
 #else
-# define NM_AVAILABLE_IN_1_0_4
+# define NM_DEPRECATED_IN_1_2
+# define NM_DEPRECATED_IN_1_2_FOR(f)
 #endif
 
-#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_0_6
-# define NM_AVAILABLE_IN_1_0_6          G_UNAVAILABLE(1,0.6)
+#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_2
+# define NM_AVAILABLE_IN_1_2            G_UNAVAILABLE(1,2)
 #else
-# define NM_AVAILABLE_IN_1_0_6
+# define NM_AVAILABLE_IN_1_2
 #endif
 
 #endif  /* NM_VERSION_H */
diff --git a/libnm-util/tests/Makefile.am b/libnm-util/tests/Makefile.am
index e580a134..eda212ed 100644
--- a/libnm-util/tests/Makefile.am
+++ b/libnm-util/tests/Makefile.am
@@ -1,8 +1,8 @@
 if ENABLE_TESTS
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
+	-I$(top_srcdir)/shared \
+	-I$(top_builddir)/shared \
 	-I$(top_srcdir)/libnm-util \
 	-I$(top_builddir)/libnm-util \
 	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
diff --git a/libnm-util/tests/Makefile.in b/libnm-util/tests/Makefile.in
index df7ab974..8d5cd984 100644
--- a/libnm-util/tests/Makefile.in
+++ b/libnm-util/tests/Makefile.in
@@ -463,7 +463,6 @@ BLUEZ5_LIBS = @BLUEZ5_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
-CKDB_PATH = @CKDB_PATH@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
@@ -475,8 +474,6 @@ CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_GLIB_100_CFLAGS = @DBUS_GLIB_100_CFLAGS@
-DBUS_GLIB_100_LIBS = @DBUS_GLIB_100_LIBS@
 DBUS_LIBS = @DBUS_LIBS@
 DBUS_SYS_DIR = @DBUS_SYS_DIR@
 DEFS = @DEFS@
@@ -486,6 +483,7 @@ DHCPCD_PATH = @DHCPCD_PATH@
 DISTRO_NETWORK_SERVICE = @DISTRO_NETWORK_SERVICE@
 DLLTOOL = @DLLTOOL@
 DNSMASQ_PATH = @DNSMASQ_PATH@
+DNSSEC_TRIGGER_SCRIPT = @DNSSEC_TRIGGER_SCRIPT@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -540,16 +538,13 @@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
 INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
 IPTABLES_PATH = @IPTABLES_PATH@
-IWMX_SDK_CFLAGS = @IWMX_SDK_CFLAGS@
-IWMX_SDK_LIBS = @IWMX_SDK_LIBS@
 KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@
 LCOV = @LCOV@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBAUDIT_CFLAGS = @LIBAUDIT_CFLAGS@
+LIBAUDIT_LIBS = @LIBAUDIT_LIBS@
 LIBDL = @LIBDL@
-LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
-LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
-LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBM = @LIBM@
@@ -586,6 +581,8 @@ NEWT_LIBS = @NEWT_LIBS@
 NM = @NM@
 NMEDIT = @NMEDIT@
 NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@
+NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT = @NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT@
+NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT = @NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT@
 NM_MAJOR_VERSION = @NM_MAJOR_VERSION@
 NM_MICRO_VERSION = @NM_MICRO_VERSION@
 NM_MINOR_VERSION = @NM_MINOR_VERSION@
@@ -614,7 +611,6 @@ POLKIT_LIBS = @POLKIT_LIBS@
 POSUB = @POSUB@
 PPPD_PATH = @PPPD_PATH@
 PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
-PPPOE_PATH = @PPPOE_PATH@
 QT_CFLAGS = @QT_CFLAGS@
 QT_LIBS = @QT_LIBS@
 RANLIB = @RANLIB@
@@ -629,6 +625,8 @@ SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@
 SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@
 SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@
 SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@
+SYSTEMD_JOURNAL_CFLAGS = @SYSTEMD_JOURNAL_CFLAGS@
+SYSTEMD_JOURNAL_LIBS = @SYSTEMD_JOURNAL_LIBS@
 SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@
 SYSTEMD_LOGIN_LIBS = @SYSTEMD_LOGIN_LIBS@
 SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
@@ -689,6 +687,7 @@ mkdir_p = @mkdir_p@
 nmbinary = @nmbinary@
 nmconfdir = @nmconfdir@
 nmdatadir = @nmdatadir@
+nmlibdir = @nmlibdir@
 nmrundir = @nmrundir@
 nmstatedir = @nmstatedir@
 oldincludedir = @oldincludedir@
@@ -696,6 +695,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -712,8 +712,8 @@ with_netconfig = @with_netconfig@
 with_resolvconf = @with_resolvconf@
 with_valgrind = @with_valgrind@
 @ENABLE_TESTS_TRUE@AM_CPPFLAGS = \
-@ENABLE_TESTS_TRUE@	-I$(top_srcdir)/include \
-@ENABLE_TESTS_TRUE@	-I$(top_builddir)/include \
+@ENABLE_TESTS_TRUE@	-I$(top_srcdir)/shared \
+@ENABLE_TESTS_TRUE@	-I$(top_builddir)/shared \
 @ENABLE_TESTS_TRUE@	-I$(top_srcdir)/libnm-util \
 @ENABLE_TESTS_TRUE@	-I$(top_builddir)/libnm-util \
 @ENABLE_TESTS_TRUE@	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
diff --git a/libnm-util/tests/test-crypto.c b/libnm-util/tests/test-crypto.c
index 8055facf..5a8c4eb0 100644
--- a/libnm-util/tests/test-crypto.c
+++ b/libnm-util/tests/test-crypto.c
@@ -23,13 +23,12 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include <glib/gi18n.h>
 #include <stdio.h>
 #include <string.h>
 
+#include "nm-default.h"
 #include "crypto.h"
 #include "nm-utils.h"
 
diff --git a/libnm-util/tests/test-general.c b/libnm-util/tests/test-general.c
index f365dc04..f35819e7 100644
--- a/libnm-util/tests/test-general.c
+++ b/libnm-util/tests/test-general.c
@@ -21,7 +21,6 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <dbus/dbus-glib.h>
 #include <string.h>
 #include <netinet/ether.h>
@@ -30,7 +29,8 @@
 #include <sys/resource.h>
 
 #include <nm-utils.h>
-#include "gsystem-local-alloc.h"
+#include "nm-default.h"
+#include "nm-gvaluearray-compat.h"
 
 #include "nm-setting-private.h"
 #include "nm-setting-connection.h"
@@ -1283,6 +1283,7 @@ test_connection_diff_a_only (void)
 			{ NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES, NM_SETTING_DIFF_RESULT_IN_A },
 			{ NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS,    NM_SETTING_DIFF_RESULT_IN_A },
 			{ NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID,     NM_SETTING_DIFF_RESULT_IN_A },
+			{ NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT,       NM_SETTING_DIFF_RESULT_IN_A },
 			{ NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME, NM_SETTING_DIFF_RESULT_IN_A },
 			{ NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME,      NM_SETTING_DIFF_RESULT_IN_A },
 			{ NM_SETTING_IP4_CONFIG_NEVER_DEFAULT,      NM_SETTING_DIFF_RESULT_IN_A },
diff --git a/libnm-util/tests/test-libnm-linking.c b/libnm-util/tests/test-libnm-linking.c
index 9738d44d..a24498f8 100644
--- a/libnm-util/tests/test-libnm-linking.c
+++ b/libnm-util/tests/test-libnm-linking.c
@@ -21,10 +21,9 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <nm-utils.h>
 
-#include "nm-glib-compat.h"
+#include "nm-default.h"
 
 extern GType nm_state_get_type (void);
 
diff --git a/libnm-util/tests/test-secrets.c b/libnm-util/tests/test-secrets.c
index adf3a94a..f5423d10 100644
--- a/libnm-util/tests/test-secrets.c
+++ b/libnm-util/tests/test-secrets.c
@@ -21,11 +21,11 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <string.h>
 
 #include <nm-utils.h>
 
+#include "nm-default.h"
 #include "nm-setting-connection.h"
 #include "nm-setting-wired.h"
 #include "nm-setting-8021x.h"
diff --git a/libnm-util/tests/test-setting-8021x.c b/libnm-util/tests/test-setting-8021x.c
index dfc07a80..ad48ac61 100644
--- a/libnm-util/tests/test-setting-8021x.c
+++ b/libnm-util/tests/test-setting-8021x.c
@@ -21,11 +21,11 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <string.h>
 
 #include <nm-utils.h>
 
+#include "nm-default.h"
 #include "nm-setting-connection.h"
 #include "nm-setting-8021x.h"
 
diff --git a/libnm-util/tests/test-setting-dcb.c b/libnm-util/tests/test-setting-dcb.c
index 36192cd3..59eac3c5 100644
--- a/libnm-util/tests/test-setting-dcb.c
+++ b/libnm-util/tests/test-setting-dcb.c
@@ -21,12 +21,12 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <string.h>
 #include <nm-utils.h>
-#include <nm-glib-compat.h>
+#include "nm-default.h"
 #include "nm-setting-dcb.h"
-#include "gsystem-local-alloc.h"
+
+#include "nm-test-utils.h"
 
 #define DCB_FLAGS_ALL (NM_SETTING_DCB_FLAG_ENABLE | \
                        NM_SETTING_DCB_FLAG_ADVERTISE | \
@@ -301,24 +301,11 @@ test_dcb_bandwidth_sums (void)
 
 #define TPATH "/libnm-util/settings/dcb/"
 
+NMTST_DEFINE ();
+
 int main (int argc, char **argv)
 {
-	GError *error = NULL;
-	gboolean success;
-
-	g_test_init (&argc, &argv, NULL);
-
-#if !GLIB_CHECK_VERSION (2, 35, 0)
-	g_type_init ();
-#endif
-
-	success = nm_utils_init (&error);
-	g_assert_no_error (error);
-	g_assert (success);
-
-#if !GLIB_CHECK_VERSION(2,34,0)
-	g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
-#endif
+	nmtst_init (&argc, &argv, TRUE);
 
 	g_test_add_func (TPATH "flags-valid", test_dcb_flags_valid);
 	g_test_add_func (TPATH "flags-invalid", test_dcb_flags_invalid);
diff --git a/libnm-util/tests/test-settings-defaults.c b/libnm-util/tests/test-settings-defaults.c
index 70a743cb..09f112cf 100644
--- a/libnm-util/tests/test-settings-defaults.c
+++ b/libnm-util/tests/test-settings-defaults.c
@@ -21,11 +21,11 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <string.h>
 
 #include <nm-utils.h>
 
+#include "nm-default.h"
 #include "nm-setting-8021x.h"
 #include "nm-setting-cdma.h"
 #include "nm-setting-connection.h"