summary refs log tree commit diff
path: root/clients/cli
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-01-17 20:25:09 +0100
committerMichael Biebl <biebl@debian.org>2017-01-17 20:25:09 +0100
commit58f8be580039b0575b197b9573a1c92745d96d30 (patch)
tree2c226233f623a0dcb529be0eb8cdf97e4a2ae0c0 /clients/cli
parent45cb5bb3c0e6edb887cf69b417fcaf7053814a9b (diff)
New upstream version 1.5.90 upstream/1.5.90
Diffstat (limited to 'clients/cli')
-rw-r--r--clients/cli/Makefile.am78
-rw-r--r--clients/cli/Makefile.in918
-rw-r--r--clients/cli/agent.c21
-rw-r--r--clients/cli/common.c396
-rw-r--r--clients/cli/common.h5
-rw-r--r--clients/cli/connections.c292
-rw-r--r--clients/cli/devices.c70
-rw-r--r--clients/cli/general.c311
-rw-r--r--clients/cli/nmcli.c251
-rw-r--r--clients/cli/nmcli.h4
-rw-r--r--clients/cli/settings-docs.c49
-rw-r--r--clients/cli/settings.c650
-rw-r--r--clients/cli/settings.h3
13 files changed, 1364 insertions, 1684 deletions
diff --git a/clients/cli/Makefile.am b/clients/cli/Makefile.am
deleted file mode 100644
index 7edbefad..00000000
--- a/clients/cli/Makefile.am
+++ /dev/null
@@ -1,78 +0,0 @@
-if BUILD_NMCLI
-
-bin_PROGRAMS = \
-	nmcli
-
-AM_CPPFLAGS = \
-	-I${top_srcdir} \
-	-I${top_builddir} \
-	-I${top_srcdir}/shared \
-	-I$(top_builddir)/shared \
-	-I${top_srcdir}/libnm-core \
-	-I${top_builddir}/libnm-core \
-	-I${top_srcdir}/libnm \
-	-I${top_builddir}/libnm \
-	-I${top_srcdir}/clients/common \
-	$(GLIB_CFLAGS) \
-	-DG_LOG_DOMAIN=\""nmcli"\" \
-	-DNMCLI_LOCALEDIR=\"$(datadir)/locale\"
-
-nmcli_SOURCES = \
-	agent.c \
-	agent.h \
-	common.c \
-	common.h \
-	connections.c \
-	connections.h \
-	devices.c \
-	devices.h \
-	general.c \
-	general.h \
-	settings.c \
-	settings.h \
-	nmcli.c \
-	nmcli.h \
-	utils.c \
-	utils.h \
-	polkit-agent.c \
-	polkit-agent.h \
-	\
-	$(srcdir)/../common/nm-secret-agent-simple.c \
-	$(srcdir)/../common/nm-secret-agent-simple.h \
-	$(srcdir)/../common/nm-vpn-helpers.c \
-	$(srcdir)/../common/nm-vpn-helpers.h \
-	$(NULL)
-
-nmcli_LDADD = \
-	$(GLIB_LIBS) \
-	$(READLINE_LIBS) \
-	$(top_builddir)/libnm/libnm.la
-
-if WITH_POLKIT_AGENT
-AM_CPPFLAGS += $(POLKIT_CFLAGS)
-nmcli_SOURCES += $(srcdir)/../common/nm-polkit-listener.c $(srcdir)/../common/nm-polkit-listener.h
-nmcli_LDADD += $(POLKIT_LIBS)
-endif
-
-if BUILD_SETTING_DOCS
-settings-docs.c: settings-docs.xsl $(top_builddir)/libnm/nm-property-docs.xml
-	$(AM_V_GEN) xsltproc --output $@ $^
-
-BUILT_SOURCES = settings-docs.c
-CLEANFILES = settings-docs.c
-endif
-
-EXTRA_DIST = settings-docs.c settings-docs.xsl
-
-completiondir = $(datadir)/bash-completion/completions
-
-install-data-hook:
-	$(mkinstalldirs) $(DESTDIR)$(completiondir)
-	$(INSTALL_DATA) $(srcdir)/nmcli-completion $(DESTDIR)$(completiondir)/nmcli
-
-uninstall-hook:
-	rm -f $(DESTDIR)$(completiondir)/nmcli
-
-EXTRA_DIST += nmcli-completion
-
-endif
diff --git a/clients/cli/Makefile.in b/clients/cli/Makefile.in
deleted file mode 100644
index 9aae6bfe..00000000
--- a/clients/cli/Makefile.in
+++ /dev/null
@@ -1,918 +0,0 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-@BUILD_NMCLI_TRUE@bin_PROGRAMS = nmcli$(EXEEXT)
-@BUILD_NMCLI_TRUE@@WITH_POLKIT_AGENT_TRUE@am__append_1 = $(POLKIT_CFLAGS)
-@BUILD_NMCLI_TRUE@@WITH_POLKIT_AGENT_TRUE@am__append_2 = $(srcdir)/../common/nm-polkit-listener.c $(srcdir)/../common/nm-polkit-listener.h
-@BUILD_NMCLI_TRUE@@WITH_POLKIT_AGENT_TRUE@am__append_3 = $(POLKIT_LIBS)
-subdir = clients/cli
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \
-	$(top_srcdir)/m4/ax_lib_readline.m4 \
-	$(top_srcdir)/m4/compiler_options.m4 \
-	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/git-sha-record.m4 \
-	$(top_srcdir)/m4/gnome-code-coverage.m4 \
-	$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \
-	$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \
-	$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
-	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-	$(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am__nmcli_SOURCES_DIST = agent.c agent.h common.c common.h \
-	connections.c connections.h devices.c devices.h general.c \
-	general.h settings.c settings.h nmcli.c nmcli.h utils.c \
-	utils.h polkit-agent.c polkit-agent.h \
-	$(srcdir)/../common/nm-secret-agent-simple.c \
-	$(srcdir)/../common/nm-secret-agent-simple.h \
-	$(srcdir)/../common/nm-vpn-helpers.c \
-	$(srcdir)/../common/nm-vpn-helpers.h \
-	$(srcdir)/../common/nm-polkit-listener.c \
-	$(srcdir)/../common/nm-polkit-listener.h
-@BUILD_NMCLI_TRUE@@WITH_POLKIT_AGENT_TRUE@am__objects_1 = nm-polkit-listener.$(OBJEXT)
-@BUILD_NMCLI_TRUE@am_nmcli_OBJECTS = agent.$(OBJEXT) common.$(OBJEXT) \
-@BUILD_NMCLI_TRUE@	connections.$(OBJEXT) devices.$(OBJEXT) \
-@BUILD_NMCLI_TRUE@	general.$(OBJEXT) settings.$(OBJEXT) \
-@BUILD_NMCLI_TRUE@	nmcli.$(OBJEXT) utils.$(OBJEXT) \
-@BUILD_NMCLI_TRUE@	polkit-agent.$(OBJEXT) \
-@BUILD_NMCLI_TRUE@	nm-secret-agent-simple.$(OBJEXT) \
-@BUILD_NMCLI_TRUE@	nm-vpn-helpers.$(OBJEXT) $(am__objects_1)
-nmcli_OBJECTS = $(am_nmcli_OBJECTS)
-am__DEPENDENCIES_1 =
-@BUILD_NMCLI_TRUE@@WITH_POLKIT_AGENT_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
-@BUILD_NMCLI_TRUE@nmcli_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-@BUILD_NMCLI_TRUE@	$(am__DEPENDENCIES_1) \
-@BUILD_NMCLI_TRUE@	$(top_builddir)/libnm/libnm.la \
-@BUILD_NMCLI_TRUE@	$(am__DEPENDENCIES_2)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(nmcli_SOURCES)
-DIST_SOURCES = $(am__nmcli_SOURCES_DIST)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in \
-	$(top_srcdir)/build-aux/depcomp
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AM_TESTS_FD_REDIRECT = @AM_TESTS_FD_REDIRECT@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
-BLUEZ5_LIBS = @BLUEZ5_LIBS@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
-CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
-CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DBUS_SYS_DIR = @DBUS_SYS_DIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DHCLIENT_PATH = @DHCLIENT_PATH@
-DHCPCD_PATH = @DHCPCD_PATH@
-DISTRO_NETWORK_SERVICE = @DISTRO_NETWORK_SERVICE@
-DLLTOOL = @DLLTOOL@
-DL_LIBS = @DL_LIBS@
-DNSMASQ_PATH = @DNSMASQ_PATH@
-DNSSEC_TRIGGER_SCRIPT = @DNSSEC_TRIGGER_SCRIPT@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GENHTML = @GENHTML@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
-GLIB_LIBS = @GLIB_LIBS@
-GLIB_MAKEFILE = @GLIB_MAKEFILE@
-GLIB_MKENUMS = @GLIB_MKENUMS@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
-GNUTLS_LIBS = @GNUTLS_LIBS@
-GREP = @GREP@
-GTKDOC_CHECK = @GTKDOC_CHECK@
-GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
-GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
-GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
-GTKDOC_MKPDF = @GTKDOC_MKPDF@
-GTKDOC_REBASE = @GTKDOC_REBASE@
-GUDEV_CFLAGS = @GUDEV_CFLAGS@
-GUDEV_LIBS = @GUDEV_LIBS@
-HTML_DIR = @HTML_DIR@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
-INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
-INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
-INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
-INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
-INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
-INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
-INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
-INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
-INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
-INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
-IPTABLES_PATH = @IPTABLES_PATH@
-JANSSON_CFLAGS = @JANSSON_CFLAGS@
-JANSSON_LIBS = @JANSSON_LIBS@
-KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@
-LCOV = @LCOV@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBAUDIT_CFLAGS = @LIBAUDIT_CFLAGS@
-LIBAUDIT_LIBS = @LIBAUDIT_LIBS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBM = @LIBM@
-LIBNDP_CFLAGS = @LIBNDP_CFLAGS@
-LIBNDP_LIBS = @LIBNDP_LIBS@
-LIBNL_CFLAGS = @LIBNL_CFLAGS@
-LIBNL_LIBS = @LIBNL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
-LIBSOUP_LIBS = @LIBSOUP_LIBS@
-LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@
-LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
-LIBTEAMDCTL_CFLAGS = @LIBTEAMDCTL_CFLAGS@
-LIBTEAMDCTL_LIBS = @LIBTEAMDCTL_LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LOG_DRIVER = @LOG_DRIVER@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-MM_GLIB_CFLAGS = @MM_GLIB_CFLAGS@
-MM_GLIB_LIBS = @MM_GLIB_LIBS@
-MOC = @MOC@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NEWT_CFLAGS = @NEWT_CFLAGS@
-NEWT_LIBS = @NEWT_LIBS@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@
-NM_CONFIG_DEFAULT_DNS_RC_MANAGER = @NM_CONFIG_DEFAULT_DNS_RC_MANAGER@
-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@
-NM_MODIFY_SYSTEM_POLICY = @NM_MODIFY_SYSTEM_POLICY@
-NM_VERSION = @NM_VERSION@
-NSS_CFLAGS = @NSS_CFLAGS@
-NSS_LIBS = @NSS_LIBS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-POLKIT_CFLAGS = @POLKIT_CFLAGS@
-POLKIT_LIBS = @POLKIT_LIBS@
-POSUB = @POSUB@
-PPPD_PATH = @PPPD_PATH@
-PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
-QT_CFLAGS = @QT_CFLAGS@
-QT_LIBS = @QT_LIBS@
-RANLIB = @RANLIB@
-READLINE_LIBS = @READLINE_LIBS@
-SANITIZERS = @SANITIZERS@
-SANITIZER_ENV = @SANITIZER_ENV@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-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@
-UDEV_DIR = @UDEV_DIR@
-USE_NLS = @USE_NLS@
-UUID_CFLAGS = @UUID_CFLAGS@
-UUID_LIBS = @UUID_LIBS@
-VALGRIND_RULES = @VALGRIND_RULES@
-VAPIGEN = @VAPIGEN@
-VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@
-VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@
-VERSION = @VERSION@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-intltool__v_merge_options_ = @intltool__v_merge_options_@
-intltool__v_merge_options_0 = @intltool__v_merge_options_0@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-nmbinary = @nmbinary@
-nmconfdir = @nmconfdir@
-nmdatadir = @nmdatadir@
-nmlibdir = @nmlibdir@
-nmrundir = @nmrundir@
-nmstatedir = @nmstatedir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-systemdsystemunitdir = @systemdsystemunitdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-with_dhclient = @with_dhclient@
-with_dhcpcd = @with_dhcpcd@
-with_netconfig = @with_netconfig@
-with_resolvconf = @with_resolvconf@
-with_valgrind = @with_valgrind@
-@BUILD_NMCLI_TRUE@AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} \
-@BUILD_NMCLI_TRUE@	-I${top_srcdir}/shared \
-@BUILD_NMCLI_TRUE@	-I$(top_builddir)/shared \
-@BUILD_NMCLI_TRUE@	-I${top_srcdir}/libnm-core \
-@BUILD_NMCLI_TRUE@	-I${top_builddir}/libnm-core \
-@BUILD_NMCLI_TRUE@	-I${top_srcdir}/libnm \
-@BUILD_NMCLI_TRUE@	-I${top_builddir}/libnm \
-@BUILD_NMCLI_TRUE@	-I${top_srcdir}/clients/common \
-@BUILD_NMCLI_TRUE@	$(GLIB_CFLAGS) -DG_LOG_DOMAIN=\""nmcli"\" \
-@BUILD_NMCLI_TRUE@	-DNMCLI_LOCALEDIR=\"$(datadir)/locale\" \
-@BUILD_NMCLI_TRUE@	$(am__append_1)
-@BUILD_NMCLI_TRUE@nmcli_SOURCES = agent.c agent.h common.c common.h \
-@BUILD_NMCLI_TRUE@	connections.c connections.h devices.c \
-@BUILD_NMCLI_TRUE@	devices.h general.c general.h settings.c \
-@BUILD_NMCLI_TRUE@	settings.h nmcli.c nmcli.h utils.c utils.h \
-@BUILD_NMCLI_TRUE@	polkit-agent.c polkit-agent.h \
-@BUILD_NMCLI_TRUE@	$(srcdir)/../common/nm-secret-agent-simple.c \
-@BUILD_NMCLI_TRUE@	$(srcdir)/../common/nm-secret-agent-simple.h \
-@BUILD_NMCLI_TRUE@	$(srcdir)/../common/nm-vpn-helpers.c \
-@BUILD_NMCLI_TRUE@	$(srcdir)/../common/nm-vpn-helpers.h $(NULL) \
-@BUILD_NMCLI_TRUE@	$(am__append_2)
-@BUILD_NMCLI_TRUE@nmcli_LDADD = $(GLIB_LIBS) $(READLINE_LIBS) \
-@BUILD_NMCLI_TRUE@	$(top_builddir)/libnm/libnm.la \
-@BUILD_NMCLI_TRUE@	$(am__append_3)
-@BUILD_NMCLI_TRUE@@BUILD_SETTING_DOCS_TRUE@BUILT_SOURCES = settings-docs.c
-@BUILD_NMCLI_TRUE@@BUILD_SETTING_DOCS_TRUE@CLEANFILES = settings-docs.c
-@BUILD_NMCLI_TRUE@EXTRA_DIST = settings-docs.c settings-docs.xsl \
-@BUILD_NMCLI_TRUE@	nmcli-completion
-@BUILD_NMCLI_TRUE@completiondir = $(datadir)/bash-completion/completions
-all: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clients/cli/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu clients/cli/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
-	fi; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p \
-	 || test -f $$p1 \
-	  ; then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' \
-	    -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' \
-	`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
-nmcli$(EXEEXT): $(nmcli_OBJECTS) $(nmcli_DEPENDENCIES) $(EXTRA_nmcli_DEPENDENCIES) 
-	@rm -f nmcli$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(nmcli_OBJECTS) $(nmcli_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agent.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connections.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devices.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/general.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-polkit-listener.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-secret-agent-simple.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-vpn-helpers.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nmcli.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit-agent.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-nm-secret-agent-simple.o: $(srcdir)/../common/nm-secret-agent-simple.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-secret-agent-simple.o -MD -MP -MF $(DEPDIR)/nm-secret-agent-simple.Tpo -c -o nm-secret-agent-simple.o `test -f '$(srcdir)/../common/nm-secret-agent-simple.c' || echo '$(srcdir)/'`$(srcdir)/../common/nm-secret-agent-simple.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/nm-secret-agent-simple.Tpo $(DEPDIR)/nm-secret-agent-simple.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/../common/nm-secret-agent-simple.c' object='nm-secret-agent-simple.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-secret-agent-simple.o `test -f '$(srcdir)/../common/nm-secret-agent-simple.c' || echo '$(srcdir)/'`$(srcdir)/../common/nm-secret-agent-simple.c
-
-nm-secret-agent-simple.obj: $(srcdir)/../common/nm-secret-agent-simple.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-secret-agent-simple.obj -MD -MP -MF $(DEPDIR)/nm-secret-agent-simple.Tpo -c -o nm-secret-agent-simple.obj `if test -f '$(srcdir)/../common/nm-secret-agent-simple.c'; then $(CYGPATH_W) '$(srcdir)/../common/nm-secret-agent-simple.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../common/nm-secret-agent-simple.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/nm-secret-agent-simple.Tpo $(DEPDIR)/nm-secret-agent-simple.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/../common/nm-secret-agent-simple.c' object='nm-secret-agent-simple.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-secret-agent-simple.obj `if test -f '$(srcdir)/../common/nm-secret-agent-simple.c'; then $(CYGPATH_W) '$(srcdir)/../common/nm-secret-agent-simple.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../common/nm-secret-agent-simple.c'; fi`
-
-nm-vpn-helpers.o: $(srcdir)/../common/nm-vpn-helpers.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-vpn-helpers.o -MD -MP -MF $(DEPDIR)/nm-vpn-helpers.Tpo -c -o nm-vpn-helpers.o `test -f '$(srcdir)/../common/nm-vpn-helpers.c' || echo '$(srcdir)/'`$(srcdir)/../common/nm-vpn-helpers.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/nm-vpn-helpers.Tpo $(DEPDIR)/nm-vpn-helpers.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/../common/nm-vpn-helpers.c' object='nm-vpn-helpers.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-vpn-helpers.o `test -f '$(srcdir)/../common/nm-vpn-helpers.c' || echo '$(srcdir)/'`$(srcdir)/../common/nm-vpn-helpers.c
-
-nm-vpn-helpers.obj: $(srcdir)/../common/nm-vpn-helpers.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-vpn-helpers.obj -MD -MP -MF $(DEPDIR)/nm-vpn-helpers.Tpo -c -o nm-vpn-helpers.obj `if test -f '$(srcdir)/../common/nm-vpn-helpers.c'; then $(CYGPATH_W) '$(srcdir)/../common/nm-vpn-helpers.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../common/nm-vpn-helpers.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/nm-vpn-helpers.Tpo $(DEPDIR)/nm-vpn-helpers.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/../common/nm-vpn-helpers.c' object='nm-vpn-helpers.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-vpn-helpers.obj `if test -f '$(srcdir)/../common/nm-vpn-helpers.c'; then $(CYGPATH_W) '$(srcdir)/../common/nm-vpn-helpers.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../common/nm-vpn-helpers.c'; fi`
-
-nm-polkit-listener.o: $(srcdir)/../common/nm-polkit-listener.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-polkit-listener.o -MD -MP -MF $(DEPDIR)/nm-polkit-listener.Tpo -c -o nm-polkit-listener.o `test -f '$(srcdir)/../common/nm-polkit-listener.c' || echo '$(srcdir)/'`$(srcdir)/../common/nm-polkit-listener.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/nm-polkit-listener.Tpo $(DEPDIR)/nm-polkit-listener.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/../common/nm-polkit-listener.c' object='nm-polkit-listener.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-polkit-listener.o `test -f '$(srcdir)/../common/nm-polkit-listener.c' || echo '$(srcdir)/'`$(srcdir)/../common/nm-polkit-listener.c
-
-nm-polkit-listener.obj: $(srcdir)/../common/nm-polkit-listener.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-polkit-listener.obj -MD -MP -MF $(DEPDIR)/nm-polkit-listener.Tpo -c -o nm-polkit-listener.obj `if test -f '$(srcdir)/../common/nm-polkit-listener.c'; then $(CYGPATH_W) '$(srcdir)/../common/nm-polkit-listener.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../common/nm-polkit-listener.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/nm-polkit-listener.Tpo $(DEPDIR)/nm-polkit-listener.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/../common/nm-polkit-listener.c' object='nm-polkit-listener.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-polkit-listener.obj `if test -f '$(srcdir)/../common/nm-polkit-listener.c'; then $(CYGPATH_W) '$(srcdir)/../common/nm-polkit-listener.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../common/nm-polkit-listener.c'; fi`
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-@BUILD_NMCLI_FALSE@install-data-hook:
-@BUILD_NMCLI_FALSE@uninstall-hook:
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-	@$(NORMAL_INSTALL)
-	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-	@$(NORMAL_INSTALL)
-	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-.MAKE: all check install install-am install-data-am install-strip \
-	uninstall-am
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
-	clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
-	ctags ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-binPROGRAMS \
-	install-data install-data-am install-data-hook install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-hook
-
-.PRECIOUS: Makefile
-
-
-@BUILD_NMCLI_TRUE@@BUILD_SETTING_DOCS_TRUE@settings-docs.c: settings-docs.xsl $(top_builddir)/libnm/nm-property-docs.xml
-@BUILD_NMCLI_TRUE@@BUILD_SETTING_DOCS_TRUE@	$(AM_V_GEN) xsltproc --output $@ $^
-
-@BUILD_NMCLI_TRUE@install-data-hook:
-@BUILD_NMCLI_TRUE@	$(mkinstalldirs) $(DESTDIR)$(completiondir)
-@BUILD_NMCLI_TRUE@	$(INSTALL_DATA) $(srcdir)/nmcli-completion $(DESTDIR)$(completiondir)/nmcli
-
-@BUILD_NMCLI_TRUE@uninstall-hook:
-@BUILD_NMCLI_TRUE@	rm -f $(DESTDIR)$(completiondir)/nmcli
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/clients/cli/agent.c b/clients/cli/agent.c
index 9211d9a0..4cbf7d2d 100644
--- a/clients/cli/agent.c
+++ b/clients/cli/agent.c
@@ -209,25 +209,16 @@ do_agent_all (NmCli *nmc, int argc, char **argv)
 }
 
 static const NMCCommand agent_cmds[] = {
-	{"secret",  do_agent_secret,  usage_agent_secret },
-	{"polkit",  do_agent_polkit,  usage_agent_polkit },
-	{"all",     do_agent_all,     usage_agent_all },
-	{NULL,      do_agent_all,     usage }
+	{ "secret",  do_agent_secret,  usage_agent_secret,  TRUE,   TRUE },
+	{ "polkit",  do_agent_polkit,  usage_agent_polkit,  TRUE,   TRUE },
+	{ "all",     do_agent_all,     usage_agent_all,     TRUE,   TRUE },
+	{ NULL,      do_agent_all,     usage,               TRUE,   TRUE },
 };
 
-
 NMCResultCode
 do_agent (NmCli *nmc, int argc, char **argv)
 {
-	/* Get NMClient object */
-	nmc->get_client (nmc);
+	nmc_do_cmd (nmc, agent_cmds, *argv, argc, argv);
 
-	/* Check whether NetworkManager is running */
-	if (!nm_client_get_nm_running (nmc->client)) {
-		g_string_printf (nmc->return_text, _("Error: NetworkManager is not running."));
-		nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING;
-		return nmc->return_value;
-	}
-
-	return nmc_do_cmd (nmc, agent_cmds, *argv, argc, argv);
+	return nmc->return_value;
 }
diff --git a/clients/cli/common.c b/clients/cli/common.c
index f8dc5239..47e858e7 100644
--- a/clients/cli/common.c
+++ b/clients/cli/common.c
@@ -33,6 +33,8 @@
 #include "common.h"
 #include "utils.h"
 
+extern GMainLoop *loop;
+
 /* Available fields for IPv4 group */
 NmcOutputField nmc_fields_ip4_config[] = {
 	{"GROUP",      N_("GROUP")},    /* 0 */
@@ -824,10 +826,11 @@ nmc_bond_validate_mode (const char *mode, GError **error)
 /*
  * nmc_team_check_config:
  * @config: file name with team config, or raw team JSON config data
- * @out_config: raw team JSON config data (with removed new-line characters)
+ * @out_config: raw team JSON config data
+ *   The value must be freed with g_free().
  * @error: location to store error, or %NUL
  *
- * Check team config from @config parameter and return the checked/sanitized
+ * Check team config from @config parameter and return the checked
  * config in @out_config.
  *
  * Returns: %TRUE if the config is valid, %FALSE if it is invalid
@@ -835,33 +838,140 @@ nmc_bond_validate_mode (const char *mode, GError **error)
 gboolean
 nmc_team_check_config (const char *config, char **out_config, GError **error)
 {
-	char *contents = NULL;
+	enum {
+		_TEAM_CONFIG_TYPE_GUESS,
+		_TEAM_CONFIG_TYPE_FILE,
+		_TEAM_CONFIG_TYPE_JSON,
+	} desired_type = _TEAM_CONFIG_TYPE_GUESS;
+	const char *filename = NULL;
 	size_t c_len = 0;
+	gs_free char *config_clone = NULL;
 
 	*out_config = NULL;
 
-	if (!config || strlen (config) == strspn (config, " \t"))
+	if (!config || !config[0])
 		return TRUE;
 
-	/* 'config' can be either a file name or raw JSON config data */
-	if (g_file_test (config, G_FILE_TEST_EXISTS))
-		(void) g_file_get_contents (config, &contents, NULL, NULL);
-	else
-		contents = g_strdup (config);
+	if (g_str_has_prefix (config, "file://")) {
+		config += NM_STRLEN ("file://");
+		desired_type = _TEAM_CONFIG_TYPE_FILE;
+	} else if (g_str_has_prefix (config, "json://")) {
+		config += NM_STRLEN ("json://");
+		desired_type = _TEAM_CONFIG_TYPE_JSON;
+	}
+
+	if (NM_IN_SET (desired_type, _TEAM_CONFIG_TYPE_FILE, _TEAM_CONFIG_TYPE_GUESS)) {
+		gs_free char *contents = NULL;
 
-	if (contents) {
-		g_strstrip (contents);
-		c_len = strlen (contents);
+		if (!g_file_get_contents (config, &contents, &c_len, NULL)) {
+			if (desired_type == _TEAM_CONFIG_TYPE_FILE) {
+				g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+				             _("cannot read team config from file '%s'"),
+				             config);
+				return FALSE;
+			}
+		} else {
+			if (c_len != strlen (contents)) {
+				g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+				             _("team config file '%s' contains non-valid utf-8"),
+				             config);
+				return FALSE;
+			}
+			filename = config;
+			config = config_clone = g_steal_pointer (&contents);
+		}
 	}
 
-	/* Do a simple validity check */
-	if (!contents || !contents[0] || c_len > 100000 || contents[0] != '{' || contents[c_len-1] != '}') {
-		g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
-		             _("'%s' is not a valid team configuration or file name."), config);
-		g_free (contents);
+	if (!nm_utils_is_json_object (config, NULL)) {
+		if (filename) {
+			g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+			             _("'%s' does not contain a valid team configuration"), filename);
+		} else {
+			g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+			             _("team configuration must be a JSON object"));
+		}
 		return FALSE;
 	}
-	*out_config = g_strdelimit (contents, "\r\n", ' ');
+
+	*out_config = (config == config_clone)
+	              ? g_steal_pointer (&config_clone)
+	              : g_strdup (config);
+	return TRUE;
+}
+
+/*
+ * nmc_proxy_check_script:
+ * @script: file name with PAC script, or raw PAC Script data
+ * @out_script: raw PAC Script (with removed new-line characters)
+ * @error: location to store error, or %NULL
+ *
+ * Check PAC Script from @script parameter and return the checked/sanitized
+ * config in @out_script.
+ *
+ * Returns: %TRUE if the script is valid, %FALSE if it is invalid
+ */
+gboolean
+nmc_proxy_check_script (const char *script, char **out_script, GError **error)
+{
+	enum {
+		_PAC_SCRIPT_TYPE_GUESS,
+		_PAC_SCRIPT_TYPE_FILE,
+		_PAC_SCRIPT_TYPE_JSON,
+	} desired_type = _PAC_SCRIPT_TYPE_GUESS;
+	const char *filename = NULL;
+	size_t c_len = 0;
+	gs_free char *script_clone = NULL;
+
+	*out_script = NULL;
+
+	if (!script || !script[0])
+		return TRUE;
+
+	if (g_str_has_prefix (script, "file://")) {
+		script += NM_STRLEN ("file://");
+		desired_type = _PAC_SCRIPT_TYPE_FILE;
+	} else if (g_str_has_prefix (script, "js://")) {
+		script += NM_STRLEN ("js://");
+		desired_type = _PAC_SCRIPT_TYPE_JSON;
+	}
+
+	if (NM_IN_SET (desired_type, _PAC_SCRIPT_TYPE_FILE, _PAC_SCRIPT_TYPE_GUESS)) {
+		gs_free char *contents = NULL;
+
+		if (!g_file_get_contents (script, &contents, &c_len, NULL)) {
+			if (desired_type == _PAC_SCRIPT_TYPE_FILE) {
+				g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+				             _("cannot read pac-script from file '%s'"),
+				             script);
+				return FALSE;
+			}
+		} else {
+			if (c_len != strlen (contents)) {
+				g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+				             _("file '%s' contains non-valid utf-8"),
+				             script);
+				return FALSE;
+			}
+			filename = script;
+			script = script_clone = g_steal_pointer (&contents);
+		}
+	}
+
+	if (   !strstr (script, "FindProxyForURL")
+	    || !g_utf8_validate (script, -1, NULL)) {
+		if (filename) {
+			g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+			             _("'%s' does not contain a valid PAC Script"), filename);
+		} else {
+			g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+			             _("Not a valid PAC Script"));
+		}
+		return FALSE;
+	}
+
+	*out_script = (script == script_clone)
+	              ? g_steal_pointer (&script_clone)
+	              : g_strdup (script);
 	return TRUE;
 }
 
@@ -1107,6 +1217,7 @@ nmc_secrets_requested (NMSecretAgentSimple *agent,
 	NMConnection *connection = NULL;
 	char *path, *p;
 	gboolean success = FALSE;
+	const GPtrArray *connections;
 
 	if (nmc->print_output == NMC_PRINT_PRETTY)
 		nmc_terminal_erase_line ();
@@ -1117,7 +1228,8 @@ nmc_secrets_requested (NMSecretAgentSimple *agent,
 		p = strrchr (path, '/');
 		if (p)
 			*p = '\0';
-		connection = nmc_find_connection (nmc->connections, "path", path, NULL, FALSE);
+		connections = nm_client_get_connections (nmc->client);
+		connection = nmc_find_connection (connections, "path", path, NULL, FALSE);
 		g_free (path);
 	}
 
@@ -1159,6 +1271,11 @@ nmc_unique_connection_name (const GPtrArray *connections, const char *try_name)
 	return new_name;
 }
 
+/* readline state variables */
+static gboolean nmcli_in_readline = FALSE;
+static gboolean rl_got_line;
+static char *rl_string;
+
 /**
  * nmc_cleanup_readline:
  *
@@ -1172,88 +1289,94 @@ nmc_cleanup_readline (void)
 	rl_cleanup_after_signal ();
 }
 
-
-static gboolean nmcli_in_readline = FALSE;
-static pthread_mutex_t readline_mutex = PTHREAD_MUTEX_INITIALIZER;
-
 gboolean
 nmc_get_in_readline (void)
 {
-	gboolean in_readline;
-
-	pthread_mutex_lock (&readline_mutex);
-	in_readline = nmcli_in_readline;
-	pthread_mutex_unlock (&readline_mutex);
-	return in_readline;
+	return nmcli_in_readline;
 }
 
 void
 nmc_set_in_readline (gboolean in_readline)
 {
-	pthread_mutex_lock (&readline_mutex);
 	nmcli_in_readline = in_readline;
-	pthread_mutex_unlock (&readline_mutex);
+}
+
+static void
+readline_cb (char *line)
+{
+	rl_got_line = TRUE;
+	rl_string = line;
+	rl_callback_handler_remove ();
+}
+
+static gboolean
+stdin_ready_cb (GIOChannel * io, GIOCondition condition, gpointer data)
+{
+	rl_callback_read_char ();
+	return TRUE;
 }
 
 static char *
 nmc_readline_helper (const char *prompt)
 {
-	char *str;
-	int b;
+	GIOChannel *io = NULL;
+	guint io_watch_id;
 
-readline_mark:
-	/* We are in readline -> Ctrl-C should not quit nmcli */
 	nmc_set_in_readline (TRUE);
-	str = readline (prompt);
-	/* We are outside readline -> Ctrl-C should quit nmcli */
-	nmc_set_in_readline (FALSE);
 
-	/* Check for an I/O error by attempting to peek into the input buffer.
-	 * Readline just inserts newlines when errors occur so we need to check ourselves. */
-	if (ioctl (0, FIONREAD, &b) == -1) {
-		g_free (str);
-		str = NULL;
+	io = g_io_channel_unix_new (STDIN_FILENO);
+	io_watch_id = g_io_add_watch (io, G_IO_IN, stdin_ready_cb, NULL);
+	g_io_channel_unref (io);
+
+read_again:
+	rl_string = NULL;
+	rl_got_line = FALSE;
+	rl_callback_handler_install (prompt, readline_cb);
+
+	while (   !rl_got_line
+	       && g_main_loop_is_running (loop)
+	       && !nmc_seen_sigint ())
+		g_main_context_iteration (NULL, TRUE);
+
+	/* If Ctrl-C was detected, complete the line */
+	if (nmc_seen_sigint ()) {
+		rl_echo_signal_char (SIGINT);
+		rl_stuff_char ('\n');
+		rl_callback_read_char ();
 	}
 
 	/* Add string to the history */
-	if (str && *str)
-		add_history (str);
-
-	/*-- React on Ctrl-C and Ctrl-D --*/
-	/* We quit on Ctrl-D when line is empty */
-	if (str == NULL) {
-		/* Send SIGQUIT to itself */
-		nmc_set_sigquit_internal ();
-		kill (getpid (), SIGQUIT);
-		/* Sleep in this thread so that we don't do anything else until exit */
-		for (;;)
-			sleep (3);
-	}
-	/* Ctrl-C */
+	if (rl_string && *rl_string)
+		add_history (rl_string);
+
 	if (nmc_seen_sigint ()) {
+		/* Ctrl-C */
 		nmc_clear_sigint ();
-		if (nm_cli.in_editor || *str) {
+		if (   nm_cli.in_editor
+		    || (rl_string  && *rl_string)) {
 			/* In editor, or the line is not empty */
 			/* Call readline again to get new prompt (repeat) */
-			g_free (str);
-			goto readline_mark;
+			g_free (rl_string);
+			goto read_again;
 		} else {
-			/* Not in editor and line is empty */
-			/* Send SIGQUIT to itself */
-			nmc_set_sigquit_internal ();
-			kill (getpid (), SIGQUIT);
-			/* Sleep in this thread so that we don't do anything else until exit */
-			for (;;)
-				sleep (3);
+			/* Not in editor and line is empty, exit */
+			nmc_exit ();
 		}
+	} else if (!rl_string) {
+		/* Ctrl-D, exit */
+		nmc_exit ();
 	}
 
 	/* Return NULL, not empty string */
-	if (str && *str == '\0') {
-		g_free (str);
-		str = NULL;
+	if (rl_string && *rl_string == '\0') {
+		g_free (rl_string);
+		rl_string = NULL;
 	}
-	return str;
+
+	g_source_remove (io_watch_id);
+	nmc_set_in_readline (FALSE);
+
+	return rl_string;
 }
 
 /**
@@ -1364,7 +1487,6 @@ nmc_rl_gen_func_ifnames (const char *text, int state)
 	const char **ifnames;
 	char *ret;
 
-	nm_cli.get_client (&nm_cli);
 	devices = nm_client_get_devices (nm_cli.client);
 	if (devices->len == 0)
 		return NULL;
@@ -1442,13 +1564,92 @@ nmc_parse_lldp_capabilities (guint value)
 	return g_string_free (str, FALSE);
 }
 
+extern GMainLoop *loop;
+
+static void
+command_done (GObject *object, GAsyncResult *res, gpointer user_data)
+{
+	GSimpleAsyncResult *simple = (GSimpleAsyncResult *)res;
+	NmCli *nmc = user_data;
+	GError *error = NULL;
+
+	if (g_simple_async_result_propagate_error (simple, &error)) {
+		nmc->return_value = error->code;
+		g_string_assign (nmc->return_text, error->message);
+		g_error_free (error);
+	}
+
+	if (!nmc->should_wait)
+		g_main_loop_quit (loop);
+}
+
+typedef struct {
+	NmCli *nmc;
+	const NMCCommand *cmd;
+	int argc;
+	char **argv;
+	GSimpleAsyncResult *simple;
+} CmdCall;
+
+static void
+call_cmd (NmCli *nmc, GSimpleAsyncResult *simple, const NMCCommand *cmd, int argc, char **argv);
+
+static void
+got_client (GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+	GError *error = NULL;
+	CmdCall *call = user_data;
+	NmCli *nmc = call->nmc;
+
+	nmc->should_wait--;
+	nmc->client = nm_client_new_finish (res, &error);
+
+	if (!nmc->client) {
+		g_simple_async_result_set_error (call->simple, NMCLI_ERROR, NMC_RESULT_ERROR_UNKNOWN,
+		                                 _("Error: Could not create NMClient object: %s."), error->message);
+		g_error_free (error);
+		g_simple_async_result_complete (call->simple);
+	} else {
+		call_cmd (nmc, call->simple, call->cmd, call->argc, call->argv);
+	}
+
+	g_slice_free (CmdCall, call);
+}
+
+static void
+call_cmd (NmCli *nmc, GSimpleAsyncResult *simple, const NMCCommand *cmd, int argc, char **argv)
+{
+	CmdCall *call;
+
+	if (nmc->client || !cmd->needs_client) {
+
+		/* Check whether NetworkManager is running */
+		if (cmd->needs_nm_running && !nm_client_get_nm_running (nmc->client)) {
+			g_simple_async_result_set_error (simple, NMCLI_ERROR, NMC_RESULT_ERROR_NM_NOT_RUNNING,
+			                                 _("Error: NetworkManager is not running."));
+		} else
+			nmc->return_value = cmd->func (nmc, argc, argv);
+		g_simple_async_result_complete_in_idle (simple);
+		g_object_unref (simple);
+	} else {
+		nmc->should_wait++;
+		call = g_slice_new0 (CmdCall);
+		call->nmc = nmc;
+		call->cmd = cmd;
+		call->argc = argc;
+		call->argv = argv;
+		call->simple = simple;
+		nm_client_new_async (NULL, got_client, call);
+	}
+}
+
 /**
  * nmc_do_cmd:
  * @nmc: Client instance
  * @cmds: Command table
  * @cmd: Command
  * @argc: Argument count
- * @argv: Arguments vector
+ * @argv: Arguments vector. Must be a global variable.
  *
  * Picks the right callback to handle command from the command table.
  * If --help argument follows and the usage callback is specified for the command
@@ -1457,22 +1658,35 @@ nmc_parse_lldp_capabilities (guint value)
  * The command table is terminated with a %NULL command. The terminating
  * entry's handlers are called if the command is empty.
  *
- * Returns: a nmcli return code
+ * The argument vector needs to be a pointer to the global arguments vector that is
+ * never freed, since the command handler will be called asynchronously and there's
+ * no callback to free the memory in (for simplicity).
  */
-NMCResultCode
+void
 nmc_do_cmd (NmCli *nmc, const NMCCommand cmds[], const char *cmd, int argc, char **argv)
 {
 	const NMCCommand *c;
+	GSimpleAsyncResult *simple;
+
+	simple = g_simple_async_result_new (NULL,
+	                                    command_done,
+	                                    nmc,
+	                                    nmc_do_cmd);
 
-	if (argc == 0 && nmc->complete)
-		return nmc->return_value;
+	if (argc == 0 && nmc->complete) {
+		g_simple_async_result_complete_in_idle (simple);
+		g_object_unref (simple);
+		return;
+	}
 
 	if (argc == 1 && nmc->complete) {
 		for (c = cmds; c->cmd; ++c) {
 			if (!*cmd || matches (cmd, c->cmd) == 0)
 				g_print ("%s\n", c->cmd);
 		}
-		return nmc->return_value;
+		g_simple_async_result_complete_in_idle (simple);
+		g_object_unref (simple);
+		return;
 	}
 
 	for (c = cmds; c->cmd; ++c) {
@@ -1482,28 +1696,34 @@ nmc_do_cmd (NmCli *nmc, const NMCCommand cmds[], const char *cmd, int argc, char
 
 	if (c->cmd) {
 		/* A valid command was specified. */
-		if (c->usage && nmc_arg_is_help (*(argv+1)))
+		if (c->usage && nmc_arg_is_help (*(argv+1))) {
 			c->usage ();
-		else
-			nmc->return_value = c->func (nmc, argc-1, argv+1);
+			g_simple_async_result_complete_in_idle (simple);
+			g_object_unref (simple);
+		} else
+			call_cmd (nmc, simple, c, argc-1, argv+1);
 	} else if (cmd) {
 		/* Not a known command. */
 		if (nmc_arg_is_help (cmd) && c->usage) {
 			c->usage ();
+			g_simple_async_result_complete_in_idle (simple);
+			g_object_unref (simple);
 		} else {
-			g_string_printf (nmc->return_text, _("Error: argument '%s' not understood. Try passing --help instead."), cmd);
-			nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
+			g_simple_async_result_set_error (simple, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+			                                 _("Error: argument '%s' not understood. Try passing --help instead."), cmd);
+			g_simple_async_result_complete_in_idle (simple);
+			g_object_unref (simple);
 		}
 	} else if (c->func) {
 		/* No command, run the default handler. */
-		nmc->return_value = c->func (nmc, argc, argv);
+		call_cmd (nmc, simple, c, argc, argv);
 	} else {
 		/* No command and no default handler. */
-		g_string_printf (nmc->return_text, _("Error: missing argument. Try passing --help."));
-		nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
+		g_simple_async_result_set_error (simple, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+		                                 _("Error: missing argument. Try passing --help."));
+		g_simple_async_result_complete_in_idle (simple);
+		g_object_unref (simple);
 	}
-
-	return nmc->return_value;
 }
 
 /**
diff --git a/clients/cli/common.h b/clients/cli/common.h
index 114a8e63..42091363 100644
--- a/clients/cli/common.h
+++ b/clients/cli/common.h
@@ -44,6 +44,7 @@ nmc_vlan_parse_priority_maps (const char *priority_map,
 
 const char *nmc_bond_validate_mode (const char *mode, GError **error);
 gboolean nmc_team_check_config (const char *config, char **out_config, GError **error);
+gboolean nmc_proxy_check_script (const char *script, char **out_script, GError **error);
 
 NMConnection *nmc_find_connection (const GPtrArray *connections,
                                    const char *filter_type,
@@ -79,9 +80,11 @@ typedef struct {
 	const char *cmd;
 	NMCResultCode (*func) (NmCli *nmc, int argc, char **argv);
 	void (*usage) (void);
+	gboolean needs_client;
+	gboolean needs_nm_running;
 } NMCCommand;
 
-NMCResultCode nmc_do_cmd (NmCli *nmc, const NMCCommand cmds[], const char *argv0, int argc, char **argv);
+void nmc_do_cmd (NmCli *nmc, const NMCCommand cmds[], const char *cmd, int argc, char **argv);
 
 void nmc_complete_strings (const char *prefix, ...) G_GNUC_NULL_TERMINATED;
 
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 36c41ace..09adf0e8 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -130,10 +130,11 @@ NmcOutputField nmc_fields_con_show[] = {
 	{"DEVICE",               N_("DEVICE")},                /* 10 */
 	{"STATE",                N_("STATE")},                 /* 11 */
 	{"ACTIVE-PATH",          N_("ACTIVE-PATH")},           /* 12 */
+	{"SLAVE",                N_("SLAVE")},                 /* 13 */
 	{NULL, NULL}
 };
 #define NMC_FIELDS_CON_SHOW_ALL     "NAME,UUID,TYPE,TIMESTAMP,TIMESTAMP-REAL,AUTOCONNECT,AUTOCONNECT-PRIORITY,READONLY,DBUS-PATH,"\
-                                    "ACTIVE,DEVICE,STATE,ACTIVE-PATH"
+                                    "ACTIVE,DEVICE,STATE,ACTIVE-PATH,SLAVE"
 #define NMC_FIELDS_CON_SHOW_COMMON  "NAME,UUID,TYPE,DEVICE"
 
 /* Helper macro to define fields */
@@ -168,8 +169,10 @@ NmcOutputField nmc_fields_settings_names[] = {
 	SETTING_FIELD (NM_SETTING_DCB_SETTING_NAME,               nmc_fields_setting_dcb + 1),               /* 24 */
 	SETTING_FIELD (NM_SETTING_TUN_SETTING_NAME,               nmc_fields_setting_tun + 1),               /* 25 */
 	SETTING_FIELD (NM_SETTING_IP_TUNNEL_SETTING_NAME,         nmc_fields_setting_ip_tunnel + 1),         /* 26 */
-	SETTING_FIELD (NM_SETTING_MACVLAN_SETTING_NAME,           nmc_fields_setting_macvlan + 1),           /* 27 */
-	SETTING_FIELD (NM_SETTING_VXLAN_SETTING_NAME,             nmc_fields_setting_vxlan + 1),             /* 28 */
+	SETTING_FIELD (NM_SETTING_MACSEC_SETTING_NAME,            nmc_fields_setting_macsec + 1),            /* 27 */
+	SETTING_FIELD (NM_SETTING_MACVLAN_SETTING_NAME,           nmc_fields_setting_macvlan + 1),           /* 28 */
+	SETTING_FIELD (NM_SETTING_VXLAN_SETTING_NAME,             nmc_fields_setting_vxlan + 1),             /* 29 */
+	SETTING_FIELD (NM_SETTING_PROXY_SETTING_NAME,             nmc_fields_setting_proxy + 1),             /* 30 */
 	{NULL, NULL, 0, NULL, NULL, FALSE, FALSE, 0}
 };
 #define NMC_FIELDS_SETTINGS_NAMES_ALL_X  NM_SETTING_CONNECTION_SETTING_NAME","\
@@ -198,8 +201,10 @@ NmcOutputField nmc_fields_settings_names[] = {
                                          NM_SETTING_DCB_SETTING_NAME"," \
                                          NM_SETTING_TUN_SETTING_NAME"," \
                                          NM_SETTING_IP_TUNNEL_SETTING_NAME"," \
+                                         NM_SETTING_MACSEC_SETTING_NAME"," \
                                          NM_SETTING_MACVLAN_SETTING_NAME"," \
-                                         NM_SETTING_VXLAN_SETTING_NAME
+                                         NM_SETTING_VXLAN_SETTING_NAME"," \
+                                         NM_SETTING_PROXY_SETTING_NAME
 #define NMC_FIELDS_SETTINGS_NAMES_ALL    NMC_FIELDS_SETTINGS_NAMES_ALL_X
 
 /* Active connection data */
@@ -447,6 +452,11 @@ usage_connection_add (void)
 	              "                  remote <remote endpoint IP>\n"
 	              "                  [local <local endpoint IP>]\n"
 	              "                  [dev <parent device (ifname or connection UUID)>]\n\n"
+	              "    macsec:       dev <parent device (connection UUID, ifname, or MAC)>\n"
+	              "                  mode <psk|eap>\n"
+	              "                  [cak <key> ckn <key>]\n"
+	              "                  [encrypt yes|no]\n"
+	              "                  [port 1-65534]\n\n\n"
 	              "    macvlan:      dev <parent device (connection UUID, ifname, or MAC)>\n"
 	              "                  mode vepa|bridge|private|passthru|source\n"
 	              "                  [tap yes|no]\n\n"
@@ -946,6 +956,7 @@ fill_output_connection (NMConnection *connection, NmCli *nmc, gboolean active_on
 	set_val_str  (arr, 10, ac_dev);
 	set_val_strc (arr, 11, ac_state);
 	set_val_strc (arr, 12, ac_path);
+	set_val_strc (arr, 13, nm_setting_connection_get_slave_type (s_con));
 
 	g_ptr_array_add (nmc->output_data, arr);
 }
@@ -980,6 +991,7 @@ fill_output_connection_for_invisible (NMActiveConnection *ac, NmCli *nmc)
 	set_val_str  (arr, 10, ac_dev);
 	set_val_strc (arr, 11, ac_state);
 	set_val_strc (arr, 12, ac_path);
+	set_val_strc (arr, 13, NULL);
 
 	set_val_color_fmt_all (arr, NMC_TERM_FORMAT_DIM);
 
@@ -993,7 +1005,7 @@ fill_output_active_connection (NMActiveConnection *active,
                                guint32 o_flags)
 {
 	NMRemoteConnection *con;
-	NMSettingConnection *s_con;
+	NMSettingConnection *s_con = NULL;
 	const GPtrArray *devices;
 	GString *dev_str;
 	NMActiveConnectionState state;
@@ -1053,6 +1065,7 @@ fill_output_active_connection (NMActiveConnection *active,
 	set_val_strc (arr, 10-idx_start, con_path);
 	set_val_strc (arr, 11-idx_start, con_zone);
 	set_val_strc (arr, 12-idx_start, master ? nm_object_get_path (NM_OBJECT (master)) : NULL);
+	set_val_strc (arr, 13-idx_start, s_con ? nm_setting_connection_get_slave_type (s_con) : NULL);
 
 	g_ptr_array_add (nmc->output_data, arr);
 
@@ -1577,6 +1590,7 @@ static GPtrArray *
 get_invisible_active_connections (NmCli *nmc)
 {
 	const GPtrArray *acons;
+	const GPtrArray *connections;
 	GPtrArray *invisibles;
 	int a, c;
 
@@ -1584,13 +1598,14 @@ get_invisible_active_connections (NmCli *nmc)
 
 	invisibles = g_ptr_array_new ();
 	acons = nm_client_get_active_connections (nmc->client);
+	connections = nm_client_get_connections (nmc->client);
 	for (a = 0; a < acons->len; a++) {
 		gboolean found = FALSE;
 		NMActiveConnection *acon = g_ptr_array_index (acons, a);
 		const char *a_uuid = nm_active_connection_get_uuid (acon);
 
-		for (c = 0; c < nmc->connections->len; c++) {
-			NMConnection *con = g_ptr_array_index (nmc->connections, c);
+		for (c = 0; c < connections->len; c++) {
+			NMConnection *con = g_ptr_array_index (connections, c);
 			const char *c_uuid = nm_connection_get_uuid (con);
 
 			if (strcmp (a_uuid, c_uuid) == 0) {
@@ -1669,6 +1684,7 @@ parse_preferred_connection_order (const char *order, GError **error)
 static NMConnection *
 get_connection (NmCli *nmc, int *argc, char ***argv, int *pos, GError **error)
 {
+	const GPtrArray *connections;
 	NMConnection *connection = NULL;
 	const char *selector = NULL;
 
@@ -1692,7 +1708,8 @@ get_connection (NmCli *nmc, int *argc, char ***argv, int *pos, GError **error)
 		}
 	}
 
-	connection = nmc_find_connection (nmc->connections, selector, **argv, pos,
+	connections = nm_client_get_connections (nmc->client);
+	connection = nmc_find_connection (connections, selector, **argv, pos,
 	                                  *argc == 1 && nmc->complete);
 	if (!connection) {
 		g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_NOT_FOUND,
@@ -1752,6 +1769,7 @@ do_connections_show (NmCli *nmc, int argc, char **argv)
 	show_secrets = nmc->show_secrets || show_secrets;
 
 	if (argc == 0) {
+		const GPtrArray *connections;
 		char *fields_str;
 		char *fields_all =    NMC_FIELDS_CON_SHOW_ALL;
 		char *fields_common = NMC_FIELDS_CON_SHOW_COMMON;
@@ -1791,7 +1809,8 @@ do_connections_show (NmCli *nmc, int argc, char **argv)
 		g_ptr_array_free (invisibles, TRUE);
 
 		/* Sort the connections and fill the output data */
-		sorted_cons = sort_connections (nmc->connections, nmc, order);
+		connections = nm_client_get_connections (nmc->client);
+		sorted_cons = sort_connections (connections, nmc, order);
 		for (i = 0; i < sorted_cons->len; i++)
 			fill_output_connection (sorted_cons->pdata[i], nmc, active_only);
 		g_ptr_array_free (sorted_cons, TRUE);
@@ -1814,6 +1833,7 @@ do_connections_show (NmCli *nmc, int argc, char **argv)
 		nmc->required_fields = NULL;
 
 		while (argc > 0) {
+			const GPtrArray *connections;
 			gboolean res;
 			NMConnection *con;
 			NMActiveConnection *acon = NULL;
@@ -1835,11 +1855,12 @@ do_connections_show (NmCli *nmc, int argc, char **argv)
 			}
 
 			/* Try to find connection by id, uuid or path first */
-			con = nmc_find_connection (nmc->connections, selector, *argv, &pos,
+			connections = nm_client_get_connections (nmc->client);
+			con = nmc_find_connection (connections, selector, *argv, &pos,
 			                           argc == 1 && nmc->complete);
 			if (!con && (!selector || strcmp (selector, "apath") == 0)) {
 				/* Try apath too */
-				acon = find_active_connection (active_cons, nmc->connections, "apath", *argv, NULL,
+				acon = find_active_connection (active_cons, connections, "apath", *argv, NULL,
 				                               argc == 1 && nmc->complete);
 				if (acon)
 					con = NM_CONNECTION (nm_active_connection_get_connection (acon));
@@ -2782,6 +2803,7 @@ do_connection_down (NmCli *nmc, int argc, char **argv)
 	/* Get active connections */
 	active_cons = nm_client_get_active_connections (nmc->client);
 	while (arg_num > 0) {
+		const GPtrArray *connections;
 		const char *selector = NULL;
 
 		if (arg_num == 1)
@@ -2800,7 +2822,8 @@ do_connection_down (NmCli *nmc, int argc, char **argv)
 			}
 		}
 
-		active = find_active_connection (active_cons, nmc->connections, selector, *arg_ptr, &idx,
+		connections = nm_client_get_connections (nmc->client);
+		active = find_active_connection (active_cons, connections, selector, *arg_ptr, &idx,
 		                                 arg_num == 1 && nmc->complete);
 		if (active) {
 			/* Check if the connection is unique. */
@@ -2995,6 +3018,7 @@ static const NameItem nmc_bridge_slave_settings [] = {
 static const NameItem nmc_no_slave_settings [] = {
 	{ NM_SETTING_IP4_CONFIG_SETTING_NAME, NULL,   NULL, FALSE },
 	{ NM_SETTING_IP6_CONFIG_SETTING_NAME, NULL,   NULL, FALSE },
+	{ NM_SETTING_PROXY_SETTING_NAME,      NULL,   NULL, FALSE },
 	{ NULL, NULL, NULL, FALSE }
 };
 
@@ -3011,6 +3035,14 @@ static const NameItem nmc_ip_tunnel_settings [] = {
 	{ NULL, NULL, NULL, FALSE }
 };
 
+static const NameItem nmc_macsec_settings [] = {
+	{ NM_SETTING_CONNECTION_SETTING_NAME, NULL,       NULL, TRUE  },
+	{ NM_SETTING_WIRED_SETTING_NAME,      "ethernet", NULL, FALSE },
+	{ NM_SETTING_802_1X_SETTING_NAME,     NULL,       NULL, FALSE },
+	{ NM_SETTING_MACSEC_SETTING_NAME,     NULL,       NULL, TRUE  },
+	{ NULL, NULL, NULL, FALSE }
+};
+
 static const NameItem nmc_macvlan_settings [] = {
 	{ NM_SETTING_CONNECTION_SETTING_NAME, NULL,       NULL, TRUE  },
 	{ NM_SETTING_WIRED_SETTING_NAME,      "ethernet", NULL, FALSE },
@@ -3049,13 +3081,14 @@ static const NameItem nmc_valid_connection_types[] = {
 	{ "no-slave",                         NULL,        nmc_no_slave_settings     },
 	{ NM_SETTING_TUN_SETTING_NAME,        NULL,        nmc_tun_settings          },
 	{ NM_SETTING_IP_TUNNEL_SETTING_NAME,  NULL,        nmc_ip_tunnel_settings    },
+	{ NM_SETTING_MACSEC_SETTING_NAME,     NULL,        nmc_macsec_settings       },
 	{ NM_SETTING_MACVLAN_SETTING_NAME,    NULL,        nmc_macvlan_settings      },
 	{ NM_SETTING_VXLAN_SETTING_NAME,      NULL,        nmc_vxlan_settings        },
 	{ NULL, NULL, NULL }
 };
 
 /*
- * Return the most approopriate name for the connection of a type 'name' possibly with given 'slave_type'
+ * Return the most appropriate name for the connection of a type 'name' possibly with given 'slave_type'
  * if exists, else return the 'name'. The returned string must not be freed.
  */
 static const char *
@@ -3519,19 +3552,22 @@ unique_master_iface_ifname (const GPtrArray *connections,
 static void
 set_default_interface_name (NmCli *nmc, NMSettingConnection *s_con)
 {
+	const GPtrArray *connections;
 	char *ifname = NULL;
 	const char *con_type = nm_setting_connection_get_connection_type (s_con);
 
 	if (nm_setting_connection_get_interface_name (s_con))
 		return;
 
+	connections = nm_client_get_connections (nmc->client);
+
 	/* Set a sensible bond/team/bridge interface name by default */
 	if (g_strcmp0 (con_type, NM_SETTING_BOND_SETTING_NAME) == 0)
-		ifname = unique_master_iface_ifname (nmc->connections, "nm-bond");
+		ifname = unique_master_iface_ifname (connections, "nm-bond");
 	else if (g_strcmp0 (con_type, NM_SETTING_TEAM_SETTING_NAME) == 0)
-		ifname = unique_master_iface_ifname (nmc->connections, "nm-team");
+		ifname = unique_master_iface_ifname (connections, "nm-team");
 	else if (g_strcmp0 (con_type, NM_SETTING_BRIDGE_SETTING_NAME) == 0)
-		ifname = unique_master_iface_ifname (nmc->connections, "nm-bridge");
+		ifname = unique_master_iface_ifname (connections, "nm-bridge");
 	else
 		return;
 
@@ -3858,6 +3894,17 @@ gen_func_ip_tunnel_mode (const char *text, int state)
 }
 
 static char *
+gen_func_macsec_mode (const char *text, int state)
+{
+	gs_free const char **words = NULL;
+
+	words = nm_utils_enum_get_values (nm_setting_macsec_mode_get_type (),
+	                                  G_MININT,
+	                                  G_MAXINT);
+	return nmc_rl_gen_func_basic (text, state, words);
+}
+
+static char *
 gen_func_macvlan_mode (const char *text, int state)
 {
 	gs_free const char **words = NULL;
@@ -3877,16 +3924,16 @@ gen_func_master_ifnames (const char *text, int state)
 	NMConnection *con;
 	NMSettingConnection *s_con;
 	const char *con_type, *ifname;
+	const GPtrArray *connections;
 
-	if (!nm_cli.connections)
-		return NULL;
+	connections = nm_client_get_connections (nm_cli.client);
 
 	/* Disable appending space after completion */
 	rl_completion_append_character = '\0';
 
 	ifnames = g_ptr_array_sized_new (20);
-	for (i = 0; i < nm_cli.connections->len; i++) {
-		con = NM_CONNECTION (nm_cli.connections->pdata[i]);
+	for (i = 0; i < connections->len; i++) {
+		con = NM_CONNECTION (connections->pdata[i]);
 		s_con = nm_connection_get_setting_connection (con);
 		g_assert (s_con);
 		con_type = nm_setting_connection_get_connection_type (s_con);
@@ -3971,16 +4018,18 @@ set_connection_type (NmCli *nmc, NMConnection *con, OptionInfo *option, const ch
 static gboolean
 set_connection_iface (NmCli *nmc, NMConnection *con, OptionInfo *option, const char *value, GError **error)
 {
+	GError *tmp_error = NULL;
+
 	if (value) {
-		if (!nm_utils_iface_valid_name (value) && strcmp (value, "*") != 0) {
-			g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
-			             _("Error: '%s' is not a valid interface nor '*'."),
-			             value);
-			return FALSE;
-		}
 		/* Special value of '*' means no specific interface name */
 		if (strcmp (value, "*") == 0)
 			value = NULL;
+		else if (!nm_utils_is_valid_iface_name (value, &tmp_error)) {
+			g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+			             _("Error: '%s': %s"), value, tmp_error->message);
+			g_error_free (tmp_error);
+			return FALSE;
+		}
 	}
 
 	return set_property (con, option->setting_name, option->property, value, '\0', error);
@@ -3989,6 +4038,7 @@ set_connection_iface (NmCli *nmc, NMConnection *con, OptionInfo *option, const c
 static gboolean
 set_connection_master (NmCli *nmc, NMConnection *con, OptionInfo *option, const char *value, GError **error)
 {
+	const GPtrArray *connections;
 	NMSettingConnection *s_con;
 	const char *slave_type;
 
@@ -4002,7 +4052,8 @@ set_connection_master (NmCli *nmc, NMConnection *con, OptionInfo *option, const
 	}
 
 	slave_type = nm_setting_connection_get_slave_type (s_con);
-	value = normalized_master_for_slave (nmc->connections, value, slave_type, &slave_type);
+	connections = nm_client_get_connections (nmc->client);
+	value = normalized_master_for_slave (connections, value, slave_type, &slave_type);
 
 	if (!set_property (con, NM_SETTING_CONNECTION_SETTING_NAME,
 	                   NM_SETTING_CONNECTION_SLAVE_TYPE, slave_type,
@@ -4268,6 +4319,13 @@ static OptionInfo option_info[] = {
 	{ NM_SETTING_ADSL_SETTING_NAME,         NM_SETTING_ADSL_PASSWORD,               "password",     OPTION_NONE, N_("Password [none]"), NULL, NULL, NULL },
 	{ NM_SETTING_ADSL_SETTING_NAME,         NM_SETTING_ADSL_ENCAPSULATION,          "encapsulation", OPTION_NONE, PROMPT_ADSL_ENCAP, PROMPT_ADSL_ENCAP_CHOICES,
                                                                                                         NULL, gen_func_adsl_encap },
+	{ NM_SETTING_MACSEC_SETTING_NAME,       NM_SETTING_MACSEC_PARENT,               "dev",          OPTION_REQD, N_("MACsec parent device or connection UUID"), NULL, NULL, NULL },
+	{ NM_SETTING_MACSEC_SETTING_NAME,       NM_SETTING_MACSEC_MODE,                 "mode",         OPTION_REQD, N_("Mode"), NULL, NULL, gen_func_macsec_mode },
+	{ NM_SETTING_MACSEC_SETTING_NAME,       NM_SETTING_MACSEC_ENCRYPT,              "encrypt",      OPTION_NONE, N_("Enable encryption [yes]"), NULL, set_yes_no, gen_func_bool_values_l10n },
+	{ NM_SETTING_MACSEC_SETTING_NAME,       NM_SETTING_MACSEC_MKA_CAK,              "cak",          OPTION_NONE, N_("MKA CAK"), NULL, NULL, NULL },
+	{ NM_SETTING_MACSEC_SETTING_NAME,       NM_SETTING_MACSEC_MKA_CKN,              "ckn",          OPTION_NONE, N_("MKA_CKN"), NULL, NULL, NULL },
+	{ NM_SETTING_MACSEC_SETTING_NAME,       NM_SETTING_MACSEC_PORT,                 "port",         OPTION_NONE, N_("SCI port [1]"), NULL, NULL, NULL },
+
 	{ NM_SETTING_MACVLAN_SETTING_NAME,      NM_SETTING_MACVLAN_PARENT,              "dev",          OPTION_REQD, N_("MACVLAN parent device or connection UUID"), NULL,
                                                                                                         NULL, nmc_rl_gen_func_ifnames },
 	{ NM_SETTING_MACVLAN_SETTING_NAME,      NM_SETTING_MACVLAN_MODE,                "mode",         OPTION_REQD, PROMPT_MACVLAN_MODE, NULL,
@@ -4303,6 +4361,10 @@ static OptionInfo option_info[] = {
 	{ NM_SETTING_IP6_CONFIG_SETTING_NAME,   NM_SETTING_IP_CONFIG_ADDRESSES,         "ip6",          OPTION_MULTI, N_("IPv6 address (IP[/plen]) [none]"), NULL,
 	                                                                                                set_ip6_address, NULL },
 	{ NM_SETTING_IP6_CONFIG_SETTING_NAME,   NM_SETTING_IP_CONFIG_GATEWAY,           "gw6",          OPTION_NONE, N_("IPv6 gateway [none]"), NULL, NULL, NULL },
+	{ NM_SETTING_PROXY_SETTING_NAME,        NM_SETTING_PROXY_METHOD,                "method",       OPTION_NONE, N_("Proxy method"), NULL, NULL, NULL },
+	{ NM_SETTING_PROXY_SETTING_NAME,        NM_SETTING_PROXY_BROWSER_ONLY,          "browser-only", OPTION_NONE, N_("Browser Only"), NULL, NULL, NULL },
+	{ NM_SETTING_PROXY_SETTING_NAME,        NM_SETTING_PROXY_PAC_URL,               "pac-url",      OPTION_NONE, N_("PAC Url"), NULL, NULL, NULL },
+	{ NM_SETTING_PROXY_SETTING_NAME,        NM_SETTING_PROXY_PAC_SCRIPT,            "pac-script",   OPTION_NONE, N_("PAC Script"), NULL, NULL, NULL },
 	{ NULL, NULL, NULL, OPTION_NONE, NULL, NULL, NULL, NULL },
 };
 
@@ -4795,6 +4857,8 @@ setting_name_to_name (const char *name)
 		return _("OLPC Mesh connection");
 	if (strcmp (name, NM_SETTING_ADSL_SETTING_NAME) == 0)
 		return _("ADSL connection");
+	if (strcmp (name, NM_SETTING_MACSEC_SETTING_NAME) == 0)
+		return _("MACsec connection");
 	if (strcmp (name, NM_SETTING_MACVLAN_SETTING_NAME) == 0)
 		return _("macvlan connection");
 	if (strcmp (name, NM_SETTING_VXLAN_SETTING_NAME) == 0)
@@ -4805,6 +4869,8 @@ setting_name_to_name (const char *name)
 		return _("IPv4 protocol");
 	if (strcmp (name, NM_SETTING_IP6_CONFIG_SETTING_NAME) == 0)
 		return _("IPv6 protocol");
+	if (strcmp (name, NM_SETTING_PROXY_SETTING_NAME) == 0)
+		return _("Proxy");
 
 	/* Should not happen; but let's still try to be somewhat sensible. */
 	return name;
@@ -4935,9 +5001,12 @@ read_properties:
 		/* If only bother when there's a type, which is not guaranteed at this point.
 		 * Otherwise the validation will fail anyway. */
 		if (type) {
+			const GPtrArray *connections;
+
+			connections = nm_client_get_connections (nmc->client);
 			try_name = ifname ? g_strdup_printf ("%s-%s", get_name_alias (type, slave_type, nmc_valid_connection_types), ifname)
 					  : g_strdup (get_name_alias (type, slave_type, nmc_valid_connection_types));
-			default_name = nmc_unique_connection_name (nmc->connections, try_name);
+			default_name = nmc_unique_connection_name (connections, try_name);
 			g_free (try_name);
 			g_object_set (s_con, NM_SETTING_CONNECTION_ID, default_name, NULL);
 			g_free (default_name);
@@ -4995,12 +5064,14 @@ finish:
 static void
 uuid_display_hook (char **array, int len, int max_len)
 {
+	const GPtrArray *connections;
 	NMConnection *con;
 	int i, max = 0;
 	char *tmp;
 	const char *id;
 	for (i = 1; i <= len; i++) {
-		con = nmc_find_connection (nmc_tab_completion.nmc->connections, "uuid", array[i], NULL, FALSE);
+		connections = nm_client_get_connections (nmc_tab_completion.nmc->client);
+		con = nmc_find_connection (connections, "uuid", array[i], NULL, FALSE);
 		id = con ? nm_connection_get_id (con) : NULL;
 		if (id) {
 			tmp = g_strdup_printf ("%s (%s)", array[i], id);
@@ -5304,10 +5375,11 @@ _create_vpn_array (const GPtrArray *connections, gboolean uuid)
 static char *
 gen_vpn_uuids (const char *text, int state)
 {
-	const GPtrArray *connections = nm_cli.connections;
+	const GPtrArray *connections;
 	const char **uuids;
 	char *ret;
 
+	connections = nm_client_get_connections (nm_cli.client);
 	if (connections->len < 1)
 		return NULL;
 
@@ -5320,10 +5392,11 @@ gen_vpn_uuids (const char *text, int state)
 static char *
 gen_vpn_ids (const char *text, int state)
 {
-	const GPtrArray *connections = nm_cli.connections;
+	const GPtrArray *connections;
 	const char **ids;
 	char *ret;
 
+	connections = nm_client_get_connections (nm_cli.client);
 	if (connections->len < 1)
 		return NULL;
 
@@ -5584,6 +5657,8 @@ should_complete_files (const char *prompt, const char *line)
 		"phase2-private-key",
 		/* 'team' and 'team-port' properties */
 		"config",
+		/* 'proxy' properties */
+		"pac-script",
 		NULL
 	};
 	return _get_and_check_property (prompt, line, file_properties, NULL, NULL);
@@ -6280,8 +6355,6 @@ typedef struct {
 static gboolean nmc_editor_cb_called;
 static GError *nmc_editor_error;
 static MonitorACInfo *nmc_editor_monitor_ac;
-static GMutex nmc_editor_mutex;
-static GCond nmc_editor_cond;
 
 /*
  * Store 'error' to shared 'nmc_editor_error' and monitoring info to
@@ -6291,12 +6364,9 @@ static GCond nmc_editor_cond;
 static void
 set_info_and_signal_editor_thread (GError *error, MonitorACInfo *monitor_ac_info)
 {
-	g_mutex_lock (&nmc_editor_mutex);
 	nmc_editor_cb_called = TRUE;
 	nmc_editor_error = error ? g_error_copy (error) : NULL;
 	nmc_editor_monitor_ac = monitor_ac_info;
-	g_cond_signal (&nmc_editor_cond);
-	g_mutex_unlock (&nmc_editor_mutex);
 }
 
 static void
@@ -6360,6 +6430,7 @@ progress_activation_editor_cb (gpointer user_data)
 	return TRUE;
 
 finish:
+	info->monitor_id = 0;
 	if (device)
 		g_object_unref (device);
 	if (ac)
@@ -6387,7 +6458,7 @@ activate_connection_editor_cb (GObject *client,
 			device = ac_devs->len > 0 ? g_ptr_array_index (ac_devs, 0) : NULL;
 		}
 		if (device) {
-			monitor_ac_info = g_malloc0 (sizeof (AddConnectionInfo));
+			monitor_ac_info = g_malloc0 (sizeof (MonitorACInfo));
 			monitor_ac_info->device = g_object_ref (device);
 			monitor_ac_info->ac = active;
 			monitor_ac_info->monitor_id = g_timeout_add (120, progress_activation_editor_cb, monitor_ac_info);
@@ -7093,6 +7164,8 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
 						nmc_setting_ip4_connect_handlers (NM_SETTING_IP_CONFIG (setting));
 					else if (NM_IS_SETTING_IP6_CONFIG (setting))
 						nmc_setting_ip6_connect_handlers (NM_SETTING_IP_CONFIG (setting));
+					else if (NM_IS_SETTING_PROXY (setting))
+						nmc_setting_proxy_connect_handlers (NM_SETTING_PROXY (setting));
 
 					nm_connection_add_setting (connection, setting);
 				}
@@ -7439,10 +7512,9 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
 					update_connection (persistent, rem_con, update_connection_editor_cb, NULL);
 				}
 
-				g_mutex_lock (&nmc_editor_mutex);
 				//FIXME: add also a timeout for cases the callback is not called
 				while (!nmc_editor_cb_called)
-					g_cond_wait (&nmc_editor_cond, &nmc_editor_mutex);
+					g_main_context_iteration (NULL, TRUE);
 
 				if (nmc_editor_error) {
 					g_print (_("Error: Failed to save '%s' (%s) connection: %s\n"),
@@ -7484,7 +7556,6 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
 
 				nmc_editor_cb_called = FALSE;
 				nmc_editor_error = NULL;
-				g_mutex_unlock (&nmc_editor_mutex);
 			} else {
 				g_print (_("Error: connection verification failed: %s\n"),
 				         err1 ? err1->message : _("(unknown error)"));
@@ -7529,9 +7600,8 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
 				break;
 			}
 
-			g_mutex_lock (&nmc_editor_mutex);
 			while (!nmc_editor_cb_called)
-				g_cond_wait (&nmc_editor_cond, &nmc_editor_mutex);
+				g_main_context_iteration (NULL, TRUE);
 
 			if (nmc_editor_error) {
 				g_print (_("Error: Failed to activate '%s' (%s) connection: %s\n"),
@@ -7540,8 +7610,7 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
 				         nmc_editor_error->message);
 				g_error_free (nmc_editor_error);
 			} else {
-				g_print (_("Monitoring connection activation (press any key to continue)\n"));
-				nmc_get_user_input ("");
+				nmc_readline (_("Monitoring connection activation (press any key to continue)\n"));
 			}
 
 			if (nmc_editor_monitor_ac) {
@@ -7552,7 +7621,6 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
 			nmc_editor_cb_called = FALSE;
 			nmc_editor_error = NULL;
 			nmc_editor_monitor_ac = NULL;
-			g_mutex_unlock (&nmc_editor_mutex);
 
 			/* Update timestamp in local connection */
 			update_connection_timestamp (NM_CONNECTION (rem_con), connection);
@@ -7744,6 +7812,11 @@ editor_init_new_connection (NmCli *nmc, NMConnection *connection)
 		setting = nm_setting_ip6_config_new ();
 		nmc_setting_custom_init (setting);
 		nm_connection_add_setting (connection, setting);
+
+		/* Also Proxy Setting */
+		setting = nm_setting_proxy_new ();
+		nmc_setting_custom_init (setting);
+		nm_connection_add_setting (connection, setting);
 	}
 }
 
@@ -7751,11 +7824,13 @@ static void
 editor_init_existing_connection (NMConnection *connection)
 {
 	NMSettingIPConfig *s_ip4, *s_ip6;
+	NMSettingProxy *s_proxy;
 	NMSettingWireless *s_wireless;
 	NMSettingConnection *s_con;
 
 	s_ip4 = nm_connection_get_setting_ip4_config (connection);
 	s_ip6 = nm_connection_get_setting_ip6_config (connection);
+	s_proxy = nm_connection_get_setting_proxy (connection);
 	s_wireless = nm_connection_get_setting_wireless (connection);
 	s_con = nm_connection_get_setting_connection (connection);
 
@@ -7763,6 +7838,8 @@ editor_init_existing_connection (NMConnection *connection)
 		nmc_setting_ip4_connect_handlers (s_ip4);
 	if (s_ip6)
 		nmc_setting_ip6_connect_handlers (s_ip6);
+	if (s_proxy)
+		nmc_setting_proxy_connect_handlers (s_proxy);
 	if (s_wireless)
 		nmc_setting_wireless_connect_handlers (s_wireless);
 	if (s_con)
@@ -7770,8 +7847,9 @@ editor_init_existing_connection (NMConnection *connection)
 }
 
 static NMCResultCode
-do_connection_edit_func (NmCli *nmc, int argc, char **argv)
+do_connection_edit (NmCli *nmc, int argc, char **argv)
 {
+	const GPtrArray *connections;
 	NMConnection *connection = NULL;
 	NMSettingConnection *s_con;
 	const char *connection_type;
@@ -7818,6 +7896,8 @@ do_connection_edit_func (NmCli *nmc, int argc, char **argv)
 	/* Use ' ' and '.' as word break characters */
 	rl_completer_word_break_characters = ". ";
 
+	connections = nm_client_get_connections (nmc->client);
+
 	if (!con) {
 		if (con_id && !con_uuid && !con_path) {
 			con = con_id;
@@ -7842,7 +7922,7 @@ do_connection_edit_func (NmCli *nmc, int argc, char **argv)
 		/* Existing connection */
 		NMConnection *found_con;
 
-		found_con = nmc_find_connection (nmc->connections, selector, con, NULL, FALSE);
+		found_con = nmc_find_connection (connections, selector, con, NULL, FALSE);
 		if (!found_con) {
 			g_string_printf (nmc->return_text, _("Error: Unknown connection '%s'."), con);
 			nmc->return_value = NMC_RESULT_ERROR_NOT_FOUND;
@@ -7900,7 +7980,7 @@ do_connection_edit_func (NmCli *nmc, int argc, char **argv)
 		if (con_name)
 			default_name = g_strdup (con_name);
 		else
-			default_name = nmc_unique_connection_name (nmc->connections,
+			default_name = nmc_unique_connection_name (connections,
 			                                           get_name_alias (connection_type, NULL, nmc_valid_connection_types));
 
 		g_object_set (s_con,
@@ -7944,55 +8024,12 @@ do_connection_edit_func (NmCli *nmc, int argc, char **argv)
 		g_object_unref (connection);
 	g_free (nmc_tab_completion.con_type);
 
-	nmc->should_wait++;
 	return nmc->return_value;
 
 error:
 	g_assert (!connection);
 	g_free (type_ask);
 
-	nmc->should_wait++;
-	return nmc->return_value;
-}
-
-typedef struct {
-	NmCli *nmc;
-	int argc;
-	char **argv;
-} NmcEditorThreadData;
-
-static GThread *editor_thread;
-static NmcEditorThreadData editor_thread_data;
-
-/*
- * We need to run do_connection_edit_func() in a thread so that
- * glib main loop is not blocked and could receive and process D-Bus
- * return messages.
- */
-static gpointer
-connection_editor_thread_func (gpointer data)
-{
-	NmcEditorThreadData *td = (NmcEditorThreadData *) data;
-
-	/* run editor for editing/adding connections */
-	td->nmc->return_value = do_connection_edit_func (td->nmc, td->argc, td->argv);
-
-	/* quit glib main loop now that we are done with this thread */
-	quit ();
-
-	return NULL;
-}
-
-static NMCResultCode
-do_connection_edit (NmCli *nmc, int argc, char **argv)
-{
-	nmc->should_wait++;
-	editor_thread_data.nmc = nmc;
-	editor_thread_data.argc = argc;
-	editor_thread_data.argv = argv;
-	editor_thread = g_thread_new ("editor-thread", connection_editor_thread_func, &editor_thread_data);
-	g_thread_unref (editor_thread);
-
 	return nmc->return_value;
 }
 
@@ -8376,14 +8413,15 @@ do_connection_monitor (NmCli *nmc, int argc, char **argv)
 
 	if (argc == 0) {
 		/* No connections specified. Monitor all. */
+		const GPtrArray *connections;
 		int i;
 
 		/* nmc_do_cmd() should not call this with argc=0. */
 		g_assert (!nmc->complete);
 
-		nmc->connections = nm_client_get_connections (nmc->client);
-		for (i = 0; i < nmc->connections->len; i++)
-			connection_watch (nmc, g_ptr_array_index (nmc->connections, i));
+		connections = nm_client_get_connections (nmc->client);
+		for (i = 0; i < connections->len; i++)
+			connection_watch (nmc, g_ptr_array_index (connections, i));
 
 		/* We'll watch the connection additions too, never exit. */
 		nmc->should_wait++;
@@ -8720,23 +8758,22 @@ static char *
 gen_func_connection_names (const char *text, int state)
 {
 	int i;
-	const char **connections;
+	const GPtrArray *connections;
+	const char **connection_names;
 	char *ret;
 
-	if (nm_cli.connections->len == 0)
+	connections = nm_client_get_connections (nm_cli.client);
+	if (connections->len == 0)
 		return NULL;
 
-	connections = g_new (const char *, nm_cli.connections->len + 1);
-	for (i = 0; i < nm_cli.connections->len; i++) {
-		NMConnection *con = NM_CONNECTION (nm_cli.connections->pdata[i]);
-		const char *id = nm_connection_get_id (con);
-		connections[i] = id;
-	}
-	connections[i] = NULL;
+	connection_names = g_new (const char *, connections->len + 1);
+	for (i = 0; i < connections->len; i++)
+		connection_names[i] = nm_connection_get_id (NM_CONNECTION (connections->pdata[i]));
+	connection_names[i] = NULL;
 
-	ret = nmc_rl_gen_func_basic (text, state, connections);
+	ret = nmc_rl_gen_func_basic (text, state, connection_names);
 
-	g_free (connections);
+	g_free (connection_names);
 	return ret;
 }
 
@@ -8803,20 +8840,20 @@ nmcli_con_tab_completion (const char *text, int start, int end)
 }
 
 static const NMCCommand connection_cmds[] = {
-	{"show",     do_connections_show,      usage_connection_show },
-	{"up",       do_connection_up,         usage_connection_up },
-	{"down",     do_connection_down,       usage_connection_down },
-	{"add",      do_connection_add,        usage_connection_add },
-	{"edit",     do_connection_edit,       usage_connection_edit },
-	{"delete",   do_connection_delete,     usage_connection_delete },
-	{"reload",   do_connection_reload,     usage_connection_reload },
-	{"load",     do_connection_load,       usage_connection_load },
-	{"modify",   do_connection_modify,     usage_connection_modify },
-	{"clone",    do_connection_clone,      usage_connection_clone },
-	{"import",   do_connection_import,     usage_connection_import },
-	{"export",   do_connection_export,     usage_connection_export },
-	{"monitor",  do_connection_monitor,    usage_connection_monitor },
-	{NULL,       do_connections_show,      usage },
+	{ "show",     do_connections_show,      usage_connection_show,     TRUE,   TRUE },
+	{ "up",       do_connection_up,         usage_connection_up,       TRUE,   TRUE },
+	{ "down",     do_connection_down,       usage_connection_down,     TRUE,   TRUE },
+	{ "add",      do_connection_add,        usage_connection_add,      TRUE,   TRUE },
+	{ "edit",     do_connection_edit,       usage_connection_edit,     TRUE,   TRUE },
+	{ "delete",   do_connection_delete,     usage_connection_delete,   TRUE,   TRUE },
+	{ "reload",   do_connection_reload,     usage_connection_reload,   TRUE,   TRUE },
+	{ "load",     do_connection_load,       usage_connection_load,     TRUE,   TRUE },
+	{ "modify",   do_connection_modify,     usage_connection_modify,   TRUE,   TRUE },
+	{ "clone",    do_connection_clone,      usage_connection_clone,    TRUE,   TRUE },
+	{ "import",   do_connection_import,     usage_connection_import,   TRUE,   TRUE },
+	{ "export",   do_connection_export,     usage_connection_export,   TRUE,   TRUE },
+	{ "monitor",  do_connection_monitor,    usage_connection_monitor,  TRUE,   TRUE },
+	{ NULL,       do_connections_show,      usage,                     TRUE,   TRUE },
 };
 
 /* Entry point function for connections-related commands: 'nmcli connection' */
@@ -8829,22 +8866,9 @@ do_connections (NmCli *nmc, int argc, char **argv)
 	/* Set completion function for 'nmcli con' */
 	rl_attempted_completion_function = (rl_completion_func_t *) nmcli_con_tab_completion;
 
-	/* Get NMClient object early */
-	nmc->get_client (nmc);
+	nmc_do_cmd (nmc, connection_cmds, *argv, argc, argv);
 
-	/* Check whether NetworkManager is running */
-	if (!nm_client_get_nm_running (nmc->client)) {
-		if (!nmc->complete) {
-			g_string_printf (nmc->return_text, _("Error: NetworkManager is not running."));
-			nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING;
-		}
-		return nmc->return_value;
-	}
-
-	/* Get the connection list */
-	nmc->connections = nm_client_get_connections (nmc->client);
-
-	return nmc_do_cmd (nmc, connection_cmds, *argv, argc, argv);
+	return nmc->return_value;
 }
 
 void
diff --git a/clients/cli/devices.c b/clients/cli/devices.c
index 550f0c2e..eaded0ca 100644
--- a/clients/cli/devices.c
+++ b/clients/cli/devices.c
@@ -443,7 +443,7 @@ usage_device_wifi (void)
 	              "used to list APs for a particular interface, or with a specific BSSID.\n"
 	              "\n"
 	              "ARGUMENTS := connect <(B)SSID> [password <password>] [wep-key-type key|phrase] [ifname <ifname>]\n"
-	              "                    [bssid <BSSID>] [name <name>] [private yes|no] [hidden yes|no]\n"
+	              "                     [bssid <BSSID>] [name <name>] [private yes|no] [hidden yes|no]\n"
 	              "\n"
 	              "Connect to a Wi-Fi network specified by SSID or BSSID. The command creates\n"
 	              "a new connection and then activates it on a device. This is a command-line\n"
@@ -454,8 +454,8 @@ usage_device_wifi (void)
 	              "only open, WEP and WPA-PSK networks are supported at the moment. It is also\n"
 	              "assumed that IP configuration is obtained via DHCP.\n"
 	              "\n"
-	              "ARGUMENTS := wifi hotspot [ifname <ifname>] [con-name <name>] [ssid <SSID>]\n"
-	              "                          [band a|bg] [channel <channel>] [password <password>]\n"
+	              "ARGUMENTS := hotspot [ifname <ifname>] [con-name <name>] [ssid <SSID>]\n"
+	              "                     [band a|bg] [channel <channel>] [password <password>]\n"
 	              "\n"
 	              "Create a Wi-Fi hotspot. Use 'connection down' or 'device disconnect'\n"
 	              "to stop the hotspot.\n"
@@ -1856,8 +1856,6 @@ do_device_connect (NmCli *nmc, int argc, char **argv)
 	nmc->nowait_flag = (nmc->timeout == 0);
 	nmc->should_wait++;
 
-	nmc->connections = nm_client_get_connections (nmc->client);
-
 	/* Create secret agent */
 	nmc->secret_agent = nm_secret_agent_simple_new ("nmcli-connect");
 	if (nmc->secret_agent) {
@@ -3313,6 +3311,7 @@ do_device_wifi_hotspot (NmCli *nmc, int argc, char **argv)
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4, *s_ip6;
+	NMSettingProxy *s_proxy;
 	GBytes *ssid_bytes;
 	GError *error = NULL;
 
@@ -3479,6 +3478,10 @@ do_device_wifi_hotspot (NmCli *nmc, int argc, char **argv)
 	nm_connection_add_setting (connection, NM_SETTING (s_ip6));
 	g_object_set (s_ip6, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL);
 
+	s_proxy = (NMSettingProxy *) nm_setting_proxy_new ();
+	nm_connection_add_setting (connection, NM_SETTING (s_proxy));
+	g_object_set (s_proxy, NM_SETTING_PROXY_METHOD, (int) NM_SETTING_PROXY_METHOD_NONE, NULL);
+
 	/* Activate the connection now */
 	nmc->nowait_flag = (nmc->timeout == 0);
 	nmc->should_wait++;
@@ -3604,11 +3607,11 @@ finish:
 }
 
 static NMCCommand device_wifi_cmds[] = {
-	{"list",     do_device_wifi_list,            NULL },
-	{"connect",  do_device_wifi_connect_network, NULL },
-	{"hotspot",  do_device_wifi_hotspot,         NULL },
-	{"rescan",   do_device_wifi_rescan,          NULL },
-	{NULL,       do_device_wifi_list,            NULL }
+	{ "list",     do_device_wifi_list,            NULL,             TRUE,   TRUE },
+	{ "connect",  do_device_wifi_connect_network, NULL,             TRUE,   TRUE },
+	{ "hotspot",  do_device_wifi_hotspot,         NULL,             TRUE,   TRUE },
+	{ "rescan",   do_device_wifi_rescan,          NULL,             TRUE,   TRUE },
+	{ NULL,       do_device_wifi_list,            NULL,             TRUE,   TRUE },
 };
 
 static NMCResultCode
@@ -3622,7 +3625,9 @@ do_device_wifi (NmCli *nmc, int argc, char **argv)
 		return NMC_RESULT_ERROR_USER_INPUT;
 	}
 
-	return nmc_do_cmd (nmc, device_wifi_cmds, *argv, argc, argv);
+	nmc_do_cmd (nmc, device_wifi_cmds, *argv, argc, argv);
+
+	return nmc->return_value;
 }
 
 static int
@@ -3777,8 +3782,8 @@ do_device_lldp_list (NmCli *nmc, int argc, char **argv)
 }
 
 static NMCCommand device_lldp_cmds[] = {
-	{"list",  do_device_lldp_list,  NULL },
-	{NULL,    do_device_lldp_list,  NULL }
+	{ "list",  do_device_lldp_list,  NULL,             TRUE,   TRUE },
+	{ NULL,    do_device_lldp_list,  NULL,             TRUE,   TRUE },
 };
 
 static NMCResultCode
@@ -3795,7 +3800,9 @@ do_device_lldp (NmCli *nmc, int argc, char **argv)
 	if (!nmc->mode_specified)
 		nmc->multiline_output = TRUE;  /* multiline mode is default for 'device lldp' */
 
-	return nmc_do_cmd (nmc, device_lldp_cmds, *argv, argc, argv);
+	nmc_do_cmd (nmc, device_lldp_cmds, *argv, argc, argv);
+
+	return nmc->return_value;
 }
 
 static gboolean
@@ -3841,18 +3848,18 @@ nmcli_device_tab_completion (const char *text, int start, int end)
 }
 
 static const NMCCommand device_cmds[] = {
-	{"status",      do_devices_status,      usage_device_status },
-	{"show",        do_device_show,         usage_device_show },
-	{"connect",     do_device_connect,      usage_device_connect },
-	{"reapply",     do_device_reapply,      usage_device_reapply },
-	{"disconnect",  do_devices_disconnect,  usage_device_disconnect },
-	{"delete",      do_devices_delete,      usage_device_delete },
-	{"set",         do_device_set,          usage_device_set },
-	{"monitor",     do_devices_monitor,     usage_device_monitor },
-	{"wifi",        do_device_wifi,         usage_device_wifi },
-	{"lldp",        do_device_lldp,         usage_device_lldp },
-	{"modify",      do_device_modify,       usage_device_modify },
-	{NULL,          do_devices_status,      usage },
+	{ "status",      do_devices_status,      usage_device_status,      TRUE,   TRUE },
+	{ "show",        do_device_show,         usage_device_show,        TRUE,   TRUE },
+	{ "connect",     do_device_connect,      usage_device_connect,     TRUE,   TRUE },
+	{ "reapply",     do_device_reapply,      usage_device_reapply,     TRUE,   TRUE },
+	{ "disconnect",  do_devices_disconnect,  usage_device_disconnect,  TRUE,   TRUE },
+	{ "delete",      do_devices_delete,      usage_device_delete,      TRUE,   TRUE },
+	{ "set",         do_device_set,          usage_device_set,         TRUE,   TRUE },
+	{ "monitor",     do_devices_monitor,     usage_device_monitor,     TRUE,   TRUE },
+	{ "wifi",        do_device_wifi,         usage_device_wifi,        FALSE,  FALSE },
+	{ "lldp",        do_device_lldp,         usage_device_lldp,        FALSE,  FALSE },
+	{ "modify",      do_device_modify,       usage_device_modify,      TRUE,   TRUE },
+	{ NULL,          do_devices_status,      usage,                    TRUE,   TRUE },
 };
 
 NMCResultCode
@@ -3863,16 +3870,9 @@ do_devices (NmCli *nmc, int argc, char **argv)
 
 	rl_attempted_completion_function = (rl_completion_func_t *) nmcli_device_tab_completion;
 
-	/* Get NMClient object early */
-	nmc->get_client (nmc);
-
-	/* Check whether NetworkManager is running */
-	if (!nm_client_get_nm_running (nmc->client)) {
-		g_string_printf (nmc->return_text, _("Error: NetworkManager is not running."));
-		return NMC_RESULT_ERROR_NM_NOT_RUNNING;
-	}
+	nmc_do_cmd (nmc, device_cmds, *argv, argc, argv);
 
-	return nmc_do_cmd (nmc, device_cmds, *argv, argc, argv);
+	return nmc->return_value;
 }
 
 void
diff --git a/clients/cli/general.c b/clients/cli/general.c
index e9709125..512ec291 100644
--- a/clients/cli/general.c
+++ b/clients/cli/general.c
@@ -340,14 +340,6 @@ show_nm_status (NmCli *nmc, const char *pretty_header_name, const char *print_fl
 		return FALSE;
 	}
 
-	nmc->get_client (nmc); /* create NMClient */
-
-	if (!nm_client_get_nm_running (nmc->client)) {
-		g_string_printf (nmc->return_text, _("Error: NetworkManager is not running."));
-		nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING;
-		return FALSE;
-	}
-
 	state = nm_client_get_state (nmc->client);
 	startup = nm_client_get_startup (nmc->client);
 	connectivity = nm_client_get_connectivity (nmc->client);
@@ -462,8 +454,20 @@ permission_result_to_string (NMClientPermissionResult perm_result)
 }
 
 static gboolean
-show_nm_permissions (NmCli *nmc)
+timeout_cb (gpointer user_data)
+{
+	NmCli *nmc = (NmCli *) user_data;
+
+	g_string_printf (nmc->return_text, _("Error: Timeout %d sec expired."), nmc->timeout);
+	nmc->return_value = NMC_RESULT_ERROR_TIMEOUT_EXPIRED;
+	quit ();
+	return FALSE;
+}
+
+static int
+print_permissions (void *user_data)
 {
+	NmCli *nmc = user_data;
 	NMClientPermission perm;
 	GError *error = NULL;
 	const char *fields_str;
@@ -490,18 +494,11 @@ show_nm_permissions (NmCli *nmc)
 		return FALSE;
 	}
 
-	nmc->get_client (nmc); /* create NMClient */
-
-	if (!nm_client_get_nm_running (nmc->client)) {
-		g_string_printf (nmc->return_text, _("Error: NetworkManager is not running."));
-		nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING;
-		return FALSE;
-	}
-
 	nmc->print_fields.header_name = _("NetworkManager permissions");
 	arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_MAIN_HEADER_ADD | NMC_OF_FLAG_FIELD_NAMES);
 	g_ptr_array_add (nmc->output_data, arr);
 
+
 	for (perm = NM_CLIENT_PERMISSION_NONE + 1; perm <= NM_CLIENT_PERMISSION_LAST; perm++) {
 		NMClientPermissionResult perm_result = nm_client_get_permission_result (nmc->client, perm);
 
@@ -512,6 +509,57 @@ show_nm_permissions (NmCli *nmc)
 	}
 	print_data (nmc);  /* Print all data */
 
+	quit ();
+	return G_SOURCE_REMOVE;
+}
+
+static gboolean
+got_permissions (NmCli *nmc)
+{
+	NMClientPermission perm;
+
+	/* The server returns all the permissions at once, so if at least one is there
+	 * we already received the reply. */
+	for (perm = NM_CLIENT_PERMISSION_NONE + 1; perm <= NM_CLIENT_PERMISSION_LAST; perm++) {
+		if (nm_client_get_permission_result (nmc->client, perm) != NM_CLIENT_PERMISSION_RESULT_UNKNOWN)
+			return TRUE;
+	}
+
+	return FALSE;
+}
+
+static void
+permission_changed (NMClient *client,
+                    NMClientPermission permission,
+                    NMClientPermissionResult result,
+                    NmCli *nmc)
+{
+	if (got_permissions (nmc)) {
+		/* Defer the printing, so that we have a chance to process the other
+		 * permission-changed signals. */
+		g_idle_remove_by_data (nmc);
+		g_idle_add (print_permissions, nmc);
+	}
+}
+
+static gboolean
+show_nm_permissions (NmCli *nmc)
+{
+	/* The permissions are available now, just print them. */
+	if (got_permissions (nmc)) {
+		print_permissions (nmc);
+		return TRUE;
+	}
+
+	/* The client didn't get the permissions reply yet. Subscribe to changes. */
+	g_signal_connect (nmc->client, NM_CLIENT_PERMISSION_CHANGED,
+                          G_CALLBACK (permission_changed), nmc);
+
+	if (nmc->timeout == -1)
+		nmc->timeout = 10;
+	g_timeout_add_seconds (nmc->timeout, timeout_cb, nmc);
+
+	nmc->should_wait++;
 	return TRUE;
 }
 
@@ -562,7 +610,6 @@ show_general_logging (NmCli *nmc)
 		return FALSE;
 	}
 
-	nmc->get_client (nmc); /* create NMClient */
 	nm_client_get_logging (nmc->client, &level, &domains, &error);
 	if (error) {
 		g_string_printf (nmc->return_text, _("Error: %s."), error->message);
@@ -618,7 +665,6 @@ do_general_logging (NmCli *nmc, int argc, char **argv)
 			return error->code;
 		}
 
-		nmc->get_client (nmc); /* create NMClient */
 		nm_client_set_logging (nmc->client, level, domains, &error);
 		if (error) {
 			g_string_printf (nmc->return_text, _("Error: failed to set logging: %s"),
@@ -656,7 +702,6 @@ do_general_hostname (NmCli *nmc, int argc, char **argv)
 		/* no arguments -> get hostname */
 		char *hostname = NULL;
 
-		nmc->get_client (nmc); /* create NMClient */
 		g_object_get (nmc->client, NM_CLIENT_HOSTNAME, &hostname, NULL);
 		if (hostname)
 			g_print ("%s\n", hostname);
@@ -669,7 +714,6 @@ do_general_hostname (NmCli *nmc, int argc, char **argv)
 			g_print ("Warning: ignoring extra garbage after '%s' hostname\n", hostname);
 
 		nmc->should_wait++;
-		nmc->get_client (nmc); /* create NMClient */
 		nm_client_save_hostname_async (nmc->client, hostname, NULL, save_hostname_cb, nmc);
 	}
 
@@ -678,11 +722,11 @@ do_general_hostname (NmCli *nmc, int argc, char **argv)
 }
 
 static const NMCCommand general_cmds[] = {
-	{"status",       do_general_status,       usage_general_status },
-	{"hostname",     do_general_hostname,     usage_general_hostname },
-	{"permissions",  do_general_permissions,  usage_general_permissions },
-	{"logging",      do_general_logging,      usage_general_logging },
-	{NULL,           do_general_status,       usage_general }
+	{ "status",       do_general_status,       usage_general_status,       TRUE,   TRUE },
+	{ "hostname",     do_general_hostname,     usage_general_hostname,     TRUE,   TRUE },
+	{ "permissions",  do_general_permissions,  usage_general_permissions,  TRUE,   TRUE },
+	{ "logging",      do_general_logging,      usage_general_logging,      TRUE,   TRUE },
+	{ NULL,           do_general_status,       usage_general,              TRUE,   TRUE },
 };
 
 /*
@@ -694,7 +738,9 @@ do_general (NmCli *nmc, int argc, char **argv)
 	/* Register polkit agent */
 	nmc_start_polkit_agent_start_try (nmc);
 
-	return nmc_do_cmd (nmc, general_cmds, *argv, argc, argv);
+	nmc_do_cmd (nmc, general_cmds, *argv, argc, argv);
+
+	return nmc->return_value;
 }
 
 static gboolean
@@ -737,92 +783,91 @@ nmc_switch_parse_on_off (NmCli *nmc, const char *arg1, const char *arg2, gboolea
 	return TRUE;
 }
 
-static gboolean
-show_networking_connectivity (NmCli *nmc)
+static NMCResultCode
+do_networking_on_off (NmCli *nmc, int argc, char **argv, gboolean enable)
 {
-	return nmc_switch_show (nmc, NMC_FIELDS_NM_CONNECTIVITY, _("Connectivity"));
+	if (nmc->complete)
+		return nmc->return_value;
+
+	/* Register polkit agent */
+	nmc_start_polkit_agent_start_try (nmc);
+
+	nm_client_networking_set_enabled (nmc->client, enable, NULL);
+
+	return nmc->return_value;
 }
 
-/*
- * Entry point function for 'nmcli networking'
- */
-NMCResultCode
-do_networking (NmCli *nmc, int argc, char **argv)
+static NMCResultCode
+do_networking_on (NmCli *nmc, int argc, char **argv)
 {
-	gboolean enable_flag;
+	return do_networking_on_off (nmc, argc, argv, TRUE);
+}
 
-	/* Register polkit agent */
-	nmc_start_polkit_agent_start_try (nmc);
+static NMCResultCode
+do_networking_off (NmCli *nmc, int argc, char **argv)
+{
+	return do_networking_on_off (nmc, argc, argv, FALSE);
+}
 
-	if (argc == 0) {
-		if (nmc->complete)
-			return nmc->return_value;
-		nmc_switch_show (nmc, NMC_FIELDS_NM_NETWORKING, _("Networking"));
-	} else if (argc > 0) {
+static NMCResultCode
+do_networking_connectivity (NmCli *nmc, int argc, char **argv)
+{
+	if (nmc->complete) {
+		if (argc == 1)
+			nmc_complete_strings (*argv, "check", NULL);
+		return nmc->return_value;
+	}
 
-		if (argc == 1 && nmc->complete) {
-			nmc_complete_strings (*argv, "connectivity", NULL);
-			nmc_complete_bool (*argv);
-			return nmc->return_value;
-		}
+	if (!argc) {
+		/* no arguments -> get current state */
+		nmc_switch_show (nmc, NMC_FIELDS_NM_CONNECTIVITY, _("Connectivity"));
+	} else if (matches (*argv, "check") == 0) {
+		gs_free_error GError *error = NULL;
 
-		if (nmc_arg_is_help (*argv)) {
-			if (nmc->complete)
-				return nmc->return_value;
-			usage_networking ();
-		} else if (matches (*argv, "connectivity") == 0) {
-			if (nmc->complete) {
-				if (argc == 2)
-					nmc_complete_strings (*(argv+1), "check", NULL);
-				return nmc->return_value;
-			}
-			if (nmc_arg_is_help (*(argv+1))) {
-				usage_networking_connectivity ();
-				goto finish;
-			}
-			if (next_arg (&argc, &argv) != 0) {
-				/* no arguments -> get current state */
-				show_networking_connectivity (nmc);
-			} else if (matches (*argv, "check") == 0) {
-				GError *error = NULL;
-
-				nmc->get_client (nmc); /* create NMClient */
-				nm_client_check_connectivity (nmc->client, NULL, &error);
-				if (error) {
-					g_string_printf (nmc->return_text, _("Error: %s."), error->message);
-					nmc->return_value = NMC_RESULT_ERROR_UNKNOWN;
-					g_clear_error (&error);
-				} else
-					show_networking_connectivity (nmc);
-			} else {
-				usage_networking ();
-				g_string_printf (nmc->return_text, _("Error: 'networking connectivity' command '%s' is not valid."), *argv);
-				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-			}
-		} else if (nmc_switch_parse_on_off (nmc, *(argv-1), *argv, &enable_flag)) {
-			if (nmc->complete)
-				return nmc->return_value;
-			if (nmc_arg_is_help (*(argv+1))) {
-				if (enable_flag)
-					usage_networking_on ();
-				else
-					usage_networking_off ();
-				goto finish;
-			}
-
-			nmc->get_client (nmc); /* create NMClient */
-			nm_client_networking_set_enabled (nmc->client, enable_flag, NULL);
-		} else {
-			if (nmc->complete)
-				return nmc->return_value;
-			usage_networking ();
-			g_string_printf (nmc->return_text, _("Error: 'networking' command '%s' is not valid."), *argv);
-			nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-		}
+		/* Register polkit agent */
+		nmc_start_polkit_agent_start_try (nmc);
+
+		nm_client_check_connectivity (nmc->client, NULL, &error);
+		if (error) {
+			g_string_printf (nmc->return_text, _("Error: %s."), error->message);
+			nmc->return_value = NMC_RESULT_ERROR_UNKNOWN;
+		} else
+			nmc_switch_show (nmc, NMC_FIELDS_NM_CONNECTIVITY, _("Connectivity"));
+	} else {
+		usage_networking ();
+		g_string_printf (nmc->return_text, _("Error: 'networking' command '%s' is not valid."), *argv);
+		nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
 	}
 
-finish:
-	quit ();
+	return nmc->return_value;
+}
+
+static NMCResultCode
+do_networking_show (NmCli *nmc, int argc, char **argv)
+{
+	if (nmc->complete)
+		return nmc->return_value;
+
+	nmc_switch_show (nmc, NMC_FIELDS_NM_NETWORKING, _("Networking"));
+
+	return nmc->return_value;
+}
+
+static const NMCCommand networking_cmds[] = {
+	{ "on",           do_networking_on,           usage_networking_on,           TRUE,   TRUE },
+	{ "off",          do_networking_off,          usage_networking_off,          TRUE,   TRUE },
+	{ "connectivity", do_networking_connectivity, usage_networking_connectivity, TRUE,   TRUE },
+	{ NULL,           do_networking_show,         usage_networking,              TRUE,   TRUE },
+};
+
+/*
+ * Entry point function for networking commands 'nmcli networking'
+ */
+NMCResultCode
+do_networking (NmCli *nmc, int argc, char **argv)
+{
+	nmc_do_cmd (nmc, networking_cmds, *argv, argc, argv);
+
 	return nmc->return_value;
 }
 
@@ -852,7 +897,6 @@ do_radio_all (NmCli *nmc, int argc, char **argv)
 		if (!nmc_switch_parse_on_off (nmc, *(argv-1), *argv, &enable_flag))
 			return nmc->return_value;
 
-		nmc->get_client (nmc); /* create NMClient */
 		nm_client_wireless_set_enabled (nmc->client, enable_flag);
 		nm_client_wimax_set_enabled (nmc->client, enable_flag);
 		nm_client_wwan_set_enabled (nmc->client, enable_flag);
@@ -881,7 +925,6 @@ do_radio_wifi (NmCli *nmc, int argc, char **argv)
 		if (!nmc_switch_parse_on_off (nmc, *(argv-1), *argv, &enable_flag))
 			return nmc->return_value;
 
-		nmc->get_client (nmc); /* create NMClient */
 		nm_client_wireless_set_enabled (nmc->client, enable_flag);
 	}
 
@@ -908,7 +951,6 @@ do_radio_wwan (NmCli *nmc, int argc, char **argv)
 		if (!nmc_switch_parse_on_off (nmc, *(argv-1), *argv, &enable_flag))
 			return nmc->return_value;
 
-		nmc->get_client (nmc); /* create NMClient */
 		nm_client_wwan_set_enabled (nmc->client, enable_flag);
 	}
 
@@ -916,10 +958,10 @@ do_radio_wwan (NmCli *nmc, int argc, char **argv)
 }
 
 static const NMCCommand radio_cmds[] = {
-	{"all",   do_radio_all,   usage_radio_all },
-	{"wifi",  do_radio_wifi,  usage_radio_wifi },
-	{"wwan",  do_radio_wwan,  usage_radio_wwan },
-	{NULL,    do_radio_all,   usage_radio }
+	{ "all",   do_radio_all,   usage_radio_all,   TRUE,   TRUE },
+	{ "wifi",  do_radio_wifi,  usage_radio_wifi,  TRUE,   TRUE },
+	{ "wwan",  do_radio_wwan,  usage_radio_wwan,  TRUE,   TRUE },
+	{ NULL,    do_radio_all,   usage_radio,       TRUE,   TRUE },
 };
 
 /*
@@ -931,7 +973,9 @@ do_radio (NmCli *nmc, int argc, char **argv)
 	/* Register polkit agent */
 	nmc_start_polkit_agent_start_try (nmc);
 
-	return nmc_do_cmd (nmc, radio_cmds, *argv, argc, argv);
+	nmc_do_cmd (nmc, radio_cmds, *argv, argc, argv);
+
+	return nmc->return_value;
 }
 
 static void
@@ -1147,21 +1191,13 @@ do_overview (NmCli *nmc, int argc, char **argv)
 	const GPtrArray *p;
 	NMActiveConnection *ac;
 	NmcTermColor color;
+	NMDnsEntry *dns;
 	char *tmp;
 	int i;
 
 	/* Register polkit agent */
 	nmc_start_polkit_agent_start_try (nmc);
 
-	/* Get NMClient object early */
-	nmc->get_client (nmc);
-
-	/* Check whether NetworkManager is running */
-	if (!nm_client_get_nm_running (nmc->client)) {
-		g_string_printf (nmc->return_text, _("Error: NetworkManager is not running."));
-		return NMC_RESULT_ERROR_NM_NOT_RUNNING;
-	}
-
 	/* The VPN connections don't have devices (yet?). */
 	p = nm_client_get_active_connections (nmc->client);
 	for (i = 0; i < p->len; i++) {
@@ -1211,6 +1247,39 @@ do_overview (NmCli *nmc, int argc, char **argv)
 	}
 	g_free (devices);
 
+	p = nm_client_get_dns_configuration (nmc->client);
+	for (i = 0; p && i < p->len; i++) {
+		const char * const *strv;
+
+		dns = p->pdata[i];
+		strv = nm_dns_entry_get_nameservers (dns);
+		if (!strv || !strv[0]) {
+			/* Invalid entry */
+			continue;
+		}
+
+		if (i == 0)
+			g_print ("DNS configuration:\n");
+
+		tmp = g_strjoinv (" ", (char **) strv);
+		g_print ("\tservers: %s\n", tmp);
+		g_free (tmp);
+
+		strv = nm_dns_entry_get_domains (dns);
+		if (strv && strv[0]) {
+			tmp = g_strjoinv (" ", (char **) strv);
+			g_print ("\tdomains: %s\n", tmp);
+			g_free (tmp);
+		}
+
+		if (nm_dns_entry_get_interface (dns))
+			g_print ("\tinterface: %s\n", nm_dns_entry_get_interface (dns));
+
+		if (nm_dns_entry_get_vpn (dns))
+			g_print ("\ttype: vpn\n");
+		g_print ("\n");
+	}
+
 	g_print (_("Use \"nmcli device show\" to get complete information about known devices and\n"
 	           "\"nmcli connection show\" to get an overview on active connection profiles.\n"
 	           "\n"
@@ -1238,8 +1307,6 @@ do_monitor (NmCli *nmc, int argc, char **argv)
 		return nmc->return_value;
 	}
 
-	nmc->get_client (nmc); /* create NMClient */
-
 	if (!nm_client_get_nm_running (nmc->client)) {
 		char *str;
 
diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c
index 62088087..5c47e440 100644
--- a/clients/cli/nmcli.c
+++ b/clients/cli/nmcli.c
@@ -25,10 +25,10 @@
 #include <string.h>
 #include <stdlib.h>
 #include <signal.h>
-#include <pthread.h>
 #include <termios.h>
 #include <unistd.h>
 #include <locale.h>
+#include <glib-unix.h>
 #include <readline/readline.h>
 #include <readline/history.h>
 
@@ -61,7 +61,6 @@ typedef struct {
 
 /* --- Global variables --- */
 GMainLoop *loop = NULL;
-static sigset_t signal_set;
 struct termios termios_orig;
 
 static void
@@ -206,18 +205,18 @@ usage (void)
 }
 
 static const NMCCommand nmcli_cmds[] = {
-	{ "general",    do_general,     NULL },
-	{ "monitor",    do_monitor,     NULL },
-	{ "networking", do_networking,  NULL },
-	{ "radio",      do_radio,       NULL },
-	{ "connection", do_connections, NULL },
-	{ "device",     do_devices,     NULL },
-	{ "agent",      do_agent,       NULL },
-	{ NULL,         do_overview,    usage }
+	{ "general",     do_general,      NULL,   FALSE,  FALSE },
+	{ "monitor",     do_monitor,      NULL,   TRUE,   FALSE },
+	{ "networking",  do_networking,   NULL,   FALSE,  FALSE },
+	{ "radio",       do_radio,        NULL,   FALSE,  FALSE },
+	{ "connection",  do_connections,  NULL,   FALSE,  FALSE },
+	{ "device",      do_devices,      NULL,   FALSE,  FALSE },
+	{ "agent",       do_agent,        NULL,   FALSE,  FALSE },
+	{ NULL,          do_overview,     usage,  TRUE,   TRUE },
 };
 
-static NMCResultCode
-parse_command_line (NmCli *nmc, int argc, char **argv)
+static gboolean
+process_command_line (NmCli *nmc, int argc, char **argv)
 {
 	char *base;
 
@@ -258,12 +257,12 @@ parse_command_line (NmCli *nmc, int argc, char **argv)
 			if (nmc->print_output == NMC_PRINT_TERSE) {
 				g_string_printf (nmc->return_text, _("Error: Option '--terse' is specified the second time."));
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			else if (nmc->print_output == NMC_PRINT_PRETTY) {
 				g_string_printf (nmc->return_text, _("Error: Option '--terse' is mutually exclusive with '--pretty'."));
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			else
 				nmc->print_output = NMC_PRINT_TERSE;
@@ -271,21 +270,21 @@ parse_command_line (NmCli *nmc, int argc, char **argv)
 			if (nmc->print_output == NMC_PRINT_PRETTY) {
 				g_string_printf (nmc->return_text, _("Error: Option '--pretty' is specified the second time."));
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			else if (nmc->print_output == NMC_PRINT_TERSE) {
 				g_string_printf (nmc->return_text, _("Error: Option '--pretty' is mutually exclusive with '--terse'."));
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			else
 				nmc->print_output = NMC_PRINT_PRETTY;
 		} else if (matches (opt, "-mode") == 0) {
 			nmc->mode_specified = TRUE;
 			if (next_arg (&argc, &argv) != 0) {
-		 		g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt);
+				g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt);
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			if (argc == 1 && nmc->complete)
 				nmc_complete_strings (argv[0], "tabular", "multiline", NULL);
@@ -294,15 +293,15 @@ parse_command_line (NmCli *nmc, int argc, char **argv)
 			else if (matches (argv[0], "multiline") == 0)
 				nmc->multiline_output = TRUE;
 			else {
-		 		g_string_printf (nmc->return_text, _("Error: '%s' is not valid argument for '%s' option."), argv[0], opt);
+				g_string_printf (nmc->return_text, _("Error: '%s' is not valid argument for '%s' option."), argv[0], opt);
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 		} else if (matches (opt, "-colors") == 0) {
 			if (next_arg (&argc, &argv) != 0) {
-		 		g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt);
+				g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt);
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			if (argc == 1 && nmc->complete)
 				nmc_complete_strings (argv[0], "yes", "no", "auto", NULL);
@@ -313,15 +312,15 @@ parse_command_line (NmCli *nmc, int argc, char **argv)
 			else if (matches (argv[0], "no") == 0)
 				nmc->use_colors = NMC_USE_COLOR_NO;
 			else {
-		 		g_string_printf (nmc->return_text, _("Error: '%s' is not valid argument for '%s' option."), argv[0], opt);
+				g_string_printf (nmc->return_text, _("Error: '%s' is not valid argument for '%s' option."), argv[0], opt);
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 		} else if (matches (opt, "-escape") == 0) {
 			if (next_arg (&argc, &argv) != 0) {
-		 		g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt);
+				g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt);
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			if (argc == 1 && nmc->complete)
 				nmc_complete_strings (argv[0], "yes", "no", NULL);
@@ -330,15 +329,15 @@ parse_command_line (NmCli *nmc, int argc, char **argv)
 			else if (matches (argv[0], "no") == 0)
 				nmc->escape_values = FALSE;
 			else {
-		 		g_string_printf (nmc->return_text, _("Error: '%s' is not valid argument for '%s' option."), argv[0], opt);
+				g_string_printf (nmc->return_text, _("Error: '%s' is not valid argument for '%s' option."), argv[0], opt);
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 		} else if (matches (opt, "-fields") == 0) {
 			if (next_arg (&argc, &argv) != 0) {
-		 		g_string_printf (nmc->return_text, _("Error: fields for '%s' options are missing."), opt);
+				g_string_printf (nmc->return_text, _("Error: fields for '%s' options are missing."), opt);
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			if (argc == 1 && nmc->complete)
 				complete_fields (argv[0]);
@@ -352,15 +351,15 @@ parse_command_line (NmCli *nmc, int argc, char **argv)
 		} else if (matches (opt, "-wait") == 0) {
 			unsigned long timeout;
 			if (next_arg (&argc, &argv) != 0) {
-		 		g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt);
+				g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt);
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			if (!nmc_string_to_uint (argv[0], TRUE, 0, G_MAXINT, &timeout)) {
-		 		g_string_printf (nmc->return_text, _("Error: '%s' is not a valid timeout for '%s' option."),
-				                 argv[0], opt);
+				g_string_printf (nmc->return_text, _("Error: '%s' is not a valid timeout for '%s' option."),
+						 argv[0], opt);
 				nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-				return nmc->return_value;
+				return FALSE;
 			}
 			nmc->timeout = (int) timeout;
 		} else if (matches (opt, "-version") == 0) {
@@ -374,135 +373,63 @@ parse_command_line (NmCli *nmc, int argc, char **argv)
 		} else {
 			g_string_printf (nmc->return_text, _("Error: Option '%s' is unknown, try 'nmcli -help'."), opt);
 			nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
-			return nmc->return_value;
+			return FALSE;
 		}
 		argc--;
 		argv++;
 	}
 
 	/* Now run the requested command */
-	return nmc_do_cmd (nmc, nmcli_cmds, *argv, argc, argv);
+	nmc_do_cmd (nmc, nmcli_cmds, *argv, argc, argv);
+
+	return TRUE;
 }
 
 static gboolean nmcli_sigint = FALSE;
-static pthread_mutex_t sigint_mutex = PTHREAD_MUTEX_INITIALIZER;
-static gboolean nmcli_sigquit_internal = FALSE;
 
 gboolean
 nmc_seen_sigint (void)
 {
-	gboolean sigint;
-
-	pthread_mutex_lock (&sigint_mutex);
-	sigint = nmcli_sigint;
-	pthread_mutex_unlock (&sigint_mutex);
-	return sigint;
+	return nmcli_sigint;
 }
 
 void
 nmc_clear_sigint (void)
 {
-	pthread_mutex_lock (&sigint_mutex);
 	nmcli_sigint = FALSE;
-	pthread_mutex_unlock (&sigint_mutex);
 }
 
-void
-nmc_set_sigquit_internal (void)
+void nmc_exit (void)
 {
-	nmcli_sigquit_internal = TRUE;
+	tcsetattr (STDIN_FILENO, TCSADRAIN, &termios_orig);
+	nmc_cleanup_readline ();
+	exit (1);
 }
 
-static int
-event_hook_for_readline (void)
-{
-	/* Make readline() exit on SIGINT */
-	if (nmc_seen_sigint ()) {
-		rl_echo_signal_char (SIGINT);
-		rl_stuff_char ('\n');
-	}
-	return 0;
-}
-
-void *signal_handling_thread (void *arg);
-/*
- * Thread function waiting for signals and processing them.
- * Wait for signals in signal set. The semantics of sigwait() require that all
- * threads (including the thread calling sigwait()) have the signal masked, for
- * reliable operation. Otherwise, a signal that arrives while this thread is
- * not blocked in sigwait() might be delivered to another thread.
- */
-void *
-signal_handling_thread (void *arg) {
-	int signo;
-
-	while (1) {
-		sigwait (&signal_set, &signo);
-
-		switch (signo) {
-		case SIGINT:
-			if (nmc_get_in_readline ()) {
-				/* Don't quit when in readline, only signal we received SIGINT */
-				pthread_mutex_lock (&sigint_mutex);
-				nmcli_sigint = TRUE;
-				pthread_mutex_unlock (&sigint_mutex);
-			} else {
-				/* We can quit nmcli */
-				tcsetattr (STDIN_FILENO, TCSADRAIN, &termios_orig);
-				nmc_cleanup_readline ();
-				g_print (_("\nError: nmcli terminated by signal %s (%d)\n"),
-				         strsignal (signo), signo);
-				exit (1);
-			}
-			break;
-		case SIGQUIT:
-		case SIGTERM:
-			tcsetattr (STDIN_FILENO, TCSADRAIN, &termios_orig);
-			nmc_cleanup_readline ();
-			if (!nmcli_sigquit_internal)
-				g_print (_("\nError: nmcli terminated by signal %s (%d)\n"),
-				         strsignal (signo), signo);
-			exit (1);
-			break;
-		default:
-			break;
-		}
-	}
-	return NULL;
-}
-
-/*
- * Mask the signals we are interested in and create a signal handling thread.
- * Because all threads inherit the signal mask from their creator, all threads
- * in the process will have the signals masked. That's why setup_signals() has
- * to be called before creating other threads.
- */
 static gboolean
-setup_signals (void)
+signal_handler (gpointer user_data)
 {
-	pthread_t signal_thread_id;
-	int status;
-
-	sigemptyset (&signal_set);
-	sigaddset (&signal_set, SIGINT);
-	sigaddset (&signal_set, SIGQUIT);
-	sigaddset (&signal_set, SIGTERM);
-
-	/* Block all signals of interest. */
-	status = pthread_sigmask (SIG_BLOCK, &signal_set, NULL);
-	if (status != 0) {
-		g_printerr (_("Failed to set signal mask: %d\n"), status);
-		return FALSE;
-	}
+	int signo = GPOINTER_TO_INT (user_data);
 
-	/* Create the signal handling thread. */
-	status = pthread_create (&signal_thread_id, NULL, signal_handling_thread, NULL);
-	if (status != 0) {
-		g_printerr (_("Failed to create signal handling thread: %d\n"), status);
-		return FALSE;
+	switch (signo) {
+	case SIGINT:
+		if (nmc_get_in_readline ()) {
+			nmcli_sigint = TRUE;
+		} else {
+			g_print (_("Error: nmcli terminated by signal %s (%d)\n"),
+			         strsignal (signo),
+			         signo);
+			g_main_loop_quit (loop);
+		}
+		break;
+	case SIGTERM:
+		g_print (_("Error: nmcli terminated by signal %s (%d)\n"),
+		         strsignal (signo), signo);
+		nmc_exit ();
+		break;
 	}
 
-	return TRUE;
+	return G_SOURCE_CONTINUE;
 }
 
 static void
@@ -587,37 +514,17 @@ nmc_value_transforms_register (void)
 	                                 nmc_convert_bytes_to_string);
 }
 
-static NMClient *
-nmc_get_client (NmCli *nmc)
-{
-	GError *error = NULL;
-
-	if (!nmc->client) {
-		nmc->client = nm_client_new (NULL, &error);
-		if (!nmc->client) {
-			g_printerr ("%s\n", error->message);
-			g_clear_error (&error);
-			exit (NMC_RESULT_ERROR_UNKNOWN);
-		}
-	}
-
-	return nmc->client;
-}
-
 /* Initialize NmCli structure - set default values */
 static void
 nmc_init (NmCli *nmc)
 {
 	nmc->client = NULL;
-	nmc->get_client = &nmc_get_client;
 
 	nmc->return_value = NMC_RESULT_SUCCESS;
 	nmc->return_text = g_string_new (_("Success"));
 
 	nmc->timeout = -1;
 
-	nmc->connections = NULL;
-
 	nmc->secret_agent = NULL;
 	nmc->pwds_hash = NULL;
 	nmc->pk_listener = NULL;
@@ -664,28 +571,9 @@ nmc_cleanup (NmCli *nmc)
 	nmc_polkit_agent_fini (nmc);
 }
 
-static gboolean
-start (gpointer data)
-{
-	ArgsInfo *info = (ArgsInfo *) data;
-	info->nmc->return_value = parse_command_line (info->nmc, info->argc, info->argv);
-
-	if (!info->nmc->should_wait)
-		g_main_loop_quit (loop);
-
-	return FALSE;
-}
-
-
 int
 main (int argc, char *argv[])
 {
-	ArgsInfo args_info = { &nm_cli, argc, argv };
-
-	/* Set up unix signal handling */
-	if (!setup_signals ())
-		exit (NMC_RESULT_ERROR_UNKNOWN);
-
 	/* Set locale to use environment variables */
 	setlocale (LC_ALL, "");
 
@@ -701,20 +589,15 @@ main (int argc, char *argv[])
 	/* Save terminal settings */
 	tcgetattr (STDIN_FILENO, &termios_orig);
 
-	/* readline init */
-	rl_event_hook = event_hook_for_readline;
-	/* Set 0.01s timeout to mitigate slowness in readline when a broken version is used.
-	 * See https://bugzilla.redhat.com/show_bug.cgi?id=1109946
-	 */
-	rl_set_keyboard_input_timeout (10000);
+	g_unix_signal_add (SIGTERM, signal_handler, GINT_TO_POINTER (SIGTERM));
+	g_unix_signal_add (SIGINT, signal_handler, GINT_TO_POINTER (SIGINT));
 
 	nmc_value_transforms_register ();
 
 	nmc_init (&nm_cli);
-	g_idle_add (start, &args_info);
-
-	loop = g_main_loop_new (NULL, FALSE);  /* create main loop */
-	g_main_loop_run (loop);                /* run main loop */
+	loop = g_main_loop_new (NULL, FALSE);
+	if (process_command_line (&nm_cli, argc, argv))
+		g_main_loop_run (loop);
 
 	if (nm_cli.complete) {
 		/* Remove error statuses from command completion runs. */
diff --git a/clients/cli/nmcli.h b/clients/cli/nmcli.h
index a8908685..30600d21 100644
--- a/clients/cli/nmcli.h
+++ b/clients/cli/nmcli.h
@@ -132,15 +132,12 @@ typedef enum {
 /* NmCli - main structure */
 typedef struct _NmCli {
 	NMClient *client;                                 /* Pointer to NMClient of libnm */
-	NMClient *(*get_client) (struct _NmCli *nmc);     /* Pointer to function for creating NMClient */
 
 	NMCResultCode return_value;                       /* Return code of nmcli */
 	GString *return_text;                             /* Reason text */
 
 	int timeout;                                      /* Operation timeout */
 
-	const GPtrArray *connections;                     /* List of connections */
-
 	NMSecretAgentOld *secret_agent;                   /* Secret agent */
 	GHashTable *pwds_hash;                            /* Hash table with passwords in passwd-file */
 	NMPolkitListener *pk_listener ;                   /* polkit agent listener */
@@ -174,5 +171,6 @@ GQuark nmcli_error_quark (void);
 gboolean nmc_seen_sigint (void);
 void     nmc_clear_sigint (void);
 void     nmc_set_sigquit_internal (void);
+void     nmc_exit (void);
 
 #endif /* NMC_NMCLI_H */
diff --git a/clients/cli/settings-docs.c b/clients/cli/settings-docs.c
index c376fd7a..2520ba0e 100644
--- a/clients/cli/settings-docs.c
+++ b/clients/cli/settings-docs.c
@@ -16,12 +16,12 @@ NmcPropertyDesc setting_802_11_wireless[] = {
 	{ "band", "802.11 frequency band of the network.  One of \"a\" for 5GHz 802.11a or \"bg\" for 2.4GHz 802.11.  This will lock associations to the Wi-Fi network to the specific band, i.e. if \"a\" is specified, the device will not associate with the same network in the 2.4GHz band even if the network's settings are compatible.  This setting depends on specific driver capability and may not work with all drivers." },
 	{ "bssid", "If specified, directs the device to only associate with the given access point.  This capability is highly driver dependent and not supported by all devices.  Note: this property does not control the BSSID used when creating an Ad-Hoc network and is unlikely to in the future." },
 	{ "channel", "Wireless channel to use for the Wi-Fi connection.  The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel.  Because channel numbers overlap between bands, this property also requires the \"band\" property to be set." },
-	{ "cloned-mac-address", "If specified, request that the device use this MAC address instead of its permanent MAC address.  This is known as MAC cloning or spoofing. Beside explicitly specifing a MAC address, the special values \"preserve\", \"permanent\", \"random\" and \"stable\" are supported. \"preserve\" means not to touch the MAC address on activation. \"permanent\" means to use the permanent hardware address of the device. \"random\" creates a random MAC address on each connect. \"stable\" creates a hashed MAC address based on connection.stable-id (or the connection's UUID) and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to \"permanent\". On D-Bus, this field is expressed as \"assigned-mac-address\" or the deprecated \"cloned-mac-address\"." },
+	{ "cloned-mac-address", "If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing. Beside explicitly specifing a MAC address, the special values \"preserve\", \"permanent\", \"random\" and \"stable\" are supported. \"preserve\" means not to touch the MAC address on activation. \"permanent\" means to use the permanent hardware address of the device. \"random\" creates a random MAC address on each connect. \"stable\" creates a hashed MAC address based on connection.stable-id and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to \"preserve\" (older versions of NetworkManager may use a different default value). On D-Bus, this field is expressed as \"assigned-mac-address\" or the deprecated \"cloned-mac-address\"." },
 	{ "generate-mac-address-mask", "With \"cloned-mac-address\" setting \"random\" or \"stable\", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting \"FE:FF:FF:00:00:00\" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the \"random\" or \"stable\" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of \"FE:FF:FF:00:00:00 68:F7:28:00:00:00\" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of \"02:00:00:00:00:00 00:00:00:00:00:00\" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more then one additional MAC addresses, one of them is chosen randomly. For example, \"02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00\" will create a fully scrambled MAC address, randomly locally or globally administered." },
 	{ "hidden", "If TRUE, indicates this network is a non-broadcasting network that hides its SSID.  In this case various workarounds may take place, such as probe-scanning the SSID for more reliable network discovery.  However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution." },
 	{ "mac-address", "If specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing)." },
 	{ "mac-address-blacklist", "A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply.  Each MAC address should be given in the standard hex-digits-and-colons notation (eg \"00:11:22:33:44:55\")." },
-	{ "mac-address-randomization", "One of NM_SETTING_MAC_RANDOMIZATION_DEFAULT (0) (never randomize unless the user has set a global default to randomize and the supplicant supports randomization),  NM_SETTING_MAC_RANDOMIZATION_NEVER (1) (never randomize the MAC address), or NM_SETTING_MAC_RANDOMIZATION_ALWAYS (2) (always randomize the MAC address). Deprecated: 1" },
+	{ "mac-address-randomization", "One of NM_SETTING_MAC_RANDOMIZATION_DEFAULT (0) (never randomize unless the user has set a global default to randomize and the supplicant supports randomization),  NM_SETTING_MAC_RANDOMIZATION_NEVER (1) (never randomize the MAC address), or NM_SETTING_MAC_RANDOMIZATION_ALWAYS (2) (always randomize the MAC address). This property is deprecated for 'cloned-mac-address'. Deprecated: 1" },
 	{ "mode", "Wi-Fi network mode; one of \"infrastructure\", \"adhoc\" or \"ap\".  If blank, infrastructure is assumed." },
 	{ "mtu", "If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames." },
 	{ "name", "The setting's name, which uniquely identifies the setting within the connection.  Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\"." },
@@ -92,9 +92,9 @@ NmcPropertyDesc setting_802_1x[] = {
 };
   
 NmcPropertyDesc setting_802_3_ethernet[] = {
-	{ "auto-negotiate", "If TRUE, allow auto-negotiation of port speed and duplex mode.  If FALSE, do not allow auto-negotiation, in which case the \"speed\" and \"duplex\" properties should be set." },
-	{ "cloned-mac-address", "If specified, request that the device use this MAC address instead of its permanent MAC address.  This is known as MAC cloning or spoofing. Beside explicitly specifing a MAC address, the special values \"preserve\", \"permanent\", \"random\" and \"stable\" are supported. \"preserve\" means not to touch the MAC address on activation. \"permanent\" means to use the permanent hardware address of the device. \"random\" creates a random MAC address on each connect. \"stable\" creates a hashed MAC address based on connection.stable-id (or the connection's UUID) and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to \"permanent\". On D-Bus, this field is expressed as \"assigned-mac-address\" or the deprecated \"cloned-mac-address\"." },
-	{ "duplex", "If specified, request that the device only use the specified duplex mode. Either \"half\" or \"full\"." },
+	{ "auto-negotiate", "If TRUE, enforce auto-negotiation of port speed and duplex mode.  If FALSE, \"speed\" and \"duplex\" properties should be both set or link configuration will be skipped." },
+	{ "cloned-mac-address", "If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing. Beside explicitly specifing a MAC address, the special values \"preserve\", \"permanent\", \"random\" and \"stable\" are supported. \"preserve\" means not to touch the MAC address on activation. \"permanent\" means to use the permanent hardware address of the device. \"random\" creates a random MAC address on each connect. \"stable\" creates a hashed MAC address based on connection.stable-id and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to \"preserve\" (older versions of NetworkManager may use a different default value). On D-Bus, this field is expressed as \"assigned-mac-address\" or the deprecated \"cloned-mac-address\"." },
+	{ "duplex", "Can be specified only when \"auto-negotiate\" is \"off\". In that case, statically configures the device to use that specified duplex mode, either \"half\" or \"full\". Must be set together with the \"speed\" property if specified. Before specifying a duplex mode be sure your device supports it." },
 	{ "generate-mac-address-mask", "With \"cloned-mac-address\" setting \"random\" or \"stable\", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting \"FE:FF:FF:00:00:00\" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the \"random\" or \"stable\" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of \"FE:FF:FF:00:00:00 68:F7:28:00:00:00\" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of \"02:00:00:00:00:00 00:00:00:00:00:00\" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more then one additional MAC addresses, one of them is chosen randomly. For example, \"02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00\" will create a fully scrambled MAC address, randomly locally or globally administered." },
 	{ "mac-address", "If specified, this connection will only apply to the Ethernet device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing)." },
 	{ "mac-address-blacklist", "If specified, this connection will never apply to the Ethernet device whose permanent MAC address matches an address in the list.  Each MAC address is in the standard hex-digits-and-colons notation (00:11:22:33:44:55)." },
@@ -104,7 +104,7 @@ NmcPropertyDesc setting_802_3_ethernet[] = {
 	{ "s390-nettype", "s390 network device type; one of \"qeth\", \"lcs\", or \"ctc\", representing the different types of virtual network devices available on s390 systems." },
 	{ "s390-options", "Dictionary of key/value pairs of s390-specific device options.  Both keys and values must be strings.  Allowed keys include \"portno\", \"layer2\", \"portname\", \"protocol\", among others.  Key names must contain only alphanumeric characters (ie, [a-zA-Z0-9])." },
 	{ "s390-subchannels", "Identifies specific subchannels that this network device uses for communication with z/VM or s390 host.  Like the \"mac-address\" property for non-z/VM devices, this property can be used to ensure this connection only applies to the network device that uses these subchannels.  The list should contain exactly 3 strings, and each string may only be composed of hexadecimal characters and the period (.) character." },
-	{ "speed", "If non-zero, request that the device use only the specified speed.  In Mbit/s, ie 100 == 100Mbit/s." },
+	{ "speed", "Can be set to a value grater than zero only when \"auto-negotiate\" is \"off\". In that case, statically configures the device to use that specified speed. In Mbit/s, ie 100 == 100Mbit/s. Must be set together with the \"duplex\" property when non-zero. Before specifying a speed value be sure your device supports it." },
 	{ "wake-on-lan", "The NMSettingWiredWakeOnLan options to enable. Not all devices support all options. May be any combination of NM_SETTING_WIRED_WAKE_ON_LAN_PHY (0x2), NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST (0x4), NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST (0x8), NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST (0x10), NM_SETTING_WIRED_WAKE_ON_LAN_ARP (0x20), NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC (0x40) or the special values NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT (0x1) (to use global settings) and NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE (0x8000) (to disable management of Wake-on-LAN in NetworkManager)." },
 	{ "wake-on-lan-password", "If specified, the password used with magic-packet-based Wake-on-LAN, represented as an Ethernet MAC address.  If NULL, no password will be required." },
 };
@@ -161,6 +161,7 @@ NmcPropertyDesc setting_cdma[] = {
 NmcPropertyDesc setting_connection[] = {
 	{ "autoconnect", "Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection." },
 	{ "autoconnect-priority", "The autoconnect priority. If the connection is set to autoconnect, connections with higher priority will be preferred. Defaults to 0. The higher number means higher priority." },
+	{ "autoconnect-retries", "The number of times a connection should be tried when autoctivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden)." },
 	{ "autoconnect-slaves", "Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0." },
 	{ "gateway-ping-timeout", "If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping." },
 	{ "id", "A human readable unique identifier for the connection, like \"Work Wi-Fi\" or \"T-Mobile 3G\"." },
@@ -173,7 +174,7 @@ NmcPropertyDesc setting_connection[] = {
 	{ "read-only", "FALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified." },
 	{ "secondaries", "List of connection UUIDs that should be activated when the base connection itself is activated. Currently only VPN connections are supported." },
 	{ "slave-type", "Setting name of the device type of this slave's master connection (eg, \"bond\"), or NULL if this connection is not a slave." },
-	{ "stable-id", "This token to generate stable IDs for the connection. If unset, the UUID will be used instead. The stable-id is used instead of the connection UUID for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable." },
+	{ "stable-id", "Token to generate stable IDs for the connection. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. Note that also the interface name of the activating connection and a per-host secret key is included into the address generation so that the same stable-id on different hosts/devices yields different addresses. If the value is unset, an ID unique for the connection is used. Specifing a stable-id allows multiple connections to generate the same addresses. Another use is to generate IDs at runtime via dynamic substitutions. The '$' character is treated special to perform dynamic substitutions at runtime. Currently supported are \"${CONNECTION}\", \"${BOOT}\", \"${RANDOM}\". These effectively create unique IDs per-connection, per-boot, or every time. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as \"$$\". For example, set it to \"${CONNECTION}/${BOOT}\" to create a unique id for this connection that changes with every reboot. Note that two connections only use the same effective id if their stable-id is also identical before performing dynamic substitutions." },
 	{ "timestamp", "The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved)." },
 	{ "type", "Base type of the connection. For hardware-dependent connections, should contain the setting name of the hardware-type specific setting (ie, \"802-3-ethernet\" or \"802-11-wireless\" or \"bluetooth\", etc), and for non-hardware dependent connections like VPN or otherwise, should contain the setting name of that setting type (ie, \"vpn\" or \"bridge\", etc)." },
 	{ "uuid", "A universally unique identifier for the connection, for example generated with libuuid.  It should be assigned when the connection is created, and never changed as long as the connection still applies to the same network.  For example, it should not be changed when the \"id\" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or \"type\" property changes. The UUID must be in the format \"2815492f-7e56-435e-b2e9-246bd7cdc664\" (ie, contains only hexadecimal characters and \"-\")." },
@@ -253,8 +254,8 @@ NmcPropertyDesc setting_ipv4[] = {
 	{ "dhcp-send-hostname", "If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer.  If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent." },
 	{ "dhcp-timeout", "A timeout for a DHCP transaction in seconds." },
 	{ "dns", "Array of IP addresses of DNS servers." },
-	{ "dns-options", "Array of DNS options. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties." },
-	{ "dns-priority", "DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf.  A lower value means that servers will be on top of the file.  Zero selects the default value, which is 50 for VPNs and 100 for other connections.  When multiple devices have configurations with the same priority, the one with an active default route will be preferred.  Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from configurations with the lowest priority value will be used." },
+	{ "dns-options", "Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties." },
+	{ "dns-priority", "Intra-connection DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf.  A lower value means that servers will be on top of the file.  Zero selects the default value, which is 50 for VPNs and 100 for other connections.  Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. For that, just specify the DNS servers in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used." },
 	{ "dns-search", "Array of DNS search domains." },
 	{ "gateway", "The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set." },
 	{ "ignore-auto-dns", "When \"method\" is set to \"auto\" and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used." },
@@ -268,15 +269,15 @@ NmcPropertyDesc setting_ipv4[] = {
 };
   
 NmcPropertyDesc setting_ipv6[] = {
-	{ "addr-gen-mode", "Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: \"eui64\", or \"stable-privacy\". If the property is set to \"eui64\", the addresses will be generated using the interface tokens derived from  hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of \"stable-privacy\" enables use of cryptographically secure hash of a secret host-specific key along with the connection identification and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. On D-Bus, the absence of an addr-gen-mode setting equals enabling \"stable-privacy\". For keyfile plugin, the absence of the setting on disk means \"eui64\" so that the property doesn't change on upgrade from older versions. Note that this setting is distinct from the Privacy Extensions as configured by \"ip6-privacy\" property and it does not affect the temporary addresses configured with this option." },
+	{ "addr-gen-mode", "Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: \"eui64\", or \"stable-privacy\". If the property is set to \"eui64\", the addresses will be generated using the interface tokens derived from  hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of \"stable-privacy\" enables use of cryptographically secure hash of a secret host-specific key along with the connection's stable-id and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. On D-Bus, the absence of an addr-gen-mode setting equals enabling \"stable-privacy\". For keyfile plugin, the absence of the setting on disk means \"eui64\" so that the property doesn't change on upgrade from older versions. Note that this setting is distinct from the Privacy Extensions as configured by \"ip6-privacy\" property and it does not affect the temporary addresses configured with this option." },
 	{ "addresses", "Array of IP addresses." },
 	{ "dad-timeout", "Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network.  If an address conflict is detected, the activation will fail.  A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds).  A value greater than zero is a timeout in milliseconds." },
 	{ "dhcp-hostname", "If the \"dhcp-send-hostname\" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and \"dhcp-fqdn\" are mutually exclusive and cannot be set at the same time." },
 	{ "dhcp-send-hostname", "If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer.  If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent." },
 	{ "dhcp-timeout", "A timeout for a DHCP transaction in seconds." },
 	{ "dns", "Array of IP addresses of DNS servers." },
-	{ "dns-options", "Array of DNS options. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties." },
-	{ "dns-priority", "DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf.  A lower value means that servers will be on top of the file.  Zero selects the default value, which is 50 for VPNs and 100 for other connections.  When multiple devices have configurations with the same priority, the one with an active default route will be preferred.  Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from configurations with the lowest priority value will be used." },
+	{ "dns-options", "Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties." },
+	{ "dns-priority", "Intra-connection DNS priority. The relative priority to be used when determining the order of DNS servers in resolv.conf.  A lower value means that servers will be on top of the file.  Zero selects the default value, which is 50 for VPNs and 100 for other connections.  Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. For that, just specify the DNS servers in the desired order. When multiple devices have configurations with the same priority, the one with an active default route will be preferred. Note that when using dns=dnsmasq the order is meaningless since dnsmasq forwards queries to all known servers at the same time. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least a negative priority, only DNS servers from connections with the lowest priority value will be used." },
 	{ "dns-search", "Array of DNS search domains." },
 	{ "gateway", "The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set." },
 	{ "ignore-auto-dns", "When \"method\" is set to \"auto\" and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used." },
@@ -291,6 +292,18 @@ NmcPropertyDesc setting_ipv6[] = {
 	{ "token", "Configure the token for draft-chown-6man-tokenised-ipv6-identifiers-02 IPv6 tokenized interface identifiers. Useful with eui64 addr-gen-mode." },
 };
   
+NmcPropertyDesc setting_macsec[] = {
+	{ "encrypt", "Whether the transmitted traffic must be encrypted." },
+	{ "mka-cak", "The pre-shared CAK (Connectivity Association Key) for MACsec Key Agreement." },
+	{ "mka-cak-flags", "Flags indicating how to handle the \"mka-cak\" property." },
+	{ "mka-ckn", "The pre-shared CKN (Connectivity-association Key Name) for MACsec Key Agreement." },
+	{ "mode", "Specifies how the CAK (Connectivity Association Key) for MKA (MACsec Key Agreement) is obtained." },
+	{ "name", "The setting's name, which uniquely identifies the setting within the connection.  Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\"." },
+	{ "parent", "If given, specifies the parent interface name or parent connection UUID from which this MACSEC interface should be created.  If this property is not specified, the connection must contain an \"802-3-ethernet\" setting with a \"mac-address\" property." },
+	{ "port", "The port component of the SCI (Secure Channel Identifier), between 1 and 65534." },
+	{ "validation", "Specifies the validation mode for incoming frames." },
+};
+  
 NmcPropertyDesc setting_macvlan[] = {
 	{ "mode", "The macvlan mode, which specifies the communication mechanism between multiple macvlans on the same lower device." },
 	{ "name", "The setting's name, which uniquely identifies the setting within the connection.  Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\"." },
@@ -329,6 +342,14 @@ NmcPropertyDesc setting_pppoe[] = {
 	{ "username", "Username used to authenticate with the PPPoE service." },
 };
   
+NmcPropertyDesc setting_proxy[] = {
+	{ "browser-only", "Whether the proxy configuration is for browser only." },
+	{ "method", "Method for proxy configuration, Default is NM_SETTING_PROXY_METHOD_NONE (0)" },
+	{ "name", "The setting's name, which uniquely identifies the setting within the connection.  Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\"." },
+	{ "pac-script", "PAC script for the connection." },
+	{ "pac-url", "PAC URL for obtaining PAC file." },
+};
+  
 NmcPropertyDesc setting_serial[] = {
 	{ "baud", "Speed to use for communication over the serial port.  Note that this value usually has no effect for mobile broadband modems as they generally ignore speed settings and use the highest available speed." },
 	{ "bits", "Byte-width of the serial communication. The 8 in \"8n1\" for example." },
@@ -423,7 +444,7 @@ NmcSettingDesc all_settings[] = {
 	{ "bridge", setting_bridge, 9 },
 	{ "bridge-port", setting_bridge_port, 4 },
 	{ "cdma", setting_cdma, 5 },
-	{ "connection", setting_connection, 19 },
+	{ "connection", setting_connection, 20 },
 	{ "dcb", setting_dcb, 16 },
 	{ "generic", setting_generic, 1 },
 	{ "gsm", setting_gsm, 13 },
@@ -431,9 +452,11 @@ NmcSettingDesc all_settings[] = {
 	{ "ip-tunnel", setting_ip_tunnel, 13 },
 	{ "ipv4", setting_ipv4, 20 },
 	{ "ipv6", setting_ipv6, 21 },
+	{ "macsec", setting_macsec, 9 },
 	{ "macvlan", setting_macvlan, 5 },
 	{ "ppp", setting_ppp, 19 },
 	{ "pppoe", setting_pppoe, 5 },
+	{ "proxy", setting_proxy, 5 },
 	{ "serial", setting_serial, 6 },
 	{ "team", setting_team, 2 },
 	{ "team-port", setting_team_port, 2 },
diff --git a/clients/cli/settings.c b/clients/cli/settings.c
index ee167d2c..40cf9754 100644
--- a/clients/cli/settings.c
+++ b/clients/cli/settings.c
@@ -50,17 +50,18 @@ NmcOutputField nmc_fields_setting_connection[] = {
 	SETTING_FIELD (NM_SETTING_CONNECTION_TYPE),                  /* 5 */
 	SETTING_FIELD (NM_SETTING_CONNECTION_AUTOCONNECT),           /* 6 */
 	SETTING_FIELD (NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY),  /* 7 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_TIMESTAMP),             /* 8 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_READ_ONLY),             /* 9 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_PERMISSIONS),           /* 10 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_ZONE),                  /* 11 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_MASTER),                /* 12 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_SLAVE_TYPE),            /* 13 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES),    /* 14 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_SECONDARIES),           /* 15 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT),  /* 16 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_METERED),               /* 17 */
-	SETTING_FIELD (NM_SETTING_CONNECTION_LLDP),                  /* 18 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES),   /* 8 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_TIMESTAMP),             /* 9 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_READ_ONLY),             /* 10 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_PERMISSIONS),           /* 11 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_ZONE),                  /* 12 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_MASTER),                /* 13 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_SLAVE_TYPE),            /* 14 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES),    /* 15 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_SECONDARIES),           /* 16 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT),  /* 17 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_METERED),               /* 18 */
+	SETTING_FIELD (NM_SETTING_CONNECTION_LLDP),                  /* 19 */
 	{NULL, NULL, 0, NULL, FALSE, FALSE, 0}
 };
 #define NMC_FIELDS_SETTING_CONNECTION_ALL     "name"","\
@@ -71,6 +72,7 @@ NmcOutputField nmc_fields_setting_connection[] = {
                                               NM_SETTING_CONNECTION_TYPE","\
                                               NM_SETTING_CONNECTION_AUTOCONNECT","\
                                               NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY","\
+                                              NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES","\
                                               NM_SETTING_CONNECTION_TIMESTAMP","\
                                               NM_SETTING_CONNECTION_READ_ONLY","\
                                               NM_SETTING_CONNECTION_PERMISSIONS","\
@@ -741,6 +743,29 @@ NmcOutputField nmc_fields_setting_ip_tunnel[] = {
                                               NM_SETTING_IP_TUNNEL_FLOW_LABEL","\
                                               NM_SETTING_IP_TUNNEL_MTU
 
+/* Available fields for NM_SETTING_MACSEC_SETTING_NAME */
+NmcOutputField nmc_fields_setting_macsec[] = {
+	SETTING_FIELD ("name"),                                 /* 0 */
+	SETTING_FIELD (NM_SETTING_MACSEC_PARENT),               /* 1 */
+	SETTING_FIELD (NM_SETTING_MACSEC_MODE),                 /* 2 */
+	SETTING_FIELD (NM_SETTING_MACSEC_ENCRYPT),              /* 3 */
+	SETTING_FIELD (NM_SETTING_MACSEC_MKA_CAK),              /* 4 */
+	SETTING_FIELD (NM_SETTING_MACSEC_MKA_CAK_FLAGS),        /* 5 */
+	SETTING_FIELD (NM_SETTING_MACSEC_MKA_CKN),              /* 6 */
+	SETTING_FIELD (NM_SETTING_MACSEC_PORT),                 /* 7 */
+	SETTING_FIELD (NM_SETTING_MACSEC_VALIDATION),           /* 8 */
+	{NULL, NULL, 0, NULL, FALSE, FALSE, 0}
+};
+#define NMC_FIELDS_SETTING_MACSEC_ALL     "name"","\
+                                           NM_SETTING_MACSEC_PARENT","\
+                                           NM_SETTING_MACSEC_MODE","\
+                                           NM_SETTING_MACSEC_ENCRYPT","\
+                                           NM_SETTING_MACSEC_MKA_CAK","\
+                                           NM_SETTING_MACSEC_MKA_CAK_FLAGS","\
+                                           NM_SETTING_MACSEC_MKA_CKN","\
+                                           NM_SETTING_MACSEC_PORT","\
+                                           NM_SETTING_MACSEC_VALIDATION
+
 /* Available fields for NM_SETTING_MACVLAN_SETTING_NAME */
 NmcOutputField nmc_fields_setting_macvlan[] = {
 	SETTING_FIELD ("name"),                                 /* 0 */
@@ -795,6 +820,20 @@ NmcOutputField nmc_fields_setting_vxlan[] = {
                                              NM_SETTING_VXLAN_L2_MISS","\
                                              NM_SETTING_VXLAN_L3_MISS
 
+/* Available fields for NM_SETTING_PROXY_SETTING_NAME */
+NmcOutputField nmc_fields_setting_proxy[] = {
+	SETTING_FIELD ("name"),                            /* 0 */
+	SETTING_FIELD (NM_SETTING_PROXY_METHOD),           /* 1 */
+	SETTING_FIELD (NM_SETTING_PROXY_BROWSER_ONLY),     /* 2 */
+	SETTING_FIELD (NM_SETTING_PROXY_PAC_URL),          /* 3 */
+	SETTING_FIELD (NM_SETTING_PROXY_PAC_SCRIPT),       /* 4 */
+	{NULL, NULL, 0, NULL, FALSE, FALSE, 0}
+};
+#define NMC_FIELDS_SETTING_PROXY_ALL         "name"","\
+                                             NM_SETTING_PROXY_METHOD","\
+                                             NM_SETTING_PROXY_BROWSER_ONLY","\
+                                             NM_SETTING_PROXY_PAC_URL","\
+                                             NM_SETTING_PROXY_PAC_SCRIPT
 /*----------------------------------------------------------------------------*/
 static char *
 wep_key_type_to_string (NMWepKeyType type)
@@ -1042,14 +1081,21 @@ static char *
 nmc_property_802_1X_get_ca_cert (NMSetting *setting, NmcPropertyGetType get_type)
 {
 	NMSetting8021x *s_8021X = NM_SETTING_802_1X (setting);
-	NMSetting8021xCKScheme scheme;
 	char *ca_cert_str = NULL;
 
-	scheme = nm_setting_802_1x_get_ca_cert_scheme (s_8021X);
-	if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB)
+	switch (nm_setting_802_1x_get_ca_cert_scheme (s_8021X)) {
+	case NM_SETTING_802_1X_CK_SCHEME_BLOB:
 		ca_cert_str = bytes_to_string (nm_setting_802_1x_get_ca_cert_blob (s_8021X));
-	if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH)
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PATH:
 		ca_cert_str = g_strdup (nm_setting_802_1x_get_ca_cert_path (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PKCS11:
+		ca_cert_str = g_strdup (nm_setting_802_1x_get_ca_cert_uri (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_UNKNOWN:
+		break;
+	}
 
 	return ca_cert_str;
 }
@@ -1060,17 +1106,24 @@ nmc_property_802_1X_get_client_cert (NMSetting *setting,
                                      gboolean show_secrets)
 {
 	NMSetting8021x *s_8021X = NM_SETTING_802_1X (setting);
-	NMSetting8021xCKScheme scheme;
 	char *cert_str = NULL;
 
-	scheme = nm_setting_802_1x_get_client_cert_scheme (s_8021X);
-	if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) {
+	switch (nm_setting_802_1x_get_client_cert_scheme (s_8021X)) {
+	case NM_SETTING_802_1X_CK_SCHEME_BLOB:
 		if (show_secrets)
 			cert_str = bytes_to_string (nm_setting_802_1x_get_client_cert_blob (s_8021X));
 		else
 			cert_str = g_strdup (_("<hidden>"));
-	} else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH)
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PATH:
 		cert_str = g_strdup (nm_setting_802_1x_get_client_cert_path (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PKCS11:
+		cert_str = g_strdup (nm_setting_802_1x_get_client_cert_uri (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_UNKNOWN:
+		break;
+	}
 
 	return cert_str;
 }
@@ -1085,14 +1138,21 @@ static char *
 nmc_property_802_1X_get_phase2_ca_cert (NMSetting *setting, NmcPropertyGetType get_type)
 {
 	NMSetting8021x *s_8021X = NM_SETTING_802_1X (setting);
-	NMSetting8021xCKScheme scheme;
 	char *phase2_ca_cert_str = NULL;
 
-	scheme = nm_setting_802_1x_get_phase2_ca_cert_scheme (s_8021X);
-	if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB)
+	switch (nm_setting_802_1x_get_phase2_ca_cert_scheme (s_8021X)) {
+	case NM_SETTING_802_1X_CK_SCHEME_BLOB:
 		phase2_ca_cert_str = bytes_to_string (nm_setting_802_1x_get_phase2_ca_cert_blob (s_8021X));
-	if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH)
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PATH:
 		phase2_ca_cert_str = g_strdup (nm_setting_802_1x_get_phase2_ca_cert_path (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PKCS11:
+		phase2_ca_cert_str = g_strdup (nm_setting_802_1x_get_phase2_ca_cert_uri (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_UNKNOWN:
+		break;
+	}
 
 	return phase2_ca_cert_str;
 }
@@ -1103,17 +1163,24 @@ nmc_property_802_1X_get_phase2_client_cert (NMSetting *setting,
                                             gboolean show_secrets)
 {
 	NMSetting8021x *s_8021X = NM_SETTING_802_1X (setting);
-	NMSetting8021xCKScheme scheme;
 	char *cert_str = NULL;
 
-	scheme = nm_setting_802_1x_get_phase2_client_cert_scheme (s_8021X);
-	if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) {
+	switch (nm_setting_802_1x_get_phase2_client_cert_scheme (s_8021X)) {
+	case NM_SETTING_802_1X_CK_SCHEME_BLOB:
 		if (show_secrets)
 			cert_str = bytes_to_string (nm_setting_802_1x_get_phase2_client_cert_blob (s_8021X));
 		else
 			cert_str = g_strdup (_("<hidden>"));
-	} else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH)
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PATH:
 		cert_str = g_strdup (nm_setting_802_1x_get_phase2_client_cert_path (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PKCS11:
+		cert_str = g_strdup (nm_setting_802_1x_get_phase2_client_cert_uri (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_UNKNOWN:
+		break;
+	}
 
 	return cert_str;
 }
@@ -1137,17 +1204,24 @@ nmc_property_802_1X_get_private_key (NMSetting *setting,
                                      gboolean show_secrets)
 {
 	NMSetting8021x *s_8021X = NM_SETTING_802_1X (setting);
-	NMSetting8021xCKScheme scheme;
 	char *key_str = NULL;
 
-	scheme = nm_setting_802_1x_get_private_key_scheme (s_8021X);
-	if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) {
+	switch (nm_setting_802_1x_get_private_key_scheme (s_8021X)) {
+	case NM_SETTING_802_1X_CK_SCHEME_BLOB:
 		if (show_secrets)
 			key_str = bytes_to_string (nm_setting_802_1x_get_private_key_blob (s_8021X));
 		else
 			key_str = g_strdup (_("<hidden>"));
-	} else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH)
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PATH:
 		key_str = g_strdup (nm_setting_802_1x_get_private_key_path (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PKCS11:
+		key_str = g_strdup (nm_setting_802_1x_get_private_key_uri (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_UNKNOWN:
+		break;
+	}
 
 	return key_str;
 }
@@ -1164,17 +1238,24 @@ nmc_property_802_1X_get_phase2_private_key (NMSetting *setting,
                                             gboolean show_secrets)
 {
 	NMSetting8021x *s_8021X = NM_SETTING_802_1X (setting);
-	NMSetting8021xCKScheme scheme;
 	char *key_str = NULL;
 
-	scheme = nm_setting_802_1x_get_phase2_private_key_scheme (s_8021X);
-	if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) {
+	switch (nm_setting_802_1x_get_phase2_private_key_scheme (s_8021X)) {
+	case NM_SETTING_802_1X_CK_SCHEME_BLOB:
 		if (show_secrets)
 			key_str = bytes_to_string (nm_setting_802_1x_get_phase2_private_key_blob (s_8021X));
 		else
 			key_str = g_strdup (_("<hidden>"));
-	} else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH)
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PATH:
 		key_str = g_strdup (nm_setting_802_1x_get_phase2_private_key_path (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_PKCS11:
+		key_str = g_strdup (nm_setting_802_1x_get_phase2_private_key_uri (s_8021X));
+		break;
+	case NM_SETTING_802_1X_CK_SCHEME_UNKNOWN:
+		break;
+	}
 
 	return key_str;
 }
@@ -1268,6 +1349,26 @@ DEFINE_GETTER (nmc_property_connection_get_timestamp, NM_SETTING_CONNECTION_TIME
 DEFINE_GETTER (nmc_property_connection_get_read_only, NM_SETTING_CONNECTION_READ_ONLY)
 
 static char *
+nmc_property_connection_get_autoconnect_retries (NMSetting *setting, NmcPropertyGetType get_type)
+{
+	NMSettingConnection *s_con = NM_SETTING_CONNECTION (setting);
+	gint retries;
+
+	retries = nm_setting_connection_get_autoconnect_retries (s_con);
+	if (get_type == NMC_PROPERTY_GET_PARSABLE)
+		return g_strdup_printf ("%d", retries);
+
+	switch (retries) {
+	case -1:
+		return g_strdup_printf (_("%d (default)"), retries);
+	case 0:
+		return g_strdup_printf (_("%d (forever)"), retries);
+	default:
+		return g_strdup_printf ("%d", retries);
+	}
+}
+
+static char *
 nmc_property_connection_get_permissions (NMSetting *setting, NmcPropertyGetType get_type)
 {
 	NMSettingConnection *s_con = NM_SETTING_CONNECTION (setting);
@@ -1764,8 +1865,6 @@ DEFINE_GETTER (nmc_property_wimax_get_mac_address, NM_SETTING_WIMAX_MAC_ADDRESS)
 
 /* --- NM_SETTING_WIRED_SETTING_NAME property get functions --- */
 DEFINE_GETTER (nmc_property_wired_get_port, NM_SETTING_WIRED_PORT)
-DEFINE_GETTER (nmc_property_wired_get_speed, NM_SETTING_WIRED_SPEED)
-DEFINE_GETTER (nmc_property_wired_get_duplex, NM_SETTING_WIRED_DUPLEX)
 DEFINE_GETTER (nmc_property_wired_get_auto_negotiate, NM_SETTING_WIRED_AUTO_NEGOTIATE)
 DEFINE_GETTER (nmc_property_wired_get_mac_address, NM_SETTING_WIRED_MAC_ADDRESS)
 DEFINE_GETTER (nmc_property_wired_get_cloned_mac_address, NM_SETTING_WIRED_CLONED_MAC_ADDRESS)
@@ -1777,6 +1876,30 @@ DEFINE_GETTER (nmc_property_wired_get_s390_options, NM_SETTING_WIRED_S390_OPTION
 DEFINE_GETTER (nmc_property_wired_get_wake_on_lan_password, NM_SETTING_WIRED_WAKE_ON_LAN_PASSWORD)
 
 static char *
+nmc_property_wired_get_speed (NMSetting *setting, NmcPropertyGetType get_type)
+{
+	NMSettingWired *s_wired = NM_SETTING_WIRED (setting);
+	guint32 speed;
+
+	speed = nm_setting_wired_get_speed (s_wired);
+	return g_strdup_printf ("%d", speed);
+}
+
+static char *
+nmc_property_wired_get_duplex (NMSetting *setting, NmcPropertyGetType get_type)
+{
+	NMSettingWired *s_wired = NM_SETTING_WIRED (setting);
+	const char *str;
+
+	str = nm_setting_wired_get_duplex (s_wired);
+	if (!str)
+		return NULL;
+	else
+		return g_strdup (str);
+
+}
+
+static char *
 nmc_property_wired_get_mtu (NMSetting *setting, NmcPropertyGetType get_type)
 {
 	NMSettingWired *s_wired = NM_SETTING_WIRED (setting);
@@ -2015,6 +2138,94 @@ nmc_property_wifi_sec_get_wep_key_type (NMSetting *setting, NmcPropertyGetType g
 	return wep_key_type_to_string (nm_setting_wireless_security_get_wep_key_type (s_wireless_sec));
 }
 
+/* --- NM_SETTING_MACSEC_SETTING_NAME property get functions --- */
+DEFINE_GETTER (nmc_property_macsec_get_parent, NM_SETTING_MACSEC_PARENT)
+DEFINE_GETTER (nmc_property_macsec_get_encrypt, NM_SETTING_MACSEC_ENCRYPT)
+DEFINE_GETTER (nmc_property_macsec_get_mka_cak, NM_SETTING_MACSEC_MKA_CAK)
+DEFINE_SECRET_FLAGS_GETTER (nmc_property_macsec_get_mka_cak_flags, NM_SETTING_MACSEC_MKA_CAK_FLAGS)
+DEFINE_GETTER (nmc_property_macsec_get_mka_ckn, NM_SETTING_MACSEC_MKA_CKN)
+DEFINE_GETTER (nmc_property_macsec_get_port, NM_SETTING_MACSEC_PORT)
+
+/* 'mode' */
+static char *
+nmc_property_macsec_get_mode (NMSetting *setting, NmcPropertyGetType get_type)
+{
+	NMSettingMacsec *s_macsec = NM_SETTING_MACSEC (setting);
+	NMSettingMacsecMode mode;
+
+	mode = nm_setting_macsec_get_mode (s_macsec);
+	return nm_utils_enum_to_str (nm_setting_macsec_mode_get_type (), mode);
+}
+
+
+static gboolean
+nmc_property_macsec_set_mode (NMSetting *setting, const char *prop,
+                              const char *val, GError **error)
+{
+	NMSettingMacsecMode mode;
+	gs_free char *options = NULL;
+
+	if (!nm_utils_enum_from_str (nm_setting_macsec_mode_get_type (), val,
+	                             (int *) &mode, NULL)) {
+		options = g_strjoinv (",",
+		                      (char **) nm_utils_enum_get_values (nm_setting_macsec_mode_get_type (),
+		                                                          G_MININT,
+		                                                          G_MAXINT));
+		g_set_error (error, 1, 0, _("invalid option '%s', use one of [%s]"),
+		             val, options);
+			return FALSE;
+	}
+
+	g_object_set (setting, prop, mode, NULL);
+	return TRUE;
+}
+
+/* 'mode' */
+static char *
+nmc_property_macsec_get_validation (NMSetting *setting, NmcPropertyGetType get_type)
+{
+	NMSettingMacsec *s_macsec = NM_SETTING_MACSEC (setting);
+	NMSettingMacsecValidation validation;
+
+	validation = nm_setting_macsec_get_validation (s_macsec);
+	return nm_utils_enum_to_str (nm_setting_macsec_validation_get_type (), validation);
+}
+
+
+static gboolean
+nmc_property_macsec_set_validation (NMSetting *setting, const char *prop,
+                                    const char *val, GError **error)
+{
+	NMSettingMacsecMode validation;
+	gs_free char *options = NULL;
+
+	if (!nm_utils_enum_from_str (nm_setting_macsec_validation_get_type (), val,
+	                             (int *) &validation, NULL)) {
+		options = g_strjoinv (",",
+		                      (char **) nm_utils_enum_get_values (nm_setting_macsec_validation_get_type (),
+		                                                          G_MININT,
+		                                                          G_MAXINT));
+		g_set_error (error, 1, 0, _("invalid option '%s', use one of [%s]"),
+		             val, options);
+			return FALSE;
+	}
+
+	g_object_set (setting, prop, validation, NULL);
+	return TRUE;
+}
+
+static const char **
+nmc_property_macsec_allowed_validation (NMSetting *setting, const char *prop)
+{
+	static const char **words = NULL;
+
+	if (!words)
+		words = nm_utils_enum_get_values (nm_setting_macsec_validation_get_type(),
+		                                  G_MININT,
+		                                  G_MAXINT);
+	return words;
+}
+
 /* --- NM_SETTING_MACVLAN_SETTING_NAME property get functions --- */
 DEFINE_GETTER (nmc_property_macvlan_get_parent, NM_SETTING_MACVLAN_PARENT)
 DEFINE_GETTER (nmc_property_macvlan_get_promiscuous, NM_SETTING_MACVLAN_PROMISCUOUS)
@@ -2100,6 +2311,77 @@ DEFINE_GETTER (nmc_property_vxlan_get_rsc, NM_SETTING_VXLAN_RSC)
 DEFINE_GETTER (nmc_property_vxlan_get_l2_miss, NM_SETTING_VXLAN_L2_MISS)
 DEFINE_GETTER (nmc_property_vxlan_get_l3_miss, NM_SETTING_VXLAN_L3_MISS)
 
+/* --- NM_SETTING_PROXY_SETTING_NAME property get functions --- */
+DEFINE_GETTER (nmc_property_proxy_get_browser_only, NM_SETTING_PROXY_BROWSER_ONLY)
+DEFINE_GETTER (nmc_property_proxy_get_pac_url, NM_SETTING_PROXY_PAC_URL)
+DEFINE_GETTER (nmc_property_proxy_get_pac_script, NM_SETTING_PROXY_PAC_SCRIPT)
+
+static char *
+nmc_property_proxy_get_method (NMSetting *setting, NmcPropertyGetType get_type)
+{
+	NMSettingProxy *s_proxy = NM_SETTING_PROXY (setting);
+	NMSettingProxyMethod method;
+
+	method = nm_setting_proxy_get_method (s_proxy);
+	return nm_utils_enum_to_str (nm_setting_proxy_method_get_type (), method);
+}
+
+static gboolean
+nmc_property_proxy_set_method (NMSetting *setting, const char *prop,
+                               const char *val, GError **error)
+{
+	int method;
+	gboolean ret;
+
+	ret = nm_utils_enum_from_str (nm_setting_proxy_method_get_type(), val,
+	                              &method, NULL);
+
+	if (!ret) {
+		gs_free const char **values = NULL;
+		gs_free char *values_str = NULL;
+
+		values = nm_utils_enum_get_values (nm_setting_proxy_method_get_type (),
+		                                   NM_SETTING_PROXY_METHOD_NONE,
+		                                   G_MAXINT);
+		values_str = g_strjoinv (",", (char **) values);
+		g_set_error (error, 1, 0, _("invalid method '%s', use one of %s"),
+		             val, values_str);
+
+		return FALSE;
+	}
+
+	g_object_set (setting, prop, method, NULL);
+	return TRUE;
+}
+
+static const char **
+nmc_property_proxy_allowed_method (NMSetting *setting, const char *prop)
+{
+	static const char **words = NULL;
+
+	if (!words)
+		words = nm_utils_enum_get_values (nm_setting_proxy_method_get_type(),
+		                                  NM_SETTING_PROXY_METHOD_NONE,
+		                                  G_MAXINT);
+	return words;
+}
+
+static gboolean
+nmc_property_proxy_set_pac_script (NMSetting *setting, const char *prop,
+                                   const char *val, GError **error)
+{
+	char *script = NULL;
+
+	g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+	if (!nmc_proxy_check_script (val, &script, error)) {
+		return FALSE;
+	}
+	g_object_set (setting, prop, script, NULL);
+	g_free (script);
+	return TRUE;
+}
+
 /*----------------------------------------------------------------------------*/
 
 static void
@@ -2311,6 +2593,21 @@ ipv6_method_changed_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
 }
 
 static void
+proxy_method_changed_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
+{
+	NMSettingProxyMethod method;
+
+	method = nm_setting_proxy_get_method (NM_SETTING_PROXY (object));
+
+	if (method == NM_SETTING_PROXY_METHOD_NONE) {
+		g_object_set (object,
+		              NM_SETTING_PROXY_PAC_URL, NULL,
+		              NM_SETTING_PROXY_PAC_SCRIPT, NULL,
+		              NULL);
+	}
+}
+
+static void
 wireless_band_channel_changed_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
 {
 	const char *value = NULL, *mode;
@@ -2388,6 +2685,15 @@ nmc_setting_ip6_connect_handlers (NMSettingIPConfig *setting)
 }
 
 void
+nmc_setting_proxy_connect_handlers (NMSettingProxy *setting)
+{
+	g_return_if_fail (NM_IS_SETTING_PROXY (setting));
+
+	g_signal_connect (setting, "notify::" NM_SETTING_PROXY_METHOD,
+	                  G_CALLBACK (proxy_method_changed_cb), NULL);
+}
+
+void
 nmc_setting_wireless_connect_handlers (NMSettingWireless *setting)
 {
 	g_return_if_fail (NM_IS_SETTING_WIRELESS (setting));
@@ -2460,6 +2766,10 @@ nmc_setting_custom_init (NMSetting *setting)
 		g_object_set (NM_SETTING_IP_CONFIG (setting),
 		              NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO,
 		              NULL);
+	} else if (NM_IS_SETTING_PROXY (setting)) {
+		g_object_set (NM_SETTING_PROXY (setting),
+		              NM_SETTING_PROXY_METHOD, (int) NM_SETTING_PROXY_METHOD_NONE,
+		              NULL);
 	} else if (NM_IS_SETTING_TUN (setting)) {
 		g_object_set (NM_SETTING_TUN (setting),
 		              NM_SETTING_TUN_MODE, NM_SETTING_TUN_MODE_TUN,
@@ -2935,10 +3245,8 @@ nmc_property_set_ifname (NMSetting *setting, const char *prop, const char *val,
 {
 	g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
-	if (!nm_utils_iface_valid_name (val)) {
-		g_set_error (error, 1, 0, _("'%s' is not a valid interface name"), val);
+	if (!nm_utils_is_valid_iface_name (val, error))
 		return FALSE;
-	}
 	g_object_set (setting, prop, val, NULL);
 	return TRUE;
 }
@@ -3200,7 +3508,7 @@ nmc_property_con_set_master (NMSetting *setting, const char *prop, const char *v
 		;
 	else if (!*val)
 		val = NULL;
-	else if (   !nm_utils_iface_valid_name (val)
+	else if (   !nm_utils_is_valid_iface_name (val, NULL)
 	         && !nm_utils_is_uuid (val)) {
 		g_set_error (error, 1, 0,
 		             _("'%s' is not valid master; use ifname or connection UUID"),
@@ -3232,19 +3540,21 @@ DEFINE_ALLOWED_VAL_FUNC (nmc_property_con_allowed_slave_type, con_valid_slave_ty
 static gboolean
 nmc_property_connection_set_secondaries (NMSetting *setting, const char *prop, const char *val, GError **error)
 {
+	const GPtrArray *connections;
 	NMConnection *con;
 	char **strv = NULL, **iter;
 	guint i = 0;
 
 	g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
+	connections = nm_client_get_connections (nm_cli.client);
 	strv = nmc_strsplit_set (val, " \t,", 0);
 	for (iter = strv; iter && *iter; iter++) {
 		if (**iter == '\0')
 			continue;
 
 		if (nm_utils_is_uuid (*iter)) {
-			con = nmc_find_connection (nm_cli.connections, "uuid", *iter, NULL, FALSE);
+			con = nmc_find_connection (connections, "uuid", *iter, NULL, FALSE);
 			if (!con)
 				g_print (_("Warning: %s is not an UUID of any existing connection profile\n"), *iter);
 			else {
@@ -3256,7 +3566,7 @@ nmc_property_connection_set_secondaries (NMSetting *setting, const char *prop, c
 				}
 			}
 		} else {
-			con = nmc_find_connection (nm_cli.connections, "id", *iter, NULL, FALSE);
+			con = nmc_find_connection (connections, "id", *iter, NULL, FALSE);
 			if (!con) {
 				g_set_error (error, 1, 0, _("'%s' is not a name of any exiting profile"), *iter);
 				g_strfreev (strv);
@@ -3385,6 +3695,10 @@ nmc_property_connection_describe_metered (NMSetting *setting, const char *prop)
 	         "'unknown' to let NetworkManager choose a value using some heuristics\n");
 }
 
+
+static const char *metered_valid_values[] = { "yes", "no", "unknown", NULL };
+DEFINE_ALLOWED_VAL_FUNC (nmc_property_connection_allowed_metered, metered_valid_values)
+
 /* 'lldp' */
 static char *
 nmc_property_connection_get_lldp (NMSetting *setting, NmcPropertyGetType get_type)
@@ -3435,6 +3749,9 @@ nmc_property_connection_set_lldp (NMSetting *setting, const char *prop,
 	return TRUE;
 }
 
+static const char *lldp_valid_values[] = { "default", "disable", "enable-rx", NULL };
+DEFINE_ALLOWED_VAL_FUNC (nmc_property_connection_allowed_lldp, lldp_valid_values)
+
 /* --- NM_SETTING_802_1X_SETTING_NAME property setter functions --- */
 #define DEFINE_SETTER_STR_LIST(def_func, set_func) \
 	static gboolean \
@@ -3458,16 +3775,15 @@ nmc_property_connection_set_lldp (NMSetting *setting, const char *prop,
 	{ \
 		char *val_strip = g_strstrip (g_strdup (val)); \
 		char *p = val_strip; \
+		NMSetting8021xCKScheme scheme = NM_SETTING_802_1X_CK_SCHEME_PATH; \
 		gboolean success; \
 		\
-		if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH)) == 0) \
+		if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PKCS11, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PKCS11)) == 0) \
+			scheme = NM_SETTING_802_1X_CK_SCHEME_PKCS11; \
+		else if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH)) == 0) \
 			p += NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH); \
 		\
-		success = set_func (NM_SETTING_802_1X (setting), \
-		                    p, \
-		                    NM_SETTING_802_1X_CK_SCHEME_PATH, \
-		                    NULL, \
-		                    error); \
+		success = set_func (NM_SETTING_802_1X (setting), p, scheme, NULL, error); \
 		g_free (val_strip); \
 		return success; \
 	}
@@ -3480,9 +3796,12 @@ nmc_property_connection_set_lldp (NMSetting *setting, const char *prop,
 		char *val_strip = g_strstrip (g_strdup (val)); \
 		char *p = val_strip; \
 		const char *path, *password; \
+		NMSetting8021xCKScheme scheme = NM_SETTING_802_1X_CK_SCHEME_PATH; \
 		gboolean success; \
 		\
-		if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH)) == 0) \
+		if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PKCS11, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PKCS11)) == 0) \
+			scheme = NM_SETTING_802_1X_CK_SCHEME_PKCS11; \
+		else if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH)) == 0) \
 			p += NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH); \
 		\
 		strv = nmc_strsplit_set (p, " \t,", 2); \
@@ -3491,19 +3810,7 @@ nmc_property_connection_set_lldp (NMSetting *setting, const char *prop,
 			password = strv[1]; \
 		else \
 			password = pwd_func (NM_SETTING_802_1X (setting)); \
-		if (password) { \
-			char *tmp_pwd = g_strdup (password); \
-			success = set_func (NM_SETTING_802_1X (setting), \
-			                    path, \
-			                    tmp_pwd, \
-			                    NM_SETTING_802_1X_CK_SCHEME_PATH, \
-			                    NULL, \
-			                    error); \
-			g_free (tmp_pwd); \
-		} else { \
-			success = FALSE; \
-			g_set_error_literal  (error, 1, 0, _("private key password not provided")); \
-		} \
+		success = set_func (NM_SETTING_802_1X (setting), path, password, scheme, NULL, error); \
 		g_free (val_strip); \
 		g_strfreev (strv); \
 		return success; \
@@ -4871,10 +5178,10 @@ DEFINE_REMOVER_OPTION (nmc_property_vpn_remove_option_secret,
 
 /* --- NM_SETTING_WIRED_SETTING_NAME property setter functions --- */
 #if 0
-/*
- * Do not allow setting 'port' and 'duplex' for now. They are not implemented in
- * NM core, nor in ifcfg-rh plugin. Enable this when it gets done.
- */
+-/*
+- * Do not allow setting 'port' for now. It is not implemented in
+- * NM core, nor in ifcfg-rh plugin. Enable this when it gets done.
+- */
 /* 'port' */
 static const char *wired_valid_ports[] = { "tp", "aui", "bnc", "mii", NULL };
 
@@ -4885,6 +5192,7 @@ nmc_property_wired_set_port (NMSetting *setting, const char *prop, const char *v
 }
 
 DEFINE_ALLOWED_VAL_FUNC (nmc_property_wired_allowed_port, wired_valid_ports)
+#endif
 
 /* 'duplex' */
 static const char *wired_valid_duplexes[] = { "half", "full", NULL };
@@ -4896,7 +5204,7 @@ nmc_property_wired_set_duplex (NMSetting *setting, const char *prop, const char
 }
 
 DEFINE_ALLOWED_VAL_FUNC (nmc_property_wired_allowed_duplex, wired_valid_duplexes)
-#endif
+
 
 /* 'mac-address-blacklist' */
 DEFINE_SETTER_MAC_BLACKLIST (nmc_property_wired_set_mac_address_blacklist,
@@ -6270,6 +6578,13 @@ nmc_properties_init (void)
 	                    NULL,
 	                    NULL,
 	                    NULL);
+	nmc_add_prop_funcs (GLUE (CONNECTION, AUTOCONNECT_RETRIES),
+	                    nmc_property_connection_get_autoconnect_retries,
+	                    nmc_property_set_int,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
 	nmc_add_prop_funcs (GLUE (CONNECTION, TIMESTAMP),
 	                    nmc_property_connection_get_timestamp,
 	                    NULL, /* read-only */
@@ -6338,14 +6653,14 @@ nmc_properties_init (void)
 	                    nmc_property_connection_set_metered,
 	                    NULL,
 	                    nmc_property_connection_describe_metered,
-	                    NULL,
+	                    nmc_property_connection_allowed_metered,
 	                    NULL);
 	nmc_add_prop_funcs (GLUE (CONNECTION, LLDP),
 	                    nmc_property_connection_get_lldp,
 	                    nmc_property_connection_set_lldp,
 	                    NULL,
 	                    NULL,
-	                    NULL,
+	                    nmc_property_connection_allowed_lldp,
 	                    NULL);
 
 	/* Add editable properties for NM_SETTING_DCB_SETTING_NAME */
@@ -7178,28 +7493,28 @@ nmc_properties_init (void)
 	/* Add editable properties for NM_SETTING_WIRED_SETTING_NAME */
 	nmc_add_prop_funcs (GLUE (WIRED, PORT),
 	                    nmc_property_wired_get_port,
-	                    NULL, /*nmc_property_wired_set_port,*/
+	                    NULL, /* nmc_property_wired_set_port, */
 	                    NULL,
 	                    NULL,
-	                    NULL, /*nmc_property_wired_allowed_port,*/
+	                    NULL, /* nmc_property_wired_allowed_port, */
 	                    NULL);
 	nmc_add_prop_funcs (GLUE (WIRED, SPEED),
 	                    nmc_property_wired_get_speed,
-	                    NULL,
+	                    nmc_property_set_uint,
 	                    NULL,
 	                    NULL,
 	                    NULL,
 	                    NULL);
 	nmc_add_prop_funcs (GLUE (WIRED, DUPLEX),
 	                    nmc_property_wired_get_duplex,
-	                    NULL, /*nmc_property_wired_set_duplex,*/
-	                    NULL,
+	                    nmc_property_wired_set_duplex,
 	                    NULL,
 	                    NULL,
-	                    NULL); /*nmc_property_wired_allowed_duplex);*/
+	                    nmc_property_wired_allowed_duplex,
+	                    NULL);
 	nmc_add_prop_funcs (GLUE (WIRED, AUTO_NEGOTIATE),
 	                    nmc_property_wired_get_auto_negotiate,
-	                    NULL,
+	                    nmc_property_set_bool,
 	                    NULL,
 	                    NULL,
 	                    NULL,
@@ -7644,6 +7959,64 @@ nmc_properties_init (void)
 	                    NULL,
 	                    NULL);
 
+	/* Add editable properties for NM_SETTING_MACSEC_SETTING_NAME */
+	nmc_add_prop_funcs (GLUE (MACSEC, PARENT),
+	                    nmc_property_macsec_get_parent,
+	                    nmc_property_set_string,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (MACSEC, MODE),
+	                    nmc_property_macsec_get_mode,
+	                    nmc_property_macsec_set_mode,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (MACSEC, ENCRYPT),
+	                    nmc_property_macsec_get_encrypt,
+	                    nmc_property_set_bool,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (MACSEC, MKA_CAK),
+	                    nmc_property_macsec_get_mka_cak,
+	                    nmc_property_set_string,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (MACSEC, MKA_CAK_FLAGS),
+	                    nmc_property_macsec_get_mka_cak_flags,
+	                    nmc_property_set_secret_flags,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (MACSEC, MKA_CKN),
+	                    nmc_property_macsec_get_mka_ckn,
+	                    nmc_property_set_string,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (MACSEC, PORT),
+	                    nmc_property_macsec_get_port,
+	                    nmc_property_set_int,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (MACSEC, VALIDATION),
+	                    nmc_property_macsec_get_validation,
+	                    nmc_property_macsec_set_validation,
+	                    NULL,
+	                    NULL,
+	                    nmc_property_macsec_allowed_validation,
+	                    NULL);
+
 	/* Add editable properties for NM_SETTING_MACVLAN_SETTING_NAME */
 	nmc_add_prop_funcs (GLUE (MACVLAN, PARENT),
 	                    nmc_property_macvlan_get_parent,
@@ -7787,6 +8160,36 @@ nmc_properties_init (void)
 	                    NULL,
 	                    NULL,
 	                    NULL);
+
+	/* Add editable properties for NM_SETTING_PROXY_SETTING_NAME */
+	nmc_add_prop_funcs (GLUE (PROXY, METHOD),
+	                    nmc_property_proxy_get_method,
+	                    nmc_property_proxy_set_method,
+	                    NULL,
+	                    NULL,
+	                    nmc_property_proxy_allowed_method,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (PROXY, BROWSER_ONLY),
+	                    nmc_property_proxy_get_browser_only,
+	                    nmc_property_set_bool,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (PROXY, PAC_URL),
+	                    nmc_property_proxy_get_pac_url,
+	                    nmc_property_set_string,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
+	nmc_add_prop_funcs (GLUE (PROXY, PAC_SCRIPT),
+	                    nmc_property_proxy_get_pac_script,
+	                    nmc_property_proxy_set_pac_script,
+	                    NULL,
+	                    NULL,
+	                    NULL,
+	                    NULL);
 }
 
 void
@@ -7998,11 +8401,7 @@ nmc_setting_get_property_allowed_values (NMSetting *setting, const char *prop)
 	return NULL;
 }
 
-#if defined (BUILD_SETTING_DOCS) || defined (HAVE_SETTING_DOCS)
 #include "settings-docs.c"
-#else
-#define nmc_setting_get_property_doc(setting, prop) _("(not available)")
-#endif
 
 /*
  * Create a description string for a property.
@@ -8107,17 +8506,18 @@ setting_connection_details (NMSetting *setting, NmCli *nmc,  const char *one_pro
 	set_val_str (arr, 5, nmc_property_connection_get_type (setting, NMC_PROPERTY_GET_PRETTY));
 	set_val_str (arr, 6, nmc_property_connection_get_autoconnect (setting, NMC_PROPERTY_GET_PRETTY));
 	set_val_str (arr, 7, nmc_property_connection_get_autoconnect_priority (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 8, nmc_property_connection_get_timestamp (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 9, nmc_property_connection_get_read_only (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 10, nmc_property_connection_get_permissions (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 11, nmc_property_connection_get_zone (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 12, nmc_property_connection_get_master (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 13, nmc_property_connection_get_slave_type (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 14, nmc_property_connection_get_autoconnect_slaves (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 15, nmc_property_connection_get_secondaries (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 16, nmc_property_connection_get_gateway_ping_timeout (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 17, nmc_property_connection_get_metered (setting, NMC_PROPERTY_GET_PRETTY));
-	set_val_str (arr, 18, nmc_property_connection_get_lldp (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 8, nmc_property_connection_get_autoconnect_retries (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 9, nmc_property_connection_get_timestamp (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 10, nmc_property_connection_get_read_only (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 11, nmc_property_connection_get_permissions (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 12, nmc_property_connection_get_zone (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 13, nmc_property_connection_get_master (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 14, nmc_property_connection_get_slave_type (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 15, nmc_property_connection_get_autoconnect_slaves (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 16, nmc_property_connection_get_secondaries (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 17, nmc_property_connection_get_gateway_ping_timeout (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 18, nmc_property_connection_get_metered (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 19, nmc_property_connection_get_lldp (setting, NMC_PROPERTY_GET_PRETTY));
 	g_ptr_array_add (nmc->output_data, arr);
 
 	print_data (nmc);  /* Print all data */
@@ -9014,6 +9414,39 @@ setting_ip_tunnel_details (NMSetting *setting, NmCli *nmc,  const char *one_prop
 }
 
 static gboolean
+setting_macsec_details (NMSetting *setting, NmCli *nmc,  const char *one_prop, gboolean secrets)
+{
+	NMSettingMacsec *s_macsec = NM_SETTING_MACSEC (setting);
+	NmcOutputField *tmpl, *arr;
+	size_t tmpl_len;
+
+	g_return_val_if_fail (NM_IS_SETTING_MACSEC (s_macsec), FALSE);
+
+	tmpl = nmc_fields_setting_macsec;
+	tmpl_len = sizeof (nmc_fields_setting_macsec);
+	nmc->print_fields.indices = parse_output_fields (one_prop ? one_prop : NMC_FIELDS_SETTING_MACSEC_ALL,
+	                                                 tmpl, FALSE, NULL, NULL);
+	arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_FIELD_NAMES);
+	g_ptr_array_add (nmc->output_data, arr);
+
+	arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_SECTION_PREFIX);
+	set_val_str (arr, 0, g_strdup (nm_setting_get_name (setting)));
+	set_val_str (arr, 1, nmc_property_macsec_get_parent (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 2, nmc_property_macsec_get_mode (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 3, nmc_property_macsec_get_encrypt (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 4, GET_SECRET (secrets, setting, nmc_property_macsec_get_mka_cak));
+	set_val_str (arr, 5, nmc_property_macsec_get_mka_cak_flags (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 6, nmc_property_macsec_get_mka_ckn (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 7, nmc_property_macsec_get_port (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 8, nmc_property_macsec_get_validation (setting, NMC_PROPERTY_GET_PRETTY));
+	g_ptr_array_add (nmc->output_data, arr);
+
+	print_data (nmc);  /* Print all data */
+
+	return TRUE;
+}
+
+static gboolean
 setting_macvlan_details (NMSetting *setting, NmCli *nmc,  const char *one_prop, gboolean secrets)
 {
 	NMSettingMacvlan *s_macvlan = NM_SETTING_MACVLAN (setting);
@@ -9042,7 +9475,7 @@ setting_macvlan_details (NMSetting *setting, NmCli *nmc,  const char *one_prop,
 	return TRUE;
 }
 
- static gboolean
+static gboolean
 setting_vxlan_details (NMSetting *setting, NmCli *nmc,  const char *one_prop, gboolean secrets)
 {
 	NMSettingVxlan *s_vxlan = NM_SETTING_VXLAN (setting);
@@ -9083,6 +9516,35 @@ setting_vxlan_details (NMSetting *setting, NmCli *nmc,  const char *one_prop, gb
 	return TRUE;
 }
 
+static gboolean
+setting_proxy_details (NMSetting *setting, NmCli *nmc,  const char *one_prop, gboolean secrets)
+{
+	NMSettingProxy *s_proxy = NM_SETTING_PROXY (setting);
+	NmcOutputField *tmpl, *arr;
+	size_t tmpl_len;
+
+	g_return_val_if_fail (NM_IS_SETTING_PROXY (s_proxy), FALSE);
+
+	tmpl = nmc_fields_setting_proxy;
+	tmpl_len = sizeof (nmc_fields_setting_proxy);
+	nmc->print_fields.indices = parse_output_fields (one_prop ? one_prop : NMC_FIELDS_SETTING_PROXY_ALL,
+	                                                 tmpl, FALSE, NULL, NULL);
+	arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_FIELD_NAMES);
+	g_ptr_array_add (nmc->output_data, arr);
+
+	arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_SECTION_PREFIX);
+	set_val_str (arr, 0, g_strdup (nm_setting_get_name (setting)));
+	set_val_str (arr, 1, nmc_property_proxy_get_method (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 2, nmc_property_proxy_get_browser_only (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 3, nmc_property_proxy_get_pac_url (setting, NMC_PROPERTY_GET_PRETTY));
+	set_val_str (arr, 4, nmc_property_proxy_get_pac_script (setting, NMC_PROPERTY_GET_PRETTY));
+	g_ptr_array_add (nmc->output_data, arr);
+
+	print_data (nmc);  /* Print all data */
+
+	return TRUE;
+}
+
 typedef struct {
 	const char *sname;
 	gboolean (*func) (NMSetting *setting, NmCli *nmc,  const char *one_prop, gboolean secrets);
@@ -9116,8 +9578,10 @@ static const SettingDetails detail_printers[] = {
 	{ NM_SETTING_DCB_SETTING_NAME,               setting_dcb_details },
 	{ NM_SETTING_TUN_SETTING_NAME,               setting_tun_details },
 	{ NM_SETTING_IP_TUNNEL_SETTING_NAME,         setting_ip_tunnel_details },
+	{ NM_SETTING_MACSEC_SETTING_NAME,            setting_macsec_details },
 	{ NM_SETTING_MACVLAN_SETTING_NAME,           setting_macvlan_details },
 	{ NM_SETTING_VXLAN_SETTING_NAME,             setting_vxlan_details },
+	{ NM_SETTING_PROXY_SETTING_NAME,             setting_proxy_details },
 	{ NULL },
 };
 
diff --git a/clients/cli/settings.h b/clients/cli/settings.h
index 33900510..ad503f9e 100644
--- a/clients/cli/settings.h
+++ b/clients/cli/settings.h
@@ -32,6 +32,7 @@ NMSetting *nmc_setting_new_for_name (const char *name);
 void nmc_setting_custom_init (NMSetting *setting);
 void nmc_setting_ip4_connect_handlers (NMSettingIPConfig *setting);
 void nmc_setting_ip6_connect_handlers (NMSettingIPConfig *setting);
+void nmc_setting_proxy_connect_handlers (NMSettingProxy *setting);
 void nmc_setting_wireless_connect_handlers (NMSettingWireless *setting);
 void nmc_setting_connection_connect_handlers (NMSettingConnection *setting, NMConnection *connection);
 
@@ -91,6 +92,8 @@ extern NmcOutputField nmc_fields_setting_dcb[];
 extern NmcOutputField nmc_fields_setting_tun[];
 extern NmcOutputField nmc_fields_setting_ip_tunnel[];
 extern NmcOutputField nmc_fields_setting_macvlan[];
+extern NmcOutputField nmc_fields_setting_macsec[];
 extern NmcOutputField nmc_fields_setting_vxlan[];
+extern NmcOutputField nmc_fields_setting_proxy[];
 
 #endif /* NMC_SETTINGS_H */