From dcdbb2c667cac7558fcfc6fd213211e47c4c74f9 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 12 Apr 2017 14:09:21 +0200 Subject: [PATCH] Set auto-negotiation based on running NM version --- kf5-networkmanager-qt.spec | 6 ++- ...set-peap-label-based-on-peap-version.patch | 31 ------------- ...auto-negotiation-based-on-nm-version.patch | 44 +++++++++++++++++++ 3 files changed, 49 insertions(+), 32 deletions(-) delete mode 100644 nm-qt-do-not-set-peap-label-based-on-peap-version.patch create mode 100644 nm-qt-set-auto-negotiation-based-on-nm-version.patch diff --git a/kf5-networkmanager-qt.spec b/kf5-networkmanager-qt.spec index afb8069..2875cef 100644 --- a/kf5-networkmanager-qt.spec +++ b/kf5-networkmanager-qt.spec @@ -2,7 +2,7 @@ Name: kf5-%{framework} Version: 5.33.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Tier 1 KDE Frameworks 5 module that wraps NetworkManager DBus API License: LGPLv2+ @@ -17,6 +17,7 @@ URL: https://cgit.kde.org/%{framework}.git %endif Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz +Patch0: nm-qt-set-auto-negotiation-based-on-nm-version.patch BuildRequires: extra-cmake-modules >= %{version} BuildRequires: kf5-rpm-macros >= %{version} @@ -96,6 +97,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Wed Apr 12 2017 Jan Grulich - 5.33.0-2 +- Set auto-negotiation based on NM version + * Mon Apr 03 2017 Rex Dieter - 5.33.0-1 - 5.33.0 diff --git a/nm-qt-do-not-set-peap-label-based-on-peap-version.patch b/nm-qt-do-not-set-peap-label-based-on-peap-version.patch deleted file mode 100644 index 6cef767..0000000 --- a/nm-qt-do-not-set-peap-label-based-on-peap-version.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 555b144a330f62c00813226d41be5f1ddfd32b03 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Tue, 28 Jun 2016 14:57:21 +0200 -Subject: Do not set peap label based on peap version - - -diff --git a/src/settings/security8021xsetting.cpp b/src/settings/security8021xsetting.cpp -index 8be37e7..888fc94 100644 ---- a/src/settings/security8021xsetting.cpp -+++ b/src/settings/security8021xsetting.cpp -@@ -891,7 +891,19 @@ QVariantMap NetworkManager::Security8021xSetting::toMap() const - - if (!version.isEmpty()) { - setting.insert(QLatin1String(NM_SETTING_802_1X_PHASE1_PEAPVER), version); -- setting.insert(QLatin1String(NM_SETTING_802_1X_PHASE1_PEAPLABEL), "1"); -+ } -+ -+ QString peapLabel; -+ switch (phase1PeapLabel()) { -+ case PeapLabelForce: -+ peapLabel = '1'; -+ break; -+ case PeapLabelUnknown: -+ break; -+ } -+ -+ if (!peapLabel.isEmpty()) { -+ setting.insert(QLatin1String(NM_SETTING_802_1X_PHASE1_PEAPLABEL), peapLabel); - } - - QString provisioning; diff --git a/nm-qt-set-auto-negotiation-based-on-nm-version.patch b/nm-qt-set-auto-negotiation-based-on-nm-version.patch new file mode 100644 index 0000000..bf7f0a3 --- /dev/null +++ b/nm-qt-set-auto-negotiation-based-on-nm-version.patch @@ -0,0 +1,44 @@ +From d039943788dd08a5e2b1611732e3cfb6c2f64f26 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Wed, 12 Apr 2017 14:02:19 +0200 +Subject: Set default value for auto-negotiation based on running NM version + +When running NM 1.6.0 and newer the default value is false, while previous +versions used to set it to true. +--- + src/settings/wiredsetting.cpp | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/settings/wiredsetting.cpp b/src/settings/wiredsetting.cpp +index d366f31..8fb3659 100644 +--- a/src/settings/wiredsetting.cpp ++++ b/src/settings/wiredsetting.cpp +@@ -20,6 +20,7 @@ + + #include "wiredsetting.h" + #include "wiredsetting_p.h" ++#include "manager.h" + + #if !NM_CHECK_VERSION(1, 0, 0) + #include +@@ -32,10 +33,16 @@ NetworkManager::WiredSettingPrivate::WiredSettingPrivate() + , port(NetworkManager::WiredSetting::UnknownPort) + , speed(0) + , duplex(NetworkManager::WiredSetting::UnknownDuplexType) +- , autoNegotiate(false) ++ // , autonegotiate(false) + , mtu(0) + , s390NetType(NetworkManager::WiredSetting::Undefined) +-{ } ++{ ++ if (NetworkManager::checkVersion(1, 6, 0)) { ++ autoNegotiate = false; ++ } else { ++ autoNegotiate = true; ++ } ++} + + NetworkManager::WiredSetting::WiredSetting() + : Setting(Setting::Wired) +-- +cgit v0.11.2