Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755252AbbGFQQf (ORCPT ); Mon, 6 Jul 2015 12:16:35 -0400 Received: from mail-ie0-f172.google.com ([209.85.223.172]:35760 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754069AbbGFQQb (ORCPT ); Mon, 6 Jul 2015 12:16:31 -0400 MIME-Version: 1.0 In-Reply-To: <20150703154155.GA19294@jackdaw> References: <20150703154155.GA19294@jackdaw> Date: Mon, 6 Jul 2015 19:16:30 +0300 Message-ID: Subject: Re: problems with L2TP From: Sam Protsenko To: Tom Parkin Cc: James Chapman , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Sumit Semwal Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1875 Lines: 41 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/