If you want here is a patch.
t.
Tomas Kovacik wrote:
> Hi,
>
> today I try static key openvpn configuration, and i have some problems
> with setup.
>
> Oct 30 12:01:20 das NetworkManager:
> nm_vpn_connection_connect_cb(): VPN connection 'static key' failed to
> connect: 'Missing required local IP address for static key
> mode.'.
> ...
> Oct 30 12:02:13 das NetworkManager:
> nm_vpn_connection_connect_cb(): VPN connection 'static key' failed to
> connect: 'Missing required remote IP address for static key mode.'.
>
> Openvpn service(?) expect local-ip and remote-ip keys:
>
> I try put in field "Local IP Adress" values:
> 10.0.0.2 10.0.0.1
> 10.0.0.2, 10.0.0.1
> 10.0.0.2
> nothing works, also there is no tooltip or help with usefull
> information, so i look at source and put these keys in Gconf, then
> static key work also via openvpn plugin.
>
> What do I wrong?
>
> t.
>
> (sorry for my english)
>
>
> ___
> NetworkManager-list mailing list
> NetworkManager-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
>
diff -ur network-manager-openvpn-0.7~~svn20081015t024626/properties/auth-helpers.c network-manager-openvpn-0.7~~svn20081015t024626.static/properties/auth-helpers.c
--- network-manager-openvpn-0.7~~svn20081015t024626/properties/auth-helpers.c 2008-10-02 21:41:09.0 +0200
+++ network-manager-openvpn-0.7~~svn20081015t024626.static/properties/auth-helpers.c 2008-10-30 18:10:13.132375413 +0100
@@ -301,6 +301,16 @@
if (value && strlen (value))
gtk_entry_set_text (GTK_ENTRY (widget), value);
}
+
+widget = glade_xml_get_widget (xml, "sk_remote_address_entry");
+gtk_size_group_add_widget (group, widget);
+g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (changed_cb), user_data);
+if (s_vpn && s_vpn->data) {
+value = g_hash_table_lookup (s_vpn->data, NM_OPENVPN_KEY_REMOTE_IP);
+if (value && strlen (value))
+gtk_entry_set_text (GTK_ENTRY (widget), value);
+}
+
}
static gboolean
@@ -415,6 +425,17 @@
NM_OPENVPN_KEY_LOCAL_IP);
return FALSE;
}
+
+widget = glade_xml_get_widget (xml, "sk_remote_address_entry");
+str = gtk_entry_get_text (GTK_ENTRY (widget));
+if (!str || !strlen (str)) {
+g_set_error (error,
+ OPENVPN_PLUGIN_UI_ERROR,
+ OPENVPN_PLUGIN_UI_ERROR_INVALID_PROPERTY,
+ NM_OPENVPN_KEY_REMOTE_IP);
+return FALSE;
+}
+
} else
g_assert_not_reached ();
@@ -487,6 +508,7 @@
GtkTreeModel *model;
GtkTreeIter iter;
GtkWidget *widget;
+ const char *value;
if (!strcmp (contype, NM_OPENVPN_CONTYPE_TLS)) {
update_tls (xml, "tls", s_vpn);
@@ -511,6 +527,25 @@
g_free (tmp);
}
}
+
+ widget = glade_xml_get_widget (xml, "sk_local_address_entry");
+value = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
+
+if (value && strlen (value)) {
+ g_hash_table_insert (s_vpn->data,
+ g_strdup (NM_OPENVPN_KEY_LOCAL_IP),
+ g_strdup (value));
+}
+
+widget = glade_xml_get_widget (xml, "sk_remote_address_entry");
+value = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
+
+if (value && strlen (value)) {
+ g_hash_table_insert (s_vpn->data,
+ g_strdup (NM_OPENVPN_KEY_REMOTE_IP),
+ g_strdup (value));
+}
+
} else
g_assert_not_reached ();
diff -ur network-manager-openvpn-0.7~~svn20081015t024626/properties/nm-openvpn-dialog.glade network-manager-openvpn-0.7~~svn20081015t024626.static/properties/nm-openvpn-dialog.glade
--- network-manager-openvpn-0.7~~svn20081015t024626/properties/nm-openvpn-dialog.glade 2008-10-02 21:41:09.0 +0200
+++ network-manager-openvpn-0.7~~svn20081015t024626.static/properties/nm-openvpn-dialog.glade 2008-10-30 18:28:00.468406458 +0100
@@ -610,7 +610,7 @@
True
-4
+5
2
6
6
@@ -729,6 +729,36 @@
+
+
+True
+Remote IP Address:
+
+
+