mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-26 00:20:31 +01:00
2007-09-27 Dan Williams <dcbw@redhat.com>
* src/nm-vpnc-service-vpnc-helper.c - (addr_list_to_gvalue): list should contain straight guint32s, not GValues containing guint32s - (main): For Cisco/vpnc, the IP4 PTP address needs to be the same as the internal IP4 address git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2904 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
010fc5f3ea
commit
be5c97e72f
2 changed files with 19 additions and 4 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2007-09-27 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/nm-vpnc-service-vpnc-helper.c
|
||||
- (addr_list_to_gvalue): list should contain straight guint32s, not
|
||||
GValues containing guint32s
|
||||
- (main): For Cisco/vpnc, the IP4 PTP address needs to be the same as
|
||||
the internal IP4 address
|
||||
|
||||
2007-09-27 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/nm-vpnc-service.c
|
||||
|
|
|
|||
|
|
@ -149,12 +149,12 @@ addr_list_to_gvalue (const char *str)
|
|||
if (g_strv_length (split) == 0)
|
||||
return NULL;
|
||||
|
||||
array = g_array_sized_new (FALSE, TRUE, sizeof (GValue *), g_strv_length (split));
|
||||
array = g_array_sized_new (FALSE, TRUE, sizeof (guint32), g_strv_length (split));
|
||||
for (i = 0; split[i]; i++) {
|
||||
GValue * addr_val = addr_to_gvalue (split[i]);
|
||||
struct in_addr addr;
|
||||
|
||||
if (addr_val) {
|
||||
g_array_append_val (array, addr_val);
|
||||
if (inet_aton (split[i], &addr)) {
|
||||
g_array_append_val (array, addr.s_addr);
|
||||
} else {
|
||||
g_strfreev (split);
|
||||
g_array_free (array, TRUE);
|
||||
|
|
@ -231,6 +231,13 @@ main (int argc, char *argv[])
|
|||
else
|
||||
helper_failed (connection, "IP4 Address");
|
||||
|
||||
/* PTP address; for vpnc PTP address == internal IP4 address */
|
||||
val = addr_to_gvalue (getenv ("INTERNAL_IP4_ADDRESS"));
|
||||
if (val)
|
||||
g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_PTP, val);
|
||||
else
|
||||
helper_failed (connection, "IP4 PTP Address");
|
||||
|
||||
/* Netmask */
|
||||
val = addr_to_gvalue (getenv ("INTERNAL_IP4_NETMASK"));
|
||||
if (val)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue