Hi Patrik

Sorry for the late response. Lot's going on :)

On Fri, Jul 15, 2011 at 03:13:14PM +0300, [email protected] wrote:
> 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.

Yes, switching to the best available service wan't yet implement :)

> 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.

Okay, sounds reasonable.

> 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.

I have started to add unit tests to get a more stable API there. You
might want also to add some tests (if this is possible).
 
> 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.

Hmm, maybe we should soon merge the ref counting patches :)

> As a next step I'm trying to get a better understanding how the Session API
> behaves from a client point of viev.

Great and I would really love to get unit tests.

cheers,
daniel
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to