projects
/
platform
/
upstream
/
connman.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 1.38
[platform/upstream/connman.git]
/
src
/
connection.c
diff --git
a/src/connection.c
b/src/connection.c
index
7a1fbce
..
303e992
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-234,6
+234,15
@@
static void set_vpn_routes(struct gateway_data *new_gateway,
if (!active_gateway->ipv4_gateway)
return;
if (!active_gateway->ipv4_gateway)
return;
+
+ /*
+ * If VPN server is on same subnet as we are, skip adding
+ * route.
+ */
+ if (connman_inet_compare_subnet(active_gateway->index,
+ gateway))
+ return;
+
DBG("active gw %s", active_gateway->ipv4_gateway->gateway);
if (g_strcmp0(active_gateway->ipv4_gateway->gateway,
DBG("active gw %s", active_gateway->ipv4_gateway->gateway);
if (g_strcmp0(active_gateway->ipv4_gateway->gateway,
@@
-250,6
+259,10
@@
static void set_vpn_routes(struct gateway_data *new_gateway,
if (!active_gateway->ipv6_gateway)
return;
if (!active_gateway->ipv6_gateway)
return;
+ if (connman_inet_compare_ipv6_subnet(active_gateway->index,
+ gateway))
+ return;
+
DBG("active gw %s", active_gateway->ipv6_gateway->gateway);
if (g_strcmp0(active_gateway->ipv6_gateway->gateway,
DBG("active gw %s", active_gateway->ipv6_gateway->gateway);
if (g_strcmp0(active_gateway->ipv6_gateway->gateway,
@@
-958,7
+971,7
@@
void __connman_connection_gateway_remove(struct connman_service *service,
data->ipv6_gateway, do_ipv6);
/* with vpn this will be called after the network was deleted,
data->ipv6_gateway, do_ipv6);
/* with vpn this will be called after the network was deleted,
- * we need to call set_default here because we will not rec
ie
ve any
+ * we need to call set_default here because we will not rec
ei
ve any
* gateway delete notification.
* We hit the same issue if remove_gateway() fails.
*/
* gateway delete notification.
* We hit the same issue if remove_gateway() fails.
*/