lkml.org 
[lkml]   [2015]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: problems with L2TP
From
Thanks for your reply, Tom!

> How is the tunnel/session being created on the server side?

My server is xl2tpd. If I understand correctly, session and tunnel are
being created in start_pppd() function, see [1].
Judging from xl2tpd logs (see [2]), start_pppd() function is executed,
in turn, from control_finish() (see [3]), when "c->msgtype" switch is
in "case ICCN:" (marked as "Incoming-Call-Connected" in log).
Tunnel ID and call ID for server side are generated in new_tunnel()
and new_call() functions, accordingly.
Tunnel ID and call ID for client side, I believe, are being received
from client in this code: [4] (see get_call() and get_tunnel()
functions calls).

> How are you deriving the session and tunnel IDs?

If you mean how they are generated at client side -- they are
basically random values (I'm using modified "mtpd" tool from Android):
- session ID -- see "local_session" variable at [5]
- tunnel ID -- see "local_tunnel" variable at [6].

I will try to play with tunnel_id/session_id values for both tunnel
and session sockets (in code from my first message) and see if it
helps.

Thanks!

References:

[1] https://github.com/xelerance/xl2tpd/blob/master/xl2tpd.c#L421
[2] xl2tpd log (with debug options enabled): http://pastebin.com/f0kfz37E
[3] https://github.com/xelerance/xl2tpd/blob/master/control.c#L998
[4] https://github.com/xelerance/xl2tpd/blob/master/network.c#L597
[5] https://android.googlesource.com/platform/external/mtpd/+/0269612ac00a0700997dda333faf0a3c33a388b8/l2tp.c#479
[6] https://android.googlesource.com/platform/external/mtpd/+/0269612ac00a0700997dda333faf0a3c33a388b8/l2tp.c#319


\
 
 \ /
  Last update: 2015-07-06 18:41    [W:0.057 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site