From: Patrik Flykt <[email protected]>
Hi,
Here is a second attempt on session VPN support. It's not that much about
VPNs, it's almost all about selecting a better service if one is available
for the session. So if a session requests [wlan cellular] as bearer types
where initially only cellular is available, the idea is to switch over to
wlan when one becomes availble. The current code is happily camping in
cellular, it seems.
If the code is updated so that VPN has the highest priority of the bearers,
the VPN should be selected when it becomes available or at the start when
there is another service with a real network connection.
The patches do the following things:
- 1/4 tries to update the session to a "better" service if the service
selected was not first in the session sequence
- 2/4 Avoids VPNs until the session becomes online. Requiring sessions to
declare AllowedBearers to have non-VPN services in order to become connected
was the easiest way out of the selection process. Thus a session that wants
a VPN would need to specify AllowedBearers as [vpn, *].
- 3/4 Sets VPNs to be sorted first
- 4/4 Sets session info to FALSE if the associated service got deleted. This
is a bug and can be send/applied independently
This patch set will still send unnecessary updates about the '*' bearers, a
next step would be to eliminate those.
Instead of selecting a generic "better" bearer, patch 1/4 can be changed to
react on VPNs only.
I had some difficulty testing the update of AllowedBearers, something is not
happening or then it works ok but isn't verbal about it.
Last but not least: I don't see any evidence of services being shut down even
if the session selects another service. This might lead to a
session->vpn_service dependign on the intended behavior.
As a next step I'm trying to get a better understanding how the Session API
behaves from a client point of viev.
Comments?
Patrik
Patrik Flykt (4):
session: Track whether a session is using the best service
session: Do not connect VPN service unless session is online
session: Highest weight for VPN service type
session: Set session->online to FALSE when service is deleted
src/session.c | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 deletions(-)
--
1.7.2.5
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman