Set auto-negotiation based on running NM version

epel9
Jan Grulich 8 years ago
parent a95e39bfa7
commit dcdbb2c667

@ -2,7 +2,7 @@
Name: kf5-%{framework} Name: kf5-%{framework}
Version: 5.33.0 Version: 5.33.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: A Tier 1 KDE Frameworks 5 module that wraps NetworkManager DBus API Summary: A Tier 1 KDE Frameworks 5 module that wraps NetworkManager DBus API
License: LGPLv2+ License: LGPLv2+
@ -17,6 +17,7 @@ URL: https://cgit.kde.org/%{framework}.git
%endif %endif
Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz 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: extra-cmake-modules >= %{version}
BuildRequires: kf5-rpm-macros >= %{version} BuildRequires: kf5-rpm-macros >= %{version}
@ -96,6 +97,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%changelog %changelog
* Wed Apr 12 2017 Jan Grulich <jgrulich@redhat.com> - 5.33.0-2
- Set auto-negotiation based on NM version
* Mon Apr 03 2017 Rex Dieter <rdieter@fedoraproject.org> - 5.33.0-1 * Mon Apr 03 2017 Rex Dieter <rdieter@fedoraproject.org> - 5.33.0-1
- 5.33.0 - 5.33.0

@ -1,31 +0,0 @@
From 555b144a330f62c00813226d41be5f1ddfd32b03 Mon Sep 17 00:00:00 2001
From: Jan Grulich <jgrulich@redhat.com>
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;

@ -0,0 +1,44 @@
From d039943788dd08a5e2b1611732e3cfb6c2f64f26 Mon Sep 17 00:00:00 2001
From: Jan Grulich <jgrulich@redhat.com>
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 <nm-setting-wired.h>
@@ -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
Loading…
Cancel
Save