From 4b305ccfee69b17251794e8158cecf838c9b38e9 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sat, 11 Oct 2008 14:44:45 +0000 Subject: [PATCH] 2008-10-11 Dan Williams * src/nm-openvpn-service-openvpn-helper.c - (main): handle route_vpn_gateway (requires NM svn r4169) (bgo #549196) git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4170 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- vpn-daemons/openvpn/ChangeLog | 5 +++++ .../openvpn/src/nm-openvpn-service-openvpn-helper.c | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/vpn-daemons/openvpn/ChangeLog b/vpn-daemons/openvpn/ChangeLog index 11e5b596a..149c4fa56 100644 --- a/vpn-daemons/openvpn/ChangeLog +++ b/vpn-daemons/openvpn/ChangeLog @@ -1,3 +1,8 @@ +2008-10-11 Dan Williams + + * src/nm-openvpn-service-openvpn-helper.c + - (main): handle route_vpn_gateway (requires NM svn r4169) (bgo #549196) + 2008-09-30 Dan Williams * properties/nm-openvpn-dialog.glade diff --git a/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c b/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c index f15262882..cba4514c1 100644 --- a/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c +++ b/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* nm-openvpn-service-openvpn-helper - helper called after OpenVPN established * a connection, uses DBUS to send information back to nm-openvpn-service * @@ -298,13 +298,18 @@ main (int argc, char *argv[]) config = g_hash_table_new (g_str_hash, g_str_equal); - /* Gateway */ + /* External world-visible VPN gateway */ val = addr_to_gvalue (getenv ("trusted_ip")); if (val) - g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_GATEWAY, val); + g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_EXT_GATEWAY, val); else helper_failed (connection, "VPN Gateway"); + /* Internal VPN subnet gateway */ + val = addr_to_gvalue (getenv ("route_vpn_gateway")); + if (val) + g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_INT_GATEWAY, val); + /* Tunnel device */ val = str_to_gvalue (getenv ("dev"), FALSE); if (val)