summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/networkmanager/files/networkmanager-0.8.2-shared-connection.patch')
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.8.2-shared-connection.patch45
1 files changed, 38 insertions, 7 deletions
diff --git a/net-misc/networkmanager/files/networkmanager-0.8.2-shared-connection.patch b/net-misc/networkmanager/files/networkmanager-0.8.2-shared-connection.patch
index a9e9705..541fb7f 100644
--- a/net-misc/networkmanager/files/networkmanager-0.8.2-shared-connection.patch
+++ b/net-misc/networkmanager/files/networkmanager-0.8.2-shared-connection.patch
@@ -1,17 +1,17 @@
-From 765cf2873a92bc83ce35f965e0ccf8bc5dcff6e8 Mon Sep 17 00:00:00 2001
+From 708f212d1321bc9df4461054b9f8d4f5edcdc560 Mon Sep 17 00:00:00 2001
From: Mu Qiao <qiaomuf@gentoo.org>
Date: Wed, 5 Jan 2011 13:30:08 +0800
Subject: [PATCH] Support shared and link-local method for ipv4
Signed-off-by: Mu Qiao <qiaomuf@gentoo.org>
---
- system-settings/plugins/ifnet/connection_parser.c | 55 ++++++++++++++++----
- system-settings/plugins/ifnet/net_utils.c | 4 ++
+ system-settings/plugins/ifnet/connection_parser.c | 64 +++++++++++++++-----
+ system-settings/plugins/ifnet/net_utils.c | 4 +
.../plugins/ifnet/nm-ifnet-connection.c | 8 ++-
- 3 files changed, 53 insertions(+), 14 deletions(-)
+ 3 files changed, 58 insertions(+), 18 deletions(-)
diff --git a/system-settings/plugins/ifnet/connection_parser.c b/system-settings/plugins/ifnet/connection_parser.c
-index f9fae51..07fb511 100644
+index f9fae51..32fa6f6 100644
--- a/system-settings/plugins/ifnet/connection_parser.c
+++ b/system-settings/plugins/ifnet/connection_parser.c
@@ -557,7 +557,7 @@ make_ip4_setting (NMConnection * connection, gchar * conn_name, GError ** error)
@@ -89,7 +89,38 @@ index f9fae51..07fb511 100644
/* Finally add setting to connection */
nm_connection_add_setting (connection, NM_SETTING (ip4_setting));
}
-@@ -2443,8 +2472,12 @@ write_ip4_setting (NMConnection * connection, gchar * conn_name,
+@@ -1243,10 +1272,10 @@ parse_wpa_psk (gchar * psk, GError ** error)
+ * the passphrase contains spaces.
+ */
+
+- p = psk;
+- if (p[0] == '"' && psk[strlen (psk) - 1] == '"')
++ p = g_strdup (psk);
++ if (p[0] == '"' && p[strlen (p) - 1] == '"')
+ quoted = TRUE;
+- if (!quoted && (strlen (psk) == 64)) {
++ if (!quoted && (strlen (p) == 64)) {
+ /* Verify the hex PSK; 64 digits */
+ if (!is_hex (p)) {
+ g_set_error (error, ifnet_plugin_error_quark (),
+@@ -1254,7 +1283,7 @@ parse_wpa_psk (gchar * psk, GError ** error)
+ "Invalid WPA_PSK (contains non-hexadecimal characters)");
+ goto out;
+ }
+- hashed = g_strdup (psk);
++ hashed = g_strdup (p);
+ } else {
+ strip_string (p, '"');
+
+@@ -1276,6 +1305,7 @@ parse_wpa_psk (gchar * psk, GError ** error)
+ }
+
+ out:
++ g_free (p);
+ return hashed;
+ }
+
+@@ -2443,8 +2473,12 @@ write_ip4_setting (NMConnection * connection, gchar * conn_name,
}
ifnet_set_data (conn_name, "config", ips->str);
g_string_free (ips, TRUE);
@@ -142,5 +173,5 @@ index e47495c..ebe2581 100644
NM_IFNET_CONNECTION_CONN_NAME,
conn_name, NULL);
--
-1.7.2.2
+1.7.3.4