Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-11 Thread odobryabov
No, sorry, it asks. If "Hello" is: pppol2tp: input packet, len=20, tunnel=53427, session=0, ns=2, nr=4 Data input: c8 02 00 14 d0 b3 00 00 00 02 00 04 80 08 00 00 00 00 00 06 than in pppol2tp_udp_send: UDP send: c8 02 00 0c 76 c4 00 00 00 03 00 03 -- View this message in context:

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-11 Thread odobryabov
But if server requests with ns=2, nr=4, why LwIP responds with ns=3, nr=3? nsnr Data input: c8 02 00 14 d0 b3 00 00 [00 02] [00 04] 80 08 00 00 00 00 00 06 UDP send: c8 02 00 0c 76 c4 00 00 [00 03] [00 03] -- View this message

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-11 Thread odobryabov
Sequence number is losted somewhere... I put l2tp->our_ns = l2tp->peer_nr at the start of pppol2tp_input and now it works without interruptions. But still no any ping through VPN server from Windows client to the device with LwIP, only to static ip of the device. -- View this message in

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-09 Thread odobryabov
Hi Sylvain Rochet wrote > Could you try replacing > > if (l2tp->iccn_retried >= PPPOL2TP_MAXICCN) { > pppol2tp_abort_connect(l2tp); > return; > } > > by > > if (l2tp->iccn_retried >= PPPOL2TP_MAXICCN) { > PPPDEBUG(LOG_DEBUG, ("pppol2tp: reached max

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-14 Thread odobryabov
We tried to connect to MicroTik L2tp server and it works perfect with ping and HTML and everything else. Super! We think that was an additional (and probably wrong) ZLB packet from the server after ICRP message. We tried to change that "special case" like this: /* Handle the special case of

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-14 Thread odobryabov
We tried to connect to MicroTik L2tp server and it works perfect with ping and HTML and everything else. Super! We think that was an additional (and probably wrong) ZLB packet from the server after ICRP message. We tried to change that "special case" like this: /* Handle the special case of

Re: [lwip-users] lwip2.0.2 l2tp question

2017-06-30 Thread odobryabov
We don't use IPSec on our server. I also turned on udp and IP debug. Logs of these frames: udp_input: received datagram of length 28 UDP header: +---+ | 1701 | 49154 | (src port, dest port) +---+ |28 | 0x

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-02 Thread odobryabov
Here is a log with PRINTPKT_SUPPORT and PPP_PROTOCOLNAME: ppp phase changed[1]: phase=0 ppp_connect[1]: holdoff=0 ppp phase changed[1]: phase=3 pppol2tp: input packet, len=107, tunnel=53427, session=0, ns=0, nr=1 pppol2tp: Assigned tunnel ID 42226 pppol2tp: input packet, len=12, tunnel=53427,

[lwip-users] lwip2.0.2 l2tp question

2017-06-29 Thread odobryabov
Hi everybody! Could you help with l2tp initialisation. I got an ip from VPN-server but I can't ping my device with lwip stack. VPN-server settings: ip: 192.168.15.2 inner ip: 172.16.200.1 clients ip range: 172.16.200.5-172.16.200.20 mtu\rtu: auto Initialisation: #define VPN_IP_ADDR0

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-05 Thread odobryabov
I paisted some printf-s in ppp_input printf("Data hex: "); uint8_t* a = (uint8_t*)pb->payload; for(uint8_t i=0; i < pb->len; i++) { printf("%02x ", a[i]); } printf("\n"); Now I have a bytes picture: Data hex: 01 02 00 0f 03 05 c2

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-05 Thread odobryabov
And if move that printf in l2tp_input with other debug information (sometimes Data hex: doesn't work): ppp phase changed[1]: phase=0 ppp_connect[1]: holdoff=0 ppp phase changed[1]: phase=3 pppol2tp: input packet, len=107, tunnel=47089, session=0, ns=0, nr=1 Data hex: 80 08 00 00 00 00 00 02 80 08

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-07 Thread odobryabov
Yes, you are right, these are just echo requests and replies: ppp phase changed[1]: phase=10 pppol2tp: input packet, len=0, tunnel=21944, session=8324, ns=0, nr=0 rcvd [LCP EchoReq id=0x1 magic=0x5e33e1ff] sent [LCP EchoRep id=0x1 magic=0xb4b7bbcf] pppol2tp: input packet, len=0, tunnel=21944,