Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 593537 Details for
Bug 834349
Fails to preserve WPA protocol preference when connections are edited
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Preserve WPA protocols and ciphers when editing connections
rh834349-applet-preserve-wpa.patch (text/plain), 7.61 KB, created by
Dan Williams
on 2012-06-21 18:25:25 UTC
(
hide
)
Description:
Preserve WPA protocols and ciphers when editing connections
Filename:
MIME Type:
Creator:
Dan Williams
Created:
2012-06-21 18:25:25 UTC
Size:
7.61 KB
patch
obsolete
>diff -up NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/wireless-security.c.foo NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/wireless-security.c >--- NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/wireless-security.c.foo 2012-06-21 12:47:54.891196829 -0500 >+++ NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/wireless-security.c 2012-06-21 13:03:42.571947032 -0500 >@@ -194,6 +194,30 @@ wireless_security_clear_ciphers (NMConne > } > > void >+wireless_security_copy_proto_and_ciphers (NMSettingWirelessSecurity *src, >+ NMSettingWirelessSecurity *dst) >+{ >+ guint32 i; >+ >+ g_return_if_fail (dst != NULL); >+ >+ if (!src) >+ return; >+ >+ /* Protocol: WPA or WPA2/RSN */ >+ for (i = 0; i < nm_setting_wireless_security_get_num_protos (src); i++) >+ nm_setting_wireless_security_add_proto (dst, nm_setting_wireless_security_get_proto (src, i)); >+ >+ /* Pairwise ciphers */ >+ for (i = 0; i < nm_setting_wireless_security_get_num_pairwise (src); i++) >+ nm_setting_wireless_security_add_pairwise (dst, nm_setting_wireless_security_get_pairwise (src, i)); >+ >+ /* Group ciphers */ >+ for (i = 0; i < nm_setting_wireless_security_get_num_groups (src); i++) >+ nm_setting_wireless_security_add_group (dst, nm_setting_wireless_security_get_group (src, i)); >+} >+ >+void > ws_802_1x_add_to_size_group (WirelessSecurity *sec, > GtkSizeGroup *size_group, > const char *label_name, >diff -up NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/wireless-security.h.foo NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/wireless-security.h >--- NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/wireless-security.h.foo 2012-06-21 12:47:58.320196914 -0500 >+++ NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/wireless-security.h 2012-06-21 13:01:21.123946452 -0500 >@@ -28,6 +28,7 @@ > #include <glade/glade.h> > > #include <nm-connection.h> >+#include <nm-setting-wireless-security.h> > > typedef struct _WirelessSecurity WirelessSecurity; > >@@ -106,6 +107,9 @@ void wireless_security_changed_cb (GtkWi > > void wireless_security_clear_ciphers (NMConnection *connection); > >+void wireless_security_copy_proto_and_ciphers (NMSettingWirelessSecurity *src, >+ NMSettingWirelessSecurity *dst); >+ > #define AUTH_NAME_COLUMN 0 > #define AUTH_METHOD_COLUMN 1 > >diff -up NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-eap.c.foo NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-eap.c >--- NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-eap.c.foo 2012-06-21 12:23:01.278463617 -0500 >+++ NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-eap.c 2012-06-21 13:04:53.362952180 -0500 >@@ -36,6 +36,8 @@ destroy (WirelessSecurity *parent) > > if (sec->size_group) > g_object_unref (sec->size_group); >+ if (sec->orig_wsec) >+ g_object_unref (sec->orig_wsec); > g_slice_free (WirelessSecurityWPAEAP, sec); > } > >@@ -63,6 +65,7 @@ add_to_size_group (WirelessSecurity *par > static void > fill_connection (WirelessSecurity *parent, NMConnection *connection) > { >+ WirelessSecurityWPAEAP *sec = (WirelessSecurityWPAEAP *) parent; > NMSettingWirelessSecurity *s_wireless_sec; > > ws_802_1x_fill_connection (parent, "wpa_eap_auth_combo", connection); >@@ -72,6 +75,12 @@ fill_connection (WirelessSecurity *paren > g_assert (s_wireless_sec); > > g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-eap", NULL); >+ >+ /* Re-apply protocols and ciphers from original connection since >+ * ws_802_1x_fill_connection() clears them when recreating the wireless >+ * security setting. >+ */ >+ wireless_security_copy_proto_and_ciphers (sec->orig_wsec, s_wireless_sec); > } > > static void >@@ -106,6 +115,7 @@ ws_wpa_eap_new (const char *glade_file, > WirelessSecurityWPAEAP *sec; > GtkWidget *widget; > GladeXML *xml; >+ NMSettingWirelessSecurity *s_wsec; > > g_return_val_if_fail (glade_file != NULL, NULL); > >@@ -146,6 +156,10 @@ ws_wpa_eap_new (const char *glade_file, > is_editor); > auth_combo_changed_cb (widget, (gpointer) sec); > >+ s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY); >+ if (s_wsec) >+ sec->orig_wsec = (NMSettingWirelessSecurity *) nm_setting_duplicate (NM_SETTING (s_wsec)); >+ > return sec; > } > >diff -up NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-eap.h.foo NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-eap.h >--- NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-eap.h.foo 2012-06-21 12:40:45.693196543 -0500 >+++ NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-eap.h 2012-06-21 12:44:05.011947642 -0500 >@@ -23,10 +23,15 @@ > #ifndef WS_WPA_EAP_H > #define WS_WPA_EAP_H > >+#include <nm-setting-wireless-security.h> >+ > typedef struct { > struct _WirelessSecurity parent; > > GtkSizeGroup *size_group; >+ >+ /* Original wireless security setting to preserve protocols and ciphers */ >+ NMSettingWirelessSecurity *orig_wsec; > } WirelessSecurityWPAEAP; > > WirelessSecurityWPAEAP * ws_wpa_eap_new (const char *glade_file, >diff -up NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-psk.c.foo NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-psk.c >--- NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-psk.c.foo 2012-06-21 12:23:07.676235311 -0500 >+++ NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-psk.c 2012-06-21 13:07:05.637947858 -0500 >@@ -50,6 +50,8 @@ destroy (WirelessSecurity *parent) > { > WirelessSecurityWPAPSK *sec = (WirelessSecurityWPAPSK *) parent; > >+ if (sec->orig_wsec) >+ g_object_unref (sec->orig_wsec); > g_slice_free (WirelessSecurityWPAPSK, sec); > } > >@@ -97,6 +99,7 @@ add_to_size_group (WirelessSecurity *par > static void > fill_connection (WirelessSecurity *parent, NMConnection *connection) > { >+ WirelessSecurityWPAEAP *sec = (WirelessSecurityWPAEAP *) parent; > GtkWidget *widget; > const char *key; > NMSettingWireless *s_wireless; >@@ -135,9 +138,11 @@ fill_connection (WirelessSecurity *paren > } else { > g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-psk", NULL); > >- /* Just leave ciphers and protocol empty, the supplicant will >- * figure that out magically based on the AP IEs and card capabilities. >+ /* Re-apply protocols and ciphers from original connection since >+ * ws_802_1x_fill_connection() clears them when recreating the wireless >+ * security setting. > */ >+ wireless_security_copy_proto_and_ciphers (sec->orig_wsec, s_wireless_sec); > } > } > >diff -up NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-psk.h.foo NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-psk.h >--- NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-psk.h.foo 2012-06-21 12:47:18.323196770 -0500 >+++ NetworkManager-0.8.1/network-manager-applet-0.8.1/src/wireless-security/ws-wpa-psk.h 2012-06-21 12:47:37.142951297 -0500 >@@ -23,9 +23,13 @@ > #ifndef WS_WPA_PSK_H > #define WS_WPA_PSK_H > >+#include <nm-setting-wireless-security.h> >+ > typedef struct { > struct _WirelessSecurity parent; > >+ /* Original wireless security setting to preserve protocols and ciphers */ >+ NMSettingWirelessSecurity *orig_wsec; > } WirelessSecurityWPAPSK; > > WirelessSecurityWPAPSK * ws_wpa_psk_new (const char *glade_file,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 834349
:
593537
|
605730