netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Chapman <jchapman@katalix.com>
To: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Tom Parkin <tparkin@katalix.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Sumit Semwal <sumit.semwal@linaro.org>
Subject: Re: problems with L2TP
Date: Wed, 08 Jul 2015 11:02:27 +0100	[thread overview]
Message-ID: <559CF533.2060204@katalix.com> (raw)
In-Reply-To: <CAKaJLVss0SMqf5hcBCdBuwa7+3_iBh527DW4+2Vb-RUPcb9Ffg@mail.gmail.com>

On 06/07/15 17:16, Sam Protsenko wrote:
> Thanks for your reply, Tom!
>
>> 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

Tom and I discussed this and we're not clear what you are running. Have
you changed create_pppox() in mtpd with the code fragment from your
original mail? Are you sure that your modified mtpd gets the correct
local/remote tunnel-id and session-id to make its connect() call?

Use l2tp_debugfs to get information from debugfs about the l2tp state in
the kernel. Check that this matches what your app has configured.

Several open source projects use the l2tp driver so these might be
useful as a reference:

[a] pppd's pppol2tp plugin - http://download.samba.org/pub/ppp/
[b] accel-ppp - http://accel-ppp.org

-- 
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development

  reply	other threads:[~2015-07-08 10:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-03 13:49 problems with L2TP Sam Protsenko
2015-07-03 15:41 ` Tom Parkin
2015-07-06 16:16   ` Sam Protsenko
2015-07-08 10:02     ` James Chapman [this message]
2015-07-09  9:16       ` Sam Protsenko
2015-07-09 10:33         ` James Chapman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559CF533.2060204@katalix.com \
    --to=jchapman@katalix.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=semen.protsenko@linaro.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tparkin@katalix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).