Hello community,

here is the log from the commit of package NetworkManager for openSUSE:Factory 
checked in at 2016-09-21 18:45:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/NetworkManager (Old)
 and      /work/SRC/openSUSE:Factory/.NetworkManager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "NetworkManager"

Changes:
--------
--- /work/SRC/openSUSE:Factory/NetworkManager/NetworkManager.changes    
2016-08-31 00:03:29.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.NetworkManager.new/NetworkManager.changes       
2016-09-21 18:45:17.000000000 +0200
@@ -1,0 +2,236 @@
+Sun Sep 18 08:12:16 UTC 2016 - zai...@opensuse.org
+
+- Add even more commits to really fix bgo#770456 to
+  NetworkManager-fix-broadcom-wifi.patch.
+
+-------------------------------------------------------------------
+Tue Aug 30 20:51:54 UTC 2016 - zai...@opensuse.org
+
+- Add NetworkManager-fix-broadcom-wifi.patch: Broadcom driver does
+  not support the random mac addr introduced. This patch works
+  around the problem (bgo#770456).
+- Conditionally apply translations-update-upstream BuildRequires
+  and macro for non-openSUSE only.
+
+-------------------------------------------------------------------
+Sun Aug 28 16:18:59 UTC 2016 - dims...@opensuse.org
+
+- Update to version 1.4.0:
+  + The MAC address assigned to a device can now be set according
+    to different policies: preserve, permanent, random, stable.
+  + NetworkManager now waits for IPv6 DAD to terminate before
+    completing the activation.
+  + Added support for setting IPv6 tokenized interface identifiers
+    through the 'ipv6.token' connection property.
+  + Added a 'Reload' D-Bus method to reload configuration and
+    reapply DNS configuration.
+  + Added ability to create a configuration checkpoints and rolling
+    back changes after a timeout.
+  + NetworkManager now follows symlinks when accessing resolv.conf
+    and rc-manager is set to 'file'.
+  + Added support for oFono as modem manager.
+  + The devices now exposes counters of transferred data.
+  + The 'may-fail' property of ipv4 and ipv6 settings is now
+    respected more accurately.
+  + The timeout for requests of secrets to agents has been
+    increased from 25 to 120 seconds.
+  + Name servers passed to dnsmasq now specify an egress interface
+    to avoid problems with multiple active connections.
+  + Reverse DNS entries for IPv6 are now added to dnsmasq, and IPv4
+    reverse entries now honor the network prefix.
+  + A new 'dns-priority' property of ipv4 and ipv6 settings can be
+    used to tweak the order of servers in resolv.conf when multiple
+    connections are active.
+  + configure script accepts --enable-{address,undefined}-sanitizer
+    options to build NetworkManager with GCC sanitizers.
+  + The default resolv.conf manager can now be specified at build
+    time using the --with-config-dns-rc-manager-default configure
+    option.
+  + NetworkManager is now compiled with --gc-sections to reduce
+    executable size.
+  + Added a new 'VPN_PLUGIN' logging domain.
+  + It is now possible to change the configuration currently
+    applied on a device with 'nmcli device modify' and 'nmcli
+    device reapply'.
+  + nmcli invoked without parameters shows an overview of the
+    current network configuration.
+  + The 'nmcli connection add' syntax has been extended and is now
+    possible to pass properties (e.g. 'ipv4.dns') along with
+    aliases.
+  + nmtui now returns to initial menu after a sub-form exits.
+  + Improved bash autocompletion for nmcli.
+  + Now devices are disconnected before the system suspends,
+    executing dispatcher scripts. This allows external applications
+    to be notified of the change in connectivity.
+  + Dispatcher scripts are now called also when connectivity status
+    changes.
+  + Many other fixes and improvements.
+- Pass --with-config-dns-rc-manager-default=netconfig to configure:
+  ensure to use netconfig, which is SUSE's default.
+- Replace pgkconfig(systemd) BuildRequires with
+  pkgconfig(libsystemd), following upstream.
+- Rebase systemd-network-config.patch.
+
+-------------------------------------------------------------------
+Tue Jul 19 09:29:37 UTC 2016 - zai...@opensuse.org
+
+- Update to version 1.2.2:
+  + The dnsmasq DNS management mode now uses D-Bus API of dnsmasq
+    to make signal nameserver changes.
+  + Hostname is now correctly read on Slackware.
+  + IPv6 addresses for default wired connections now stay stable.
+  + Reading portname on s390 systems on 4.4 kernels and newer has
+    been corrected.
+  + nmcli no longer warns about version mismatches.
+  + Improved developer documentations.
+  + Multiple minor bugfixes.
+  + Updated translations.
+
+-------------------------------------------------------------------
+Tue Jul 19 09:29:36 UTC 2016 - dims...@opensuse.org
+
+- Update to version 1.2.0:
+  + Bugs fixed: bgo#764750, bgo#764955, bgo#764956, bgo#765225,
+    rh#1325752.
+- Changes from version 1.1.94 (1.2-rc2):
+  + Bugs fixed: bgo#764839, bgo#764690, rh#1324895.
+- Add post/postun scritlets for libnm0.
+
+-------------------------------------------------------------------
+Tue Jul 19 09:29:35 UTC 2016 - dims...@opensuse.org
+
+- Update to version 1.1.93 (1.2-rc1):
+  + Bugs fixed: bgo#761389, bgo#763236, bgo#764317, bgo#764332,
+    bgo#764398, bgo#764402, bgo#764483, bgo#764606, rh#1299103.
+  + Updated translations.
+- Changes from version 1.1.92:
+  + Added an option to enable the old-fashioned /etc/resolv.conf
+    handling (using a symlink).
+  + NetworkManager now checks the connection data from client for
+    validity and gracefully handles unknown properties in client.
+    This improves interoperability between the server and clients
+    of different versions.
+  + The activation of a VLAN device with a virtual parent that is
+    inactive now results in a parent being activated first.
+  + The server name used with 802.1x authentication can now be
+    constrained to a particular domain suffix (CVE-2006-7246).
+- Drop (presumably) no longer needed patches:
+  + nm-don-t-consider-not-needed-secrets-for-has_system_secr.diff
+  + nm-treat-not-saved-secrets-just-like-agent-owned-when-cl.diff
+
+-------------------------------------------------------------------
+Tue Jul 19 09:29:34 UTC 2016 - dims...@opensuse.org
+
+- Update to version 1.1.91:
+  + Added support for detecting duplicate IPv4 addresses, with a
+    timeout configurable through the ipv4.dad-timeout connection
+    property.
+  + Fixed a race condition that could potentially lead to
+    unauthorized access to connection secrets (CVE-2016-0764).
+  + dnsmasq configuration for shared connections can now be
+    extended by placing custom files in
+    /etc/NetworkManager/dnsmasq-shared.d/.
+  + Generic devices are no longer assumed unless explicitly
+    requested by user.
+  + The reorder-header VLAN flag setting is now honored; to keep
+    backwards compatibility in behavior, an existing REORDER_HDR=0
+    ifcfg-rh key is ignored; the flag must be disabled with
+    VLAN_FLAGS=NO_REORDER_HDR.
+  + Fair amount of bugs was fixed and robustness was generally
+    improved.
+- Rebase systemd-network-config.patch.
+
+-------------------------------------------------------------------
+Tue Jul 19 09:29:33 UTC 2016 - dims...@opensuse.org
+
+- Update to version 1.1.90:
+  + Added an option to enable use of random MAC addresses for Wi-Fi
+    access point scanning (defaults to disabled).  Controlled with
+    'wifi.mac-address-randomization' property
+    (MAC_ADDRESS_RANDOMIZATION key in ifcfg files).
+  + Wi-Fi scanning now utilizes wpa_supplicant's AP list.
+  + Added support for Wi-Fi powersave, configured with POWERSAVE
+    key in ifcfg files.
+  + Added support for creation of more types of software devices:
+    tun & tap, maxvlan, vxlan and ip tunnels (ipip, gre, sit,
+    isatap, vti, ip6ip6, ipip6, ip6gre and vti6).
+  + The software devices (bond, bridge, vlan, team, ...) can now be
+    stacked arbitrarily. The nmcli interface for creating
+    master-slave relationships has been significantly improved by
+    the use of 'master' argument to all link types.
+  + RFC7217 stable privacy addressing is now used by default to
+    protect from address-based host tracking. The IPv6 addressing
+    mode is configured with IPV6_ADDR_GEN_MODE key in ifcfg files.
+  + Improved route management code to avoid clashes between
+    conflicting routes in multiple connections.
+  + Refactored platform code resulting in more robust interface to
+    platform, less overhead and reduced memory footprint.
+  + Improved interoperability with other network management tools.
+    The externally created software devices are not managed until
+    they're activated.
+  + The Device instances now exist for all software connections and
+    the platform devices are now only created when the device is
+    activated. This makes it possible for connections with device
+    of same name not to clash unless they're activated
+    concurrently. The links are now not unnecessarily present
+    unless the connection is active, avoiding pollution of the link
+    name space.
+  + NetworkManager now correctly manages connectivity in
+    namespace-based containers such as LXC and Docker.
+  + Support for configuring ethernet Wake-On-Lan has been added.
+  + Added LLDP listener functionality and related CLI client
+    commands. Enabled via LLDP option in ifcfg files.
+  + CLI secret agent has been extended with support for VPN
+    secrets.
+  + The command line client now utilizes colors for its output.
+  + The command line client now sorts the devices and properties
+    for better clarity.
+  + Numerous impovement to Bash command completion for nmcli.
+  + NetworkManager relies on less external libraries. The use of
+    dbus-glib has been replaced with gio's native D-Bus support and
+    libnl-route is no longer used.
+  + Dependency on avahi-autoipd has been dropped. Native IPv4
+    link-local addressing configuration based on systemd network
+    library is now used instead.
+  + Hostname is now managed via systemd-hostnamed on systemd-based
+    systems.
+  + Management of resolv.conf management can be changed at runtime,
++++ 42 more lines (skipped)
++++ between /work/SRC/openSUSE:Factory/NetworkManager/NetworkManager.changes
++++ and /work/SRC/openSUSE:Factory/.NetworkManager.new/NetworkManager.changes

Old:
----
  NetworkManager-1.0.12.tar.xz
  NetworkManager-geoclue-interaction.patch
  nm-don-t-consider-not-needed-secrets-for-has_system_secr.diff
  nm-treat-not-saved-secrets-just-like-agent-owned-when-cl.diff

New:
----
  NetworkManager-1.4.0.tar.xz
  NetworkManager-fix-broadcom-wifi.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ NetworkManager.spec ++++++
--- /var/tmp/diff_new_pack.LZWf2V/_old  2016-09-21 18:45:18.000000000 +0200
+++ /var/tmp/diff_new_pack.LZWf2V/_new  2016-09-21 18:45:18.000000000 +0200
@@ -22,30 +22,26 @@
 # Toggle this whenever enabling/disabling the 
nm-probe-radius-server-cert.patch patch (as we export additional symbols)
 # Like this, g-c-c and NM-applet, which consume this symbol, will block 
updating NM if we have to disable the patch until
 # they are touched too
-%define with_cacert_patch 1
+%define with_cacert_patch 0
 
 Name:           NetworkManager
 Url:            http://www.gnome.org/projects/NetworkManager/
-Version:        1.0.12
+Version:        1.4.0
 Release:        0
 Summary:        Network Link Manager and User Applications
 License:        GPL-2.0+
 Group:          Productivity/Networking/System
-Source0:        
http://download.gnome.org/sources/NetworkManager/1.0/%{name}-%{version}.tar.xz
+Source0:        
http://download.gnome.org/sources/NetworkManager/1.4/%{name}-%{version}.tar.xz
 Source1:        nfs
 Source2:        NetworkManager.conf
 Source3:        baselibs.conf
 Source99:       NetworkManager-rpmlintrc
 # PATCH-FEATURE-OPENSUSE systemd-network-config.patch -- don't try to start NM 
under systemd if it is disabled in system configuration
 Patch0:         systemd-network-config.patch
-# PATCH-HACK-OPENSUSE 
nm-don-t-consider-not-needed-secrets-for-has_system_secr.diff lnus...@suse.com 
-- avoid polkit popups for 802.11x
-Patch3:         nm-don-t-consider-not-needed-secrets-for-has_system_secr.diff
-# PATCH-HACK-OPENSUSE 
nm-treat-not-saved-secrets-just-like-agent-owned-when-cl.diff lnus...@suse.com 
-- avoid polkit popups for 802.11x
-Patch4:         nm-treat-not-saved-secrets-just-like-agent-owned-when-cl.diff
 # PATCH-FIX-UPSTREAM nm-probe-radius-server-cert.patch bnc#574266 
g...@suse.com -- Probe the RADIUS server certificate
-Patch5:         nm-probe-radius-server-cert.patch
-# PATCH-FIX-OPENSUSE NetworkManager-geoclue-interaction.patch 
dims...@opensuse.org -- Allow the user "srvGeoClue" to query NetworkManager on 
the dbus
-Patch6:         NetworkManager-geoclue-interaction.patch
+Patch1:         nm-probe-radius-server-cert.patch
+# PATCH-FIX-UPSTREAM NetworkManager-fix-broadcom-wifi.patch bgo#770456 
zai...@opensuse.org -- Fix wifi for broadcom users, patch from upstream git.
+Patch2:         NetworkManager-fix-broadcom-wifi.patch
 BuildRequires:  fdupes
 BuildRequires:  gobject-introspection-devel
 BuildRequires:  gtk-doc
@@ -61,14 +57,18 @@
 #BuildRequires:  suse-release
 # for /sbin/netconfig: integration with netconfig is required
 BuildRequires:  sysconfig
+%if !0%{?is_opensuse}
 BuildRequires:  translation-update-upstream
+%endif
 BuildRequires:  vala
 BuildRequires:  wireless-tools
+BuildRequires:  perl(YAML)
 BuildRequires:  pkgconfig(bluez) >= 5
 BuildRequires:  pkgconfig(dbus-1)
 BuildRequires:  pkgconfig(dbus-glib-1) >= 0.94
 BuildRequires:  pkgconfig(glib-2.0) >= 2.32
 BuildRequires:  pkgconfig(gudev-1.0)
+BuildRequires:  pkgconfig(jansson)
 BuildRequires:  pkgconfig(libnewt) >= 0.52.15
 %if %{with_wimax}
 BuildRequires:  pkgconfig(libiWmxSdk-0) >= 1.5.1
@@ -81,11 +81,11 @@
 %if %{with_systemd}
 BuildRequires:  pkgconfig(libsystemd) >= 209
 %endif
+BuildRequires:  pkgconfig(libsystemd) >= 209
 BuildRequires:  pkgconfig(libteam)
 BuildRequires:  pkgconfig(mm-glib) >= 0.7.991
 BuildRequires:  pkgconfig(nss)
 BuildRequires:  pkgconfig(polkit-agent-1) >= 0.97
-BuildRequires:  pkgconfig(systemd)
 BuildRequires:  pkgconfig(udev)
 BuildRequires:  pkgconfig(uuid)
 Requires:       NetworkManager-branding
@@ -103,7 +103,6 @@
 Recommends:     iptables
 Recommends:     NetworkManager-client
 Recommends:     org.freedesktop.ModemManager
-Recommends:     avahi-autoipd
 # Recommend the rp-pppoe binary for PPP over Ethernet (common for ADSL) 
connections.
 Recommends:     rp-pppoe
 Recommends:     %{name}-lang
@@ -240,14 +239,14 @@
 %lang_package
 %prep
 %setup -n %{name}-%{version} -q
+%if !0%{?is_opensuse}
 translation-update-upstream
+%endif
 %patch0 -p1
-%patch3 -p1
-%patch4 -p1
 %if %{with_cacert_patch}
-%patch5 -p1
+%patch1 -p1
 %endif
-%patch6 -p1
+%patch2 -p1
 
 %build
 pppddir=`ls -1d /usr/%_lib/pppd/2*`
@@ -256,9 +255,10 @@
 %configure\
     --disable-static\
     --with-crypto=nss \
-    --enable-ifcfg-suse \
+    --enable-gtk-doc \
     --with-docs\
     --with-netconfig=yes \
+    --with-config-dns-rc-manager-default=netconfig \
     --enable-more-warnings=no \
     --with-pppd-plugin-dir=$pppddir \
     --with-dhclient=/sbin/dhclient \
@@ -357,6 +357,10 @@
 
 %postun -n libnm-glib-vpn1 -p /sbin/ldconfig
 
+%post -n libnm0 -p /sbin/ldconfig
+
+%postun -n libnm0 -p /sbin/ldconfig
+
 %files
 %defattr(-,root,root)
 %doc COPYING ChangeLog NEWS AUTHORS README CONTRIBUTING TODO data/server.conf
@@ -374,16 +378,14 @@
 %doc %{_mandir}/man1/nmtui-connect.1%{?ext_man}
 %doc %{_mandir}/man1/nmtui-edit.1%{?ext_man}
 %doc %{_mandir}/man1/nmtui-hostname.1%{?ext_man}
-%doc %{_mandir}/man5/nm-settings-ifcfg-rh.5%{?ext_man}
 %doc %{_mandir}/man5/nm-settings-keyfile.5%{?ext_man}
 %doc %{_mandir}/man5/NetworkManager.conf.5%{?ext_man}
 %doc %{_mandir}/man5/nm-settings.5%{?ext_man}
 %doc %{_mandir}/man5/nm-system-settings.conf.5%{?ext_man}
-%doc %{_mandir}/man5/nmcli-examples.5%{?ext_man}
+%doc %{_mandir}/man7/nmcli-examples.7%{?ext_man}
 %doc %{_mandir}/man8/NetworkManager.*
 %dir %{_libdir}/NetworkManager/
 %{_libdir}/NetworkManager/libnm-wwan.so
-%{_libdir}/NetworkManager/libnm-settings-plugin-ifcfg-suse.so
 %{_libdir}/NetworkManager/libnm-device-plugin-adsl.so
 %{_libdir}/NetworkManager/libnm-device-plugin-bluetooth.so
 %{_libdir}/NetworkManager/libnm-device-plugin-wifi.so
@@ -392,12 +394,10 @@
 %{_libdir}/NetworkManager/libnm-device-plugin-team.so
 %dir %{_libdir}/pppd/2.*
 %{_libdir}/pppd/2.*/nm-pppd-plugin.*
-%{_libexecdir}/nm-avahi-autoipd.action
 %{_libexecdir}/nm-dhcp-helper
 %{_libexecdir}/nm-dispatcher
 %{_libexecdir}/nm-iface-helper
 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.NetworkManager.conf
-%{_sysconfdir}/dbus-1/system.d/nm-avahi-autoipd.conf
 %{_sysconfdir}/dbus-1/system.d/nm-dispatcher.conf
 %dir %{_sysconfdir}/NetworkManager
 %dir %{_sysconfdir}/NetworkManager/VPN

++++++ NetworkManager-1.0.12.tar.xz -> NetworkManager-1.4.0.tar.xz ++++++
++++ 1205029 lines of diff (skipped)

++++++ NetworkManager-fix-broadcom-wifi.patch ++++++

m 471521ca84187cd32afcd20aebe5a369fe7368dc Mon Sep 17 00:00:00 2001
From: Thomas Haller <thal...@redhat.com>
Date: Sun, 28 Aug 2016 13:52:32 +0200
Subject: platform: split processing result from do_change_link()

(cherry picked from commit 3dc09446771a3434ed948bdd5e6ca9f6ef9a9e76)

diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 98c4e46..eeb24ca 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -4060,18 +4060,14 @@ out:
        return !!nmp_cache_lookup_obj (priv->cache, obj_id);
 }
 
-static NMPlatformError
-do_change_link (NMPlatform *platform,
-                int ifindex,
-                struct nl_msg *nlmsg)
+static WaitForNlResponseResult
+do_change_link_request (NMPlatform *platform,
+                        int ifindex,
+                        struct nl_msg *nlmsg)
 {
        nm_auto_pop_netns NMPNetns *netns = NULL;
        WaitForNlResponseResult seq_result = 
WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN;
        int nle;
-       char s_buf[256];
-       NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS;
-       NMLogLevel log_level = LOGL_DEBUG;
-       const char *log_result = "failure", *log_detail = "";
 
        if (!nm_platform_netns_push (platform, &netns))
                return NM_PLATFORM_ERROR_UNSPECIFIED;
@@ -4098,6 +4094,18 @@ retry:
                nlmsg_hdr (nlmsg)->nlmsg_type = RTM_SETLINK;
                goto retry;
        }
+       return seq_result;
+}
+
+static NMPlatformError
+do_change_link_result (NMPlatform *platform,
+                       int ifindex,
+                       WaitForNlResponseResult seq_result)
+{
+       char s_buf[256];
+       NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS;
+       NMLogLevel log_level = LOGL_DEBUG;
+       const char *log_result = "failure", *log_detail = "";
 
        if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK) {
                log_result = "success";
@@ -4123,6 +4131,17 @@ retry:
        return result;
 }
 
+static NMPlatformError
+do_change_link (NMPlatform *platform,
+                int ifindex,
+                struct nl_msg *nlmsg)
+{
+       WaitForNlResponseResult seq_result;
+
+       seq_result = do_change_link_request (platform, ifindex, nlmsg);
+       return do_change_link_result (platform, ifindex, seq_result);
+}
+
 static gboolean
 link_add (NMPlatform *platform,
           const char *name,
-- 
cgit v0.10.2


>From 06d1679aa9867682297316e7b2cfac6fc8f67c2a Mon Sep 17 00:00:00 2001
From: Thomas Haller <thal...@redhat.com>
Date: Sun, 28 Aug 2016 14:08:42 +0200
Subject: platform: workaround kernel wrongly returning ENFILE when changing
 MAC address

https://bugzilla.gnome.org/show_bug.cgi?id=770456
(cherry picked from commit 2bef71611bd9fd2e333a7522205f0262ac25680f)

diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index eeb24ca..c36e967 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -4449,6 +4449,8 @@ link_set_address (NMPlatform *platform, int ifindex, 
gconstpointer address, size
 {
        nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
        gs_free char *mac = NULL;
+       WaitForNlResponseResult seq_result;
+       char s_buf[256];
 
        if (!address || !length)
                g_return_val_if_reached (NM_PLATFORM_ERROR_BUG);
@@ -4468,7 +4470,30 @@ link_set_address (NMPlatform *platform, int ifindex, 
gconstpointer address, size
 
        NLA_PUT (nlmsg, IFLA_ADDRESS, length, address);
 
-       return do_change_link (platform, ifindex, nlmsg);
+       seq_result = do_change_link_request (platform, ifindex, nlmsg);
+
+       if (NM_IN_SET (-((int) seq_result), ENFILE)) {
+               const NMPObject *obj_cache;
+
+               /* workaround ENFILE which may be wrongly returned (bgo 
#770456).
+                * If the MAC address is as expected, assume success? */
+
+               obj_cache = nmp_cache_lookup_link 
(NM_LINUX_PLATFORM_GET_PRIVATE (platform)->cache, ifindex);
+               if (   obj_cache
+                   && obj_cache->link.addr.len == length
+                   && memcmp (obj_cache->link.addr.data, address, length) == 
0) {
+                       _NMLOG (LOGL_DEBUG,
+                               "do-change-link[%d]: %s changing link: %s%s",
+                               ifindex,
+                               "success",
+                               wait_for_nl_response_to_string (seq_result, 
s_buf, sizeof (s_buf)),
+                               " (assume success changing address)");
+                       return NM_PLATFORM_ERROR_SUCCESS;
+               }
+       }
+
+       return do_change_link_result (platform, ifindex, seq_result);
+
 nla_put_failure:
        g_return_val_if_reached (NM_PLATFORM_ERROR_UNSPECIFIED);
 }
-- 
cgit v0.10.2


>From b1f5d3d798498c53fe65257490b2df3e3f71e364 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thal...@redhat.com>
Date: Mon, 29 Aug 2016 17:14:04 +0200
Subject: device: fix spelling in logging

(cherry picked from commit d51f2c2a4e99799739e2adbeaf578144b556c4b9)

diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 199acc6..305a1bb 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -11820,7 +11820,7 @@ _hw_addr_set (NMDevice *self,
                               operation, addr, detail);
                } else {
                        _LOGW (LOGD_DEVICE,
-                              "set-hw-addr: new MAC address %s not 
successfully set to %s (%s)",
+                              "set-hw-addr: new MAC address %s not 
successfully %s (%s)",
                               addr, operation, detail);
                        success = FALSE;
                }
-- 
cgit v0.10.2


>From 3b51959f48f2b40a4d85e1d36fd69a46548369cb Mon Sep 17 00:00:00 2001
From: Thomas Haller <thal...@redhat.com>
Date: Mon, 29 Aug 2016 18:28:34 +0200
Subject: device: add hack to wait after changing MAC address

It seems some drivers return success for nm_platform_link_set_address(),
but at that point the address did not yet actually change *sigh*.
It changes a bit later, possibly after setting the device up.

Add a workaround to retry reading the MAC address when platform indicates
success but the address still differs at first.

https://bugzilla.gnome.org/show_bug.cgi?id=770456
(cherry picked from commit 67b685235847ac49712d77023e23ef5c38e82a9e)

diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 305a1bb..6939332 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -11774,6 +11774,7 @@ _hw_addr_set (NMDevice *self,
 {
        NMDevicePrivate *priv;
        gboolean success = FALSE;
+       gboolean needs_refresh = FALSE;
        NMPlatformError plerr;
        const char *cur_addr;
        guint8 addr_bytes[NM_UTILS_HWADDR_LEN_MAX];
@@ -11819,10 +11820,10 @@ _hw_addr_set (NMDevice *self,
                        _LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s 
(%s)",
                               operation, addr, detail);
                } else {
-                       _LOGW (LOGD_DEVICE,
-                              "set-hw-addr: new MAC address %s not 
successfully %s (%s)",
+                       _LOGD (LOGD_DEVICE,
+                              "set-hw-addr: new MAC address %s not 
successfully %s (%s) (refresh link)",
                               addr, operation, detail);
-                       success = FALSE;
+                       needs_refresh = TRUE;
                }
        } else {
                _NMLOG (plerr == NM_PLATFORM_ERROR_NOT_FOUND ? LOGL_DEBUG : 
LOGL_WARN,
@@ -11836,6 +11837,27 @@ _hw_addr_set (NMDevice *self,
                        return FALSE;
        }
 
+       if (needs_refresh) {
+               /* The platform call indicated success, however the address is 
not
+                * as expected. May be a kernel issue and the MAC address takes
+                * a moment to change (bgo#770456).
+                *
+                * Try to reload the link and check again. */
+               nm_platform_link_refresh (NM_PLATFORM_GET, 
nm_device_get_ip_ifindex (self));
+
+               nm_device_update_hw_address (self);
+               cur_addr = nm_device_get_hw_address (self);
+               if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, 
-1)) {
+                       _LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s 
(%s)",
+                              operation, addr, detail);
+               } else {
+                       _LOGW (LOGD_DEVICE,
+                              "set-hw-addr: new MAC address %s not 
successfully %s (%s)",
+                              addr, operation, detail);
+                       return FALSE;
+               }
+       }
+
        return success;
 }
 
-- 

>From 8d575403685208aad75f918484ae7adbc1a46085 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thal...@redhat.com>
Date: Wed, 7 Sep 2016 23:47:14 +0200
Subject: device: workaround driver issue with delayed change of MAC address

brcmfmac and possibly other drivers don't change the MAC address
right away, but instead the result is delayed. That is problematic
because we cannot continue activation before the MAC address is
settled.

Add a hack to workaround the issue by waiting until the MAC address
changed.

The previous attempt to workaround this was less intrusive: we would
just refresh the link once and check the result. But that turns out
not to be sufficent for all cases. Now, wait and poll.

https://bugzilla.gnome.org/show_bug.cgi?id=770456
https://bugzilla.redhat.com/show_bug.cgi?id=1374023
(cherry picked from commit 1a85103765d4eaa0acab6b03658a4f9cfe684a64)

diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 079b159..ae17424 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -11555,16 +11555,17 @@ nm_device_get_hw_address (NMDevice *self)
        return priv->hw_addr;
 }
 
-void
+gboolean
 nm_device_update_hw_address (NMDevice *self)
 {
        NMDevicePrivate *priv;
        const guint8 *hwaddr;
        gsize hwaddrlen = 0;
+       gboolean changed = FALSE;
 
        priv = NM_DEVICE_GET_PRIVATE (self);
        if (priv->ifindex <= 0)
-               return;
+               return FALSE;
 
        hwaddr = nm_platform_link_get_address (NM_PLATFORM_GET, priv->ifindex, 
&hwaddrlen);
 
@@ -11591,6 +11592,7 @@ nm_device_update_hw_address (NMDevice *self)
                                 * update our inital hw-address as well. */
                                nm_device_update_initial_hw_address (self);
                        }
+                       changed = TRUE;
                }
        } else {
                /* Invalid or no hardware address */
@@ -11603,6 +11605,7 @@ nm_device_update_hw_address (NMDevice *self)
                               "hw-addr: failed reading current MAC address");
                }
        }
+       return changed;
 }
 
 void
@@ -11762,6 +11765,15 @@ nm_device_hw_addr_is_explict (NMDevice *self)
 }
 
 static gboolean
+_hw_addr_matches (NMDevice *self, const char *addr)
+{
+       const char *cur_addr;
+
+       cur_addr = nm_device_get_hw_address (self);
+       return cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1);
+}
+
+static gboolean
 _hw_addr_set (NMDevice *self,
               const char *addr,
               const char *operation,
@@ -11771,7 +11783,6 @@ _hw_addr_set (NMDevice *self,
        gboolean success = FALSE;
        gboolean needs_refresh = FALSE;
        NMPlatformError plerr;
-       const char *cur_addr;
        guint8 addr_bytes[NM_UTILS_HWADDR_LEN_MAX];
        guint hw_addr_len;
        gboolean was_up;
@@ -11782,11 +11793,9 @@ _hw_addr_set (NMDevice *self,
 
        priv = NM_DEVICE_GET_PRIVATE (self);
 
-       cur_addr = nm_device_get_hw_address (self);
-
        /* Do nothing if current MAC is same */
-       if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) {
-               _LOGT (LOGD_DEVICE, "set-hw-addr: no MAC address change needed 
(%s)", cur_addr);
+       if (_hw_addr_matches (self, addr)) {
+               _LOGT (LOGD_DEVICE, "set-hw-addr: no MAC address change needed 
(%s)", addr);
                return TRUE;
        }
 
@@ -11810,8 +11819,7 @@ _hw_addr_set (NMDevice *self,
        if (success) {
                /* MAC address succesfully changed; update the current MAC to 
match */
                nm_device_update_hw_address (self);
-               cur_addr = nm_device_get_hw_address (self);
-               if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, 
-1)) {
+               if (_hw_addr_matches (self, addr)) {
                        _LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s 
(%s)",
                               operation, addr, detail);
                } else {
@@ -11833,24 +11841,51 @@ _hw_addr_set (NMDevice *self,
        }
 
        if (needs_refresh) {
-               /* The platform call indicated success, however the address is 
not
-                * as expected. May be a kernel issue and the MAC address takes
-                * a moment to change (bgo#770456).
-                *
-                * Try to reload the link and check again. */
-               nm_platform_link_refresh (NM_PLATFORM_GET, 
nm_device_get_ip_ifindex (self));
-
-               nm_device_update_hw_address (self);
-               cur_addr = nm_device_get_hw_address (self);
-               if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, 
-1)) {
-                       _LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s 
(%s)",
-                              operation, addr, detail);
+               if (_hw_addr_matches (self, addr)) {
+                       /* the MAC address already changed during 
nm_device_bring_up() above. */
                } else {
-                       _LOGW (LOGD_DEVICE,
-                              "set-hw-addr: new MAC address %s not 
successfully %s (%s)",
-                              addr, operation, detail);
-                       return FALSE;
+                       gint64 poll_end, now;
+
+                       /* The platform call indicated success, however the 
address is not
+                        * as expected. That is either due to a driver issue 
(brcmfmac, bgo#770456,
+                        * rh#1374023) or a race where externally the MAC 
address was reset.
+                        * The race is rather unlikely.
+                        *
+                        * The alternative would be to postpone the activation 
in case the
+                        * MAC address is not yet ready and poll without 
blocking. However,
+                        * that is rather complicated and it is not expected 
that this case
+                        * happens for regular drivers.
+                        * Note that brcmfmac can block NetworkManager for 500 
msec while
+                        * taking down the device. Let's add annother 100 msec 
to that.
+                        *
+                        * wait/poll up to 100 msec until it changes. */
+
+                       poll_end = nm_utils_get_monotonic_timestamp_us () + 
(100 * 1000);
+                       for (;;) {
+                               if (!nm_platform_link_refresh (NM_PLATFORM_GET, 
nm_device_get_ip_ifindex (self)))
+                                       goto handle_fail;
+                               if (!nm_device_update_hw_address (self))
+                                       goto handle_wait;
+                               if (!_hw_addr_matches (self, addr))
+                                       goto handle_fail;
+
+                               break;
+handle_wait:
+                               now = nm_utils_get_monotonic_timestamp_us ();
+                               if (now < poll_end) {
+                                       g_usleep (NM_MIN (poll_end - now, 500));
+                                       continue;
+                               }
+handle_fail:
+                               _LOGW (LOGD_DEVICE,
+                                      "set-hw-addr: new MAC address %s not 
successfully %s (%s)",
+                                      addr, operation, detail);
+                               return FALSE;
+                       }
                }
+
+               _LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
+                      operation, addr, detail);
        }
 
        return success;
diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
index be12ce7..a757a37 100644
--- a/src/devices/nm-device.h
+++ b/src/devices/nm-device.h
@@ -588,7 +588,7 @@ void nm_device_reactivate_ip6_config (NMDevice *device,
                                       NMSettingIPConfig *s_ip6_old,
                                       NMSettingIPConfig *s_ip6_new);
 
-void nm_device_update_hw_address (NMDevice *self);
+gboolean nm_device_update_hw_address (NMDevice *self);
 void nm_device_update_initial_hw_address (NMDevice *self);
 void nm_device_update_permanent_hw_address (NMDevice *self);
 void nm_device_update_dynamic_ip_setup (NMDevice *self);
-- 
cgit v0.10.2


>From cd8f2ecc617a896d8007e6fe825c676a626a3b8d Mon Sep 17 00:00:00 2001
From: Thomas Haller <thal...@redhat.com>
Date: Sun, 11 Sep 2016 09:48:56 +0200
Subject: device: wait for MAC address change to complete before setting
 interface up

Some drivers (brcmfmac) don't change the MAC address right away.
NetworkManager works around that by waiting synchronously until
the address changes (commit 1a85103765d4eaa0acab6b03658a4f9cfe684a64).

wpa_supplicant on the other hand, only re-reads the MAC address
when changing state from DISABLED to ENABLED, which happens when
the interface comes up.

That is a bug in wpa_supplicant and the driver, but we can work-around by
waiting until the MAC address actually changed before setting the interface
IFF_UP. Also note, that there is still a race in wpa_supplicant which might
miss a change to DISABLED state altogether.

https://bugzilla.gnome.org/show_bug.cgi?id=770504
https://bugzilla.redhat.com/show_bug.cgi?id=1374023
(cherry picked from commit 32f7c1d4b9aba597a99128631f07c2985149f303)

diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index ae17424..6da66cc 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -11835,12 +11835,8 @@ _hw_addr_set (NMDevice *self,
                        nm_platform_error_to_string (plerr));
        }
 
-       if (was_up) {
-               if (!nm_device_bring_up (self, TRUE, NULL))
-                       return FALSE;
-       }
-
        if (needs_refresh) {
+               success = TRUE;
                if (_hw_addr_matches (self, addr)) {
                        /* the MAC address already changed during 
nm_device_bring_up() above. */
                } else {
@@ -11877,15 +11873,24 @@ handle_wait:
                                        continue;
                                }
 handle_fail:
-                               _LOGW (LOGD_DEVICE,
-                                      "set-hw-addr: new MAC address %s not 
successfully %s (%s)",
-                                      addr, operation, detail);
-                               return FALSE;
+                               success = FALSE;
+                               break;
                        }
                }
 
-               _LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
-                      operation, addr, detail);
+               if (success) {
+                       _LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s 
(%s)",
+                              operation, addr, detail);
+               } else {
+                       _LOGW (LOGD_DEVICE,
+                              "set-hw-addr: new MAC address %s not 
successfully %s (%s)",
+                              addr, operation, detail);
+               }
+       }
+
+       if (was_up) {
+               if (!nm_device_bring_up (self, TRUE, NULL))
+                       return FALSE;
        }
 
        return success;
-- 
cgit v0.10.2


>From 811aaead4ca6f2f815f49b7353fa7a88554dca42 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thal...@redhat.com>
Date: Mon, 5 Sep 2016 14:12:41 +0200
Subject: shared: add NM_MIN()/NM_MAX() macros to replace glib's MIN()/MAX()

(cherry picked from commit b2016fd2a52b82d45324526c965e7545d026cebe)

diff --git a/shared/nm-utils/nm-macros-internal.h 
b/shared/nm-utils/nm-macros-internal.h
index c66cb53..2067dba 100644
--- a/shared/nm-utils/nm-macros-internal.h
+++ b/shared/nm-utils/nm-macros-internal.h
@@ -542,6 +542,50 @@ nm_strcmp_p_with_data (gconstpointer a, gconstpointer b, 
gpointer user_data)
 
 /*****************************************************************************/
 
+/* Taken from systemd's UNIQ_T and UNIQ macros. */
+
+#define NM_UNIQ_T(x, uniq) G_PASTE(__unique_prefix_, G_PASTE(x, uniq))
+#define NM_UNIQ __COUNTER__
+
+/*****************************************************************************/
+
+/* glib's MIN()/MAX() macros don't have function-like behavior, in that they 
evaluate
+ * the argument possibly twice.
+ *
+ * Taken from systemd's MIN()/MAX() macros. */
+
+#define NM_MIN(a, b) __NM_MIN(NM_UNIQ, a, NM_UNIQ, b)
+#define __NM_MIN(aq, a, bq, b) \
+       ({ \
+               typeof (a) NM_UNIQ_T(A, aq) = (a); \
+               typeof (b) NM_UNIQ_T(B, bq) = (b); \
+               ((NM_UNIQ_T(A, aq) < NM_UNIQ_T(B, bq)) ? NM_UNIQ_T(A, aq) : 
NM_UNIQ_T(B, bq)); \
+       })
+
+#define NM_MAX(a, b) __NM_MAX(NM_UNIQ, a, NM_UNIQ, b)
+#define __NM_MAX(aq, a, bq, b) \
+       ({ \
+               typeof (a) NM_UNIQ_T(A, aq) = (a); \
+               typeof (b) NM_UNIQ_T(B, bq) = (b); \
+               ((NM_UNIQ_T(A, aq) > NM_UNIQ_T(B, bq)) ? NM_UNIQ_T(A, aq) : 
NM_UNIQ_T(B, bq)); \
+       })
+
+#define NM_CLAMP(x, low, high) __NM_CLAMP(NM_UNIQ, x, NM_UNIQ, low, NM_UNIQ, 
high)
+#define __NM_CLAMP(xq, x, lowq, low, highq, high) \
+       ({ \
+               typeof(x)NM_UNIQ_T(X,xq) = (x); \
+               typeof(low) NM_UNIQ_T(LOW,lowq) = (low); \
+               typeof(high) NM_UNIQ_T(HIGH,highq) = (high); \
+               \
+               ( (NM_UNIQ_T(X,xq) > NM_UNIQ_T(HIGH,highq)) \
+                 ? NM_UNIQ_T(HIGH,highq) \
+                 : (NM_UNIQ_T(X,xq) < NM_UNIQ_T(LOW,lowq)) \
+                    ? NM_UNIQ_T(LOW,lowq) \
+                    : NM_UNIQ_T(X,xq)); \
+       })
+
+/*****************************************************************************/
+
 static inline guint
 nm_encode_version (guint major, guint minor, guint micro) {
        /* analog to the preprocessor macro NM_ENCODE_VERSION(). */
-- 
cgit v0.10.2

++++++ NetworkManager-rpmlintrc ++++++
--- /var/tmp/diff_new_pack.LZWf2V/_old  2016-09-21 18:45:23.000000000 +0200
+++ /var/tmp/diff_new_pack.LZWf2V/_new  2016-09-21 18:45:23.000000000 +0200
@@ -1 +1 @@
-addFilter("dbus-policy-missing-allow")
+addFilter("dbus-policy-missing-allow");

++++++ systemd-network-config.patch ++++++
--- /var/tmp/diff_new_pack.LZWf2V/_old  2016-09-21 18:45:23.000000000 +0200
+++ /var/tmp/diff_new_pack.LZWf2V/_new  2016-09-21 18:45:23.000000000 +0200
@@ -1,16 +1,17 @@
-Index: NetworkManager-1.0.12/data/NetworkManager.service.in
+Index: NetworkManager-1.4.0/data/NetworkManager.service.in
 ===================================================================
---- NetworkManager-1.0.12.orig/data/NetworkManager.service.in
-+++ NetworkManager-1.0.12/data/NetworkManager.service.in
-@@ -1,6 +1,6 @@
+--- NetworkManager-1.4.0.orig/data/NetworkManager.service.in
++++ NetworkManager-1.4.0/data/NetworkManager.service.in
+@@ -1,7 +1,7 @@
  [Unit]
  Description=Network Manager
+ Documentation=man:NetworkManager(8)
 -Wants=network.target
 +Wants=remote-fs.target network.target
  After=network-pre.target dbus.service
  Before=network.target @DISTRO_NETWORK_SERVICE@
  
-@@ -15,6 +15,6 @@ KillMode=process
+@@ -20,6 +20,6 @@ ProtectHome=read-only
  
  [Install]
  WantedBy=multi-user.target
@@ -18,11 +19,11 @@
 +Alias=network.service
  Also=NetworkManager-dispatcher.service
  
-Index: NetworkManager-1.0.12/data/NetworkManager-wait-online.service.in
+Index: NetworkManager-1.4.0/data/NetworkManager-wait-online.service.in
 ===================================================================
---- NetworkManager-1.0.12.orig/data/NetworkManager-wait-online.service.in
-+++ NetworkManager-1.0.12/data/NetworkManager-wait-online.service.in
-@@ -7,7 +7,9 @@ Before=network.target network-online.tar
+--- NetworkManager-1.4.0.orig/data/NetworkManager-wait-online.service.in
++++ NetworkManager-1.4.0/data/NetworkManager-wait-online.service.in
+@@ -7,7 +7,9 @@ Before=network-online.target
  
  [Service]
  Type=oneshot
@@ -30,6 +31,6 @@
 +Environment=NM_ONLINE_TIMEOUT=0
 +EnvironmentFile=-/etc/sysconfig/network/config
 +ExecStart=/bin/bash -c "if [ ${NM_ONLINE_TIMEOUT} -gt 0 ]; then 
@bindir@/nm-online -s -q --timeout=${NM_ONLINE_TIMEOUT} ; else /bin/true ; fi"
+ RemainAfterExit=yes
  
  [Install]
- WantedBy=multi-user.target


Reply via email to