From a24f1b36623a88a67a7428f03b14c23071c27bc5 Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Wed, 4 Nov 2009 22:26:02 +0000 Subject: [PATCH] - nm: fix PPPoE connection authentication (rh #532862) --- NetworkManager.spec | 7 ++++++- pppoe-auth-fix-82011dff04123d.patch | 31 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 pppoe-auth-fix-82011dff04123d.patch diff --git a/NetworkManager.spec b/NetworkManager.spec index 05ee471..2d2a8ee 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -16,7 +16,7 @@ Name: NetworkManager Summary: Network connection manager and user applications Epoch: 1 Version: 0.7.996 -Release: 5%{snapshot}%{?dist} +Release: 6%{snapshot}%{?dist} Group: System Environment/Base License: GPLv2+ URL: http://www.gnome.org/projects/NetworkManager/ @@ -27,6 +27,7 @@ Source2: nm-system-settings.conf Patch1: nm-applet-internal-buildfixes.patch Patch2: explain-dns1-dns2.patch Patch3: nm-applet-no-notifications.patch +Patch4: pppoe-auth-fix-82011dff04123d.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) PreReq: chkconfig @@ -153,6 +154,7 @@ tar -xjf %{SOURCE1} %patch1 -p1 -b .buildfix %patch2 -p1 -b .explain-dns1-dns2 %patch3 -p1 -b .no-notifications +%patch4 -p1 -b .pppoe-authfix %build @@ -356,6 +358,9 @@ fi %{_datadir}/gtk-doc/html/libnm-util/* %changelog +* Wed Nov 04 2009 Dan Williams - 0.7.996-6.git20091021 +- nm: fix PPPoE connection authentication (rh #532862) + * Wed Oct 21 2009 Dan Williams - 0.7.996-5.git20091021 - install: better fix for (rh #526519) - install: don't build Bluetooth bits on s390 (rh #529854) diff --git a/pppoe-auth-fix-82011dff04123d.patch b/pppoe-auth-fix-82011dff04123d.patch new file mode 100644 index 0000000..14dc087 --- /dev/null +++ b/pppoe-auth-fix-82011dff04123d.patch @@ -0,0 +1,31 @@ +diff -up NetworkManager-0.7.996/src/nm-device-ethernet.c.foo NetworkManager-0.7.996/src/nm-device-ethernet.c +--- NetworkManager-0.7.996/src/nm-device-ethernet.c.foo 2009-11-04 14:14:04.101920888 -0800 ++++ NetworkManager-0.7.996/src/nm-device-ethernet.c 2009-11-04 14:16:34.668863437 -0800 +@@ -621,6 +621,9 @@ real_get_best_auto_connection (NMDevice + return NULL; + } + ++#define IS_ACTIVATING_STATE(state) \ ++ (state > NM_DEVICE_STATE_DISCONNECTED && state < NM_DEVICE_STATE_ACTIVATED) ++ + static void + real_connection_secrets_updated (NMDevice *dev, + NMConnection *connection, +@@ -632,8 +635,7 @@ real_connection_secrets_updated (NMDevic + gboolean valid = FALSE; + GSList *iter; + +- if (nm_device_get_state (dev) != NM_DEVICE_STATE_NEED_AUTH) +- return; ++ g_return_if_fail (IS_ACTIVATING_STATE (nm_device_get_state (dev))); + + /* PPPoE? */ + if (caller == SECRETS_CALLER_PPP) { +@@ -663,6 +665,7 @@ real_connection_secrets_updated (NMDevic + + /* Only caller could be ourselves for 802.1x */ + g_return_if_fail (caller == SECRETS_CALLER_ETHERNET); ++ g_return_if_fail (nm_device_get_state (dev) == NM_DEVICE_STATE_NEED_AUTH); + + for (iter = updated_settings; iter; iter = g_slist_next (iter)) { + const char *setting_name = (const char *) iter->data;