data->ipv4_gateway->vpn_phy_ip);
data->ipv4_gateway->active = TRUE;
+ DBG("set %p index %d vpn %s index %d phy %s",
+ data, data->index, data->ipv4_gateway->vpn_ip,
+ data->ipv4_gateway->vpn_phy_index,
+ data->ipv4_gateway->vpn_phy_ip);
+
__connman_service_indicate_default(data->service);
return;
data->ipv6_gateway->vpn_phy_ip);
data->ipv6_gateway->active = TRUE;
+ DBG("set %p index %d vpn %s index %d phy %s",
+ data, data->index, data->ipv6_gateway->vpn_ip,
+ data->ipv6_gateway->vpn_phy_index,
+ data->ipv6_gateway->vpn_phy_ip);
+
__connman_service_indicate_default(data->service);
return;
data->ipv4_gateway->vpn_ip);
data->ipv4_gateway->active = FALSE;
+ DBG("unset %p index %d vpn %s index %d phy %s",
+ data, data->index, data->ipv4_gateway->vpn_ip,
+ data->ipv4_gateway->vpn_phy_index,
+ data->ipv4_gateway->vpn_phy_ip);
+
return;
}
data->ipv6_gateway->vpn_ip);
data->ipv6_gateway->active = FALSE;
+ DBG("unset %p index %d vpn %s index %d phy %s",
+ data, data->index, data->ipv6_gateway->vpn_ip,
+ data->ipv6_gateway->vpn_phy_index,
+ data->ipv6_gateway->vpn_phy_ip);
+
return;
}
if (found == NULL || data->order > order) {
found = data;
order = data->order;
+
+ DBG("default %p order %d", found, order);
}
}
index = __connman_service_get_index(service);
- DBG("service %p index %d gateway %s vpn ip %s type %d",
- service, index, gateway, peer, type);
-
/*
* If gateway is NULL, it's a point to point link and the default
* gateway for ipv4 is 0.0.0.0 and for ipv6 is ::, meaning the
if (gateway == NULL && type == CONNMAN_IPCONFIG_TYPE_IPV6)
gateway = "::";
+ DBG("service %p index %d gateway %s vpn ip %s type %d",
+ service, index, gateway, peer, type);
+
active_gateway = find_active_gateway();
new_gateway = add_gateway(service, index, gateway, type);
if (new_gateway == NULL)
return -EINVAL;
+ DBG("active %p index %d new %p", active_gateway,
+ active_gateway ? active_gateway->index : -1, new_gateway);
+
if (type == CONNMAN_IPCONFIG_TYPE_IPV6 &&
new_gateway->ipv6_gateway != NULL &&
g_strcmp0(new_gateway->ipv6_gateway->gateway,
active_gateway->index;
}
+ DBG("vpn %s phy %s index %d",
+ new_gateway->ipv4_gateway->vpn_ip,
+ new_gateway->ipv4_gateway->vpn_phy_ip,
+ new_gateway->ipv4_gateway->vpn_phy_index);
+
} else if (type == CONNMAN_IPCONFIG_TYPE_IPV6 &&
new_gateway->ipv6_gateway != NULL) {
new_gateway->ipv6_gateway->vpn = TRUE;
new_gateway->ipv6_gateway->vpn_phy_index =
active_gateway->index;
}
+
+ DBG("vpn %s phy %s index %d",
+ new_gateway->ipv6_gateway->vpn_ip,
+ new_gateway->ipv6_gateway->vpn_phy_ip,
+ new_gateway->ipv6_gateway->vpn_phy_index);
}
} else {
if (type == CONNMAN_IPCONFIG_TYPE_IPV4 &&
default_gateway = find_default_gateway();
+ DBG("active %p default %p", active_gateway, default_gateway);
+
if (active_gateway && active_gateway != default_gateway) {
updated = TRUE;