[network-manager-fortisslvpn] service: use the gateway address for routes without a gateway
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-fortisslvpn] service: use the gateway address for routes without a gateway
- Date: Sat, 3 Oct 2015 15:47:37 +0000 (UTC)
commit 8b20e3ad28376cd99062f4c34d4fee3f81253837
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Tue Sep 29 15:17:57 2015 +0200
service: use the gateway address for routes without a gateway
This may happen with FortiOS 4 servers, where the client only learns the
peer address from the PPP traffic, after routes are discovered and pppd
is spawned.
src/nm-fortisslvpn-pppd-plugin.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/nm-fortisslvpn-pppd-plugin.c b/src/nm-fortisslvpn-pppd-plugin.c
index 06c1aac..8158302 100644
--- a/src/nm-fortisslvpn-pppd-plugin.c
+++ b/src/nm-fortisslvpn-pppd-plugin.c
@@ -126,7 +126,7 @@ nm_phasechange (void *data, int arg)
}
static GVariant *
-get_ip4_routes (void)
+get_ip4_routes (in_addr_t ouraddr)
{
GVariantBuilder builder;
GVariant *value;
@@ -160,7 +160,7 @@ get_ip4_routes (void)
str = g_getenv (var);
g_free (var);
if (!str || !*str)
- gateway = 0;
+ gateway = ouraddr;
else
gateway = inet_addr (str);
@@ -223,7 +223,7 @@ nm_ip_up (void *data, int arg)
g_warning ("nm-fortisslvpn-ppp-plugin: (%s): no external gateway!", __func__);
}
- val = get_ip4_routes ();
+ val = get_ip4_routes (opts.ouraddr);
if (val)
g_variant_builder_add (&builder, "{sv}", NM_VPN_PLUGIN_IP4_CONFIG_ROUTES, val);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]