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 the ICCN acknowledge */ 
  if (l2tp->phase == PPPOL2TP_STATE_ICCN_SENT && l2tp->peer_nr >
l2tp->our_ns) { 
  l2tp->phase = PPPOL2TP_STATE_DATA; 
  *l2tp->our_ns++;*
  } 

Connection doesn't interrupt now, but neither ping nor HTML. 

So, we don't know why. But, ok, we continue working with MicroTik :)



--
View this message in context: 
http://lwip.100.n7.nabble.com/lwip2-0-2-l2tp-question-tp30013p30135.html
Sent from the lwip-users mailing list archive at Nabble.com.

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


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 the ICCN acknowledge */
  if (l2tp->phase == PPPOL2TP_STATE_ICCN_SENT && l2tp->peer_nr >
l2tp->our_ns) {
  l2tp->phase = PPPOL2TP_STATE_DATA;
 * l2tp->our_ns++;*
  }

Connection doesn't interrupt now, but neither ping nor HTML.

So, we don't know why. But, ok, we continue working with MicroTik :)



--
View this message in context: 
http://lwip.100.n7.nabble.com/lwip2-0-2-l2tp-question-tp30013p30134.html
Sent from the lwip-users mailing list archive at Nabble.com.

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


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 context: 
http://lwip.100.n7.nabble.com/lwip2-0-2-l2tp-question-tp30013p30113.html
Sent from the lwip-users mailing list archive at Nabble.com.

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


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 in context: 
http://lwip.100.n7.nabble.com/lwip2-0-2-l2tp-question-tp30013p30112.html
Sent from the lwip-users mailing list archive at Nabble.com.

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


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: 
http://lwip.100.n7.nabble.com/lwip2-0-2-l2tp-question-tp30013p30111.html
Sent from the lwip-users mailing list archive at Nabble.com.

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


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 ICCN"));
>   l2tp->phase = PPPOL2TP_STATE_DATA;
> return;
>   }

I tryed, but nothing changed. I put some debug below:

case PPPOL2TP_STATE_INITIAL:
PPPDEBUG(LOG_DEBUG, ("pppol2tp: timeout in PPPOL2TP_STATE_INITIAL\n"));
break;
case PPPOL2TP_STATE_DATA:
PPPDEBUG(LOG_DEBUG, ("pppol2tp: timeout in PPPOL2TP_STATE_DATA\n"));
break;

and it shows:
pppol2tp: timeout
pppol2tp: timeout in PPPOL2TP_STATE_DATA



--
View this message in context: 
http://lwip.100.n7.nabble.com/lwip2-0-2-l2tp-question-tp30013p30102.html
Sent from the lwip-users mailing list archive at Nabble.com.

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


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

2017-07-07 Thread Sylvain Rochet
Hi,

On Thu, Jul 06, 2017 at 11:10:41PM -0700, odobryabov wrote:
> 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, session=8324, ns=0, nr=0
> rcvd [LCP EchoReq id=0x2 magic=0x5e33e1ff]
> sent [LCP EchoRep id=0x2 magic=0xb4b7bbcf]
> pppol2tp: input packet, len=0, tunnel=21944, session=8324, ns=0, nr=0
> rcvd [LCP EchoReq id=0x3 magic=0x5e33e1ff]
> sent [LCP EchoRep id=0x3 magic=0xb4b7bbcf]
> pppol2tp: input packet, len=0, tunnel=21944, session=8324, ns=0, nr=0
> rcvd [LCP EchoReq id=0x4 magic=0x5e33e1ff]
> sent [LCP EchoRep id=0x4 magic=0xb4b7bbcf]
> .
> pppol2tp: input packet, len=20, tunnel=21944, session=0, ns=2, nr=4
> pppol2tp: input packet, len=20, tunnel=21944, session=0, ns=2, nr=4

That's a clue, L2TP session is restarted here in the middle of perfectly 
working LCP probes.


> .
> pppol2tp: input packet, len=0, tunnel=21944, session=8324, ns=0, nr=0
> rcvd [LCP EchoReq id=0x1c magic=0x5e33e1ff]
> sent [LCP EchoRep id=0x1c magic=0xb4b7bbcf]
> pppol2tp: input packet, len=45, tunnel=21944, session=0, ns=3, nr=4
> pppol2tp: input packet, len=0, tunnel=21944, session=8324, ns=0, nr=0
> rcvd [LCP TermReq id=0x3 "User request"]
> LCP terminated by peer (User request)
> 
> May be the problem is in that timeout message:
> 
> pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0 
> rcvd [LCP ConfReq id=0x2  ] 
> sent [LCP ConfAck id=0x2  ] 
> pppol2tp: timeout 
> sent [LCP ConfReq id=0x5  ] 
> pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0 
> rcvd [LCP ConfAck id=0x5  ] 
> netif_set_mtu[1]: mtu=1450 
> ppp_send_config[1] 
> ppp_recv_config[1]
> 

> But if LwIP reached running phase, doesn't it mean l2tp initialisation was
> clear (even with that timeout)?

That's strange indeed, it looks like your L2TP server is not sending a 
packet acknowledging the ICCN packet (any packet with peer nr greater 
than our ns).

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 ICCN"));
l2tp->phase = PPPOL2TP_STATE_DATA;
return;
  }


Sylvain


signature.asc
Description: Digital signature
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

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, session=8324, ns=0, nr=0
rcvd [LCP EchoReq id=0x2 magic=0x5e33e1ff]
sent [LCP EchoRep id=0x2 magic=0xb4b7bbcf]
pppol2tp: input packet, len=0, tunnel=21944, session=8324, ns=0, nr=0
rcvd [LCP EchoReq id=0x3 magic=0x5e33e1ff]
sent [LCP EchoRep id=0x3 magic=0xb4b7bbcf]
pppol2tp: input packet, len=0, tunnel=21944, session=8324, ns=0, nr=0
rcvd [LCP EchoReq id=0x4 magic=0x5e33e1ff]
sent [LCP EchoRep id=0x4 magic=0xb4b7bbcf]
.
pppol2tp: input packet, len=20, tunnel=21944, session=0, ns=2, nr=4
pppol2tp: input packet, len=20, tunnel=21944, session=0, ns=2, nr=4
.
pppol2tp: input packet, len=0, tunnel=21944, session=8324, ns=0, nr=0
rcvd [LCP EchoReq id=0x1c magic=0x5e33e1ff]
sent [LCP EchoRep id=0x1c magic=0xb4b7bbcf]
pppol2tp: input packet, len=45, tunnel=21944, session=0, ns=3, nr=4
pppol2tp: input packet, len=0, tunnel=21944, session=8324, ns=0, nr=0
rcvd [LCP TermReq id=0x3 "User request"]
LCP terminated by peer (User request)

May be the problem is in that timeout message:

pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0 
rcvd [LCP ConfReq id=0x2  ] 
sent [LCP ConfAck id=0x2  ] 
pppol2tp: timeout 
sent [LCP ConfReq id=0x5  ] 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0 
rcvd [LCP ConfAck id=0x5  ] 
netif_set_mtu[1]: mtu=1450 
ppp_send_config[1] 
ppp_recv_config[1]

But if LwIP reached running phase, doesn't it mean l2tp initialisation was
clear (even with that timeout)?

May be this is wrong configure on VPN-server? But that is a quite simple, I
connected to it successfully using Windows VPN-client. Server configure:
 
 



--
View this message in context: 
http://lwip.100.n7.nabble.com/lwip2-0-2-l2tp-question-tp30013p30094.html
Sent from the lwip-users mailing list archive at Nabble.com.

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


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

2017-07-06 Thread Sylvain Rochet
Hi,

On Wed, Jul 05, 2017 at 09:02:02PM -0700, odobryabov wrote:
> 
> (...)
> 
> pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
> Data hex: ff 03 c0 21 09 1c 00 08 d9 bb 4b cc 
  ^
  LCP
^^
Echo Request
   ^^
   ID
  ^
  Len
^^^
Magic

Why are there so much LCP packets once the session is established ?

It looks like the remote device is sending a lot of LCP echo request 
packets but that shouldn't be a problem.

Could you disable filters (at least LCP) in the ppp_dump_packet() 
function ? This way we will have packet dump of both rx and tx side.

Sylvain


signature.asc
Description: Digital signature
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

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 00 00 00 02 01 00 80 0a 00 00 00 03
00 00 00 03 80 0a 00 00 00 04 00 00 00 00 00 08 00 00 00 06 06 90 80 10 00
00 00 07 57 69 76 65 2d 4e 47 2d 4d 54 00 13 00 00 00 08 78 65 6c 65 72 61
6e 63 65 2e 63 6f 6d 80 08 00 00 00 09 42 58 80 08 00 00 00 0a 00 08 
pppol2tp: Assigned tunnel ID 16984
pppol2tp: input packet, len=12, tunnel=47089, session=0, ns=1, nr=2
Data hex: 
pppol2tp: input packet, len=28, tunnel=47089, session=35933, ns=1, nr=3
Data hex: 80 08 00 00 00 00 00 0b 80 08 00 00 00 0e cc 3b 
pppol2tp: Assigned session ID 52283
ppp_start[1]
ppp phase changed[1]: phase=6
ppp_send_config[1]
ppp_recv_config[1]
ppp: auth protocols: PAP=0 CHAP=1 CHAP_MD5=0 CHAP_MS=0 CHAP_MS2=1
sent [LCP ConfReq id=0x5  ]
ppp_start[1]: finished
pppol2tp: input packet, len=12, tunnel=47089, session=0, ns=2, nr=3
Data hex: 
pppol2tp: input packet, len=12, tunnel=47089, session=35933, ns=2, nr=4
Data hex: 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 01 01 00 15 02 06 00 00 00 00 03 05 c2 23 81 05 06 d9
bb 4b cc 
rcvd [LCP ConfReq id=0x1   ]
sent [LCP ConfRej id=0x1 ]
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 01 02 00 0f 03 05 c2 23 81 05 06 d9 bb 4b cc 
rcvd [LCP ConfReq id=0x2  ]
sent [LCP ConfAck id=0x2  ]
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 01 02 00 0f 03 05 c2 23 81 05 06 d9 bb 4b cc 
rcvd [LCP ConfReq id=0x2  ]
sent [LCP ConfAck id=0x2  ]
pppol2tp: timeout
sent [LCP ConfReq id=0x5  ]
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 02 05 00 0e 01 04 05 aa 05 06 da dc df cd 
rcvd [LCP ConfAck id=0x5  ]
netif_set_mtu[1]: mtu=1450
ppp_send_config[1]
ppp_recv_config[1]
ppp phase changed[1]: phase=7
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 09 00 00 08 d9 bb 4b cc 
rcvd [LCP EchoReq id=0x0 magic=0xd9bb4bcc]
sent [LCP EchoRep id=0x0 magic=0xdadcdfcd]
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c2 23 01 0b 00 1f 10 d8 ac ec 33 75 1d 9a 30 c5 40 4e 06 64
98 43 fc 57 69 76 65 2d 4e 47 2d 4d 54 
rcvd [CHAP Challenge id=0xb , name =
"Wive-NG-MT"]
sent [CHAP Response id=0xb
<485cbfdb8233c4342d830600464c5e535eeef50fa99f0ed96b9049d96063aae4884e011953dc6d5800>,
name = "test2"]
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c2 23 03 0b 00 3f 53 3d 31 38 45 34 31 30 42 34 42 44 35 33
38 45 35 42 38 30 45 42 46 34 42 44 35 46 35 33 30 34 38 32 38 44 42 30 39
33 43 43 20 4d 3d 41 63 63 65 73 73 20 67 72 61 6e 74 65 64 
rcvd [CHAP Success id=0xb "S=18E410B4BD538E5B80EBF4BD5F5304828DB093CC
M=Access granted"]
CHAP authentication succeeded
ppp phase changed[1]: phase=9
sent [IPCP ConfReq id=0x9 ]
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 80 21 01 01 00 0a 03 06 ac 10 c8 01 
rcvd [IPCP ConfReq id=0x1 ]
sent [IPCP ConfAck id=0x1 ]
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 80 21 03 09 00 0a 03 06 ac 10 c8 05 
rcvd [IPCP ConfNak id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
Data hex: ff 03 80 21 02 02 00 0a 03 06 ac 10 c8 05 
rcvd [IPCP ConfAck id=0x2 ]
sent [IPCP ConfReq id=0x6 ] 
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0 
Data hex:
rcvd [IPCP ConfAck id=0x6 ] 
sifvjcomp[1]: VJ compress enable=0 slot=0 max slot=0
sifup[1]: err_code=0
local  IP address 172.16.200.5
remote IP address 172.16.200.1
ppp phase changed[1]: phase=10
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 09 01 00 08 d9 bb 4b cc 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 09 02 00 08 d9 bb 4b cc 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 09 03 00 08 d9 bb 4b cc 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Da hex: ff 03 c0 21 09 04 00 08 d9 bb 4b cc 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 09 05 00 08 d9 bb 4b cc 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 09 06 00 08 d9 bb 4b cc 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 09 07 00 08 d9 bb 4b cc 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 03 c0 21 09 08 00 08 d9 bb 4b cc 
pppol2tp: input packet, len=0, tunnel=47089, session=35933, ns=0, nr=0
Data hex: ff 

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 23 81 05 06 ea 2c d6 a8 
Data hex: 02 03 00 0e 01 04 05 aa 05 06 79 ce d5 fb 
Data hex: 09 00 00 08 ea 2c d6 a8 
Data hex: 01 d9 00 1f 10 c9 13 48 e6 62 cb f3 9e e7 d9 35 af 0b 1f be 11 57
69 76 65 2d 4e 47 2d 4d 54 
Data hex: 03 d9 00 3f 53 3d 32 37 36 39 32 30 46 31 35 35 38 36 30 38 31 43
34 41 33 37 30 35 30 34 39 31 43 44 45 35 37 37 43 32 45 33 37 43 44 34 20
4d 3d 41 63 63 65 73 73 20 67 72 61 6e 74 65 64 
Data hex: 01 01 00 0a 03 06 ac 10 c8 01 
Data hex: 03 05 00 0a 03 06 ac 10 c8 05 
Data hex: 02 06 00 0a 03 06 ac 10 c8 05 
   status_cb: Connected
   our_ipaddr  = 172.16.200.5
   his_ipaddr  = 172.16.200.1
   netmask = 255.255.255.255
Data hex: 09 01 00 08 ea 2c d6 a8 
Data hex: 09 02 00 08 ea 2c d6 a8 
Data hex: 09 03 00 08 ea 2c d6 a8 
Data hex: 09 04 00 08 ea 2c d6 a8 
Data hex: 09 05 00 08 ea 2c d6 a8 
Data hex: 09 06 00 08 ea 2c d6 a8 
Data hex: 09 07 00 08 ea 2c d6 a8 
Data hex: 09 08 00 08 ea 2c d6 a8 
Data hex: 09 09 00 08 ea 2c d6 a8 
Data hex: 09 0a 00 08 ea 2c d6 a8 
Data hex: 09 0b 00 08 ea 2c d6 a8 
Data hex: 09 0c 00 08 ea 2c d6 a8 
Data hex: 09 0d 00 08 ea 2c d6 a8 
Data hex: 09 0e 00 08 ea 2c d6 a8 
Data hex: 09 0f  00 08 ea 2c d6 a8 
Data hex: 09 10 00 08 ea 2c d6 a8 
Data hex: 09 11 00 08 ea 2c d6 a8 
Data hex: 09 12 00 08 ea 2c d6 a8 
Data hex: 09 13 00 08 ea 2c d6 a8 
Data hex: 09 14 00 08 ea 2c d6 a8 
Data hex: 09 15 00 08 ea 2c d6 a8 
Data hex: 09 16 00 08 ea 2c d6 a8 
Data hex: 09 17 00 08 ea 2c d6 a8 
Data hex: 09 18 00 08 ea 2c d6 a8 
Data hex: 09 19 00 08 ea 2c d6 a8 
Data hex: 09 1a 00 08 ea 2c d6 a8 
Data hex: 09 1b 00 08 ea 2c d6 a8 
Data hex: 09 1c 00 08 ea 2c d6 a8 
Data hex: 05 03 00 10 55 73 65 72 20 72 65 71 75 65 73 74 
   status_cb: Connection lost

It seems like server tryes to connect to different channels.



--
View this message in context: 
http://lwip.100.n7.nabble.com/lwip2-0-2-l2tp-question-tp30013p30064.html
Sent from the lwip-users mailing list archive at Nabble.com.

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


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, session=0, ns=1, nr=2
pppol2tp: input packet, len=28, tunnel=53427, session=47857, ns=1, nr=3
pppol2tp: Assigned session ID 8945
ppp_start[1]
ppp phase changed[1]: phase=6
ppp_send_config[1]
ppp_recv_config[1]
ppp: auth protocols: PAP=0 CHAP=1 CHAP_MD5=0 CHAP_MS=0 CHAP_MS2=1
sent [LCP ConfReq id=0x1  ]
ppp_start[1]: finished
pppol2tp: input packet, len=12, tunnel=53427, session=0, ns=2, nr=3
pppol2tp: input packet, len=12, tunnel=53427, session=47857, ns=2, nr=4
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
rcvd [LCP ConfReq id=0x1   ]
sent [LCP ConfRej id=0x1 ]
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
rcvd [LCP ConfReq id=0x2  ]
sent [LCP ConfAck id=0x2  ]
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
rcvd [LCP ConfReq id=0x2  ]
sent [LCP ConfAck id=0x2  ]
pppol2tp: timeout
sent [LCP ConfReq id=0x1  ]
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
rcvd [LCP ConfAck id=0x1  ]
netif_set_mtu[1]: mtu=1450
ppp_send_config[1]
ppp_recv_config[1]
ppp phase changed[1]: phase=7
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
rcvd [LCP EchoReq id=0x0 magic=0xd880512f]
sent [LCP EchoRep id=0x0 magic=0xb95eba92]
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
rcvd [CHAP Challenge id=0x59 , name =
"Wive-NG-MT"]
sent [CHAP Response id=0x59
<39c7a836b57637850733ae02ac0e8fd5843ab9011d1ae241c74a51b72a6fe96e9d7f63e6e5a8ad2700>,
name = "test2"]
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
rcvd [CHAP Success id=0x59 "S=F2DCB2BB8809F245FAB12D840B6D2556BEA28A4C
M=Access granted"]
CHAP authentication succeeded
ppp phase changed[1]: phase=9
sent [IPCP ConfReq id=0x5 ]
pppol2tp: input packet, len=0, tunnel=46916, session=4, ns=0, nr=0
rcvd [IPCP ConfReq id=0x1 ]
sent [IPCP ConfAck id=0x1 ]
pppol2tp: input packet, len=0, tunnel=46916, session=4, ns=0, nr=0
rcvd [IPCP ConfNak id=0x5 ]
sent [IPCP ConfReq id=0x6 ]
pppol2tp: input packet, len=0, tunnel=46916, session=4, ns=0, nr=0
rcvd [IPCP ConfAck id=0x6 ]
sifvjcomp[1]: VJ compress enable=0 slot=0 max slot=0
sifup[1]: err_code=0
local  IP address 172.16.200.5
remote IP address 172.16.200.1
ppp phase changed[1]: phase=10
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=20, tunnel=53427, session=0, ns=2, nr=4
pppol2tp: input packet, len=20, tunnel=53427, session=0, ns=2, nr=4
pppol2tp: input packet, len=0, tunnel=53427, sessn=47857, ns=0, nr=0
pppol2tp: input packet, len=20, tunnel=53427, session=0, ns=2, nr=4
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=20, tunnel=53427, session=0, ns=2, nr=4
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=20, tunnel=53427, session=0, ns=2, nr=4
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
pppol2tp: input 

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

2017-06-30 Thread Sylvain Rochet
Hi,

On Fri, Jun 30, 2017 at 02:52:18AM -0700, odobryabov wrote:
> We don't use IPSec on our server.

Please enable PRINTPKT_SUPPORT and PPP_PROTOCOLNAME, you have to find 
out what is behind the mysterious retries we see on your first log, 
until now, we don't even know if those are PPP packets.

Sylvain


signature.asc
Description: Digital signature
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

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| (len, chksum)
+---+
udp (192.168.15.20, 49154) <-- (192.168.15.2, 1701)
pcb (0.0.0.0, 49154) <-- (0.0.0.0, 0)
pcb (0.0.0.0, 1200) <-- (0.0.0.0, 0)
pcb (0.0.0.0, 161) <-- (0.0.0.0, 0)
pcb (0.0.0.0, 69) <-- (0.0.0.0, 0)
udp_input: calculating checksum
pppol2tp: input packet, len=0, tunnel=5701, session=35356, ns=0, nr=0
udp_send: added header in given pbuf 0x2000cd94
udp_send: sending datagram of length 26
udp_send: UDP packet length 26
udp_send: UDP checksum 0xfd4c
udp_send: ip_output_if (0x11,)
udp_input: received datagram of length 28

ip4_output_if: st0
IP header:
+---+
| 4 | 5 |  0x00 |46 | (v, hl, tos, len)
+---+
|   43  |000|   0   | (id, flags, offset)
+---+
|  255  |   17  |0x1c2d | (ttl, proto, chksum)
+---+
|  192  |  168  |   15  |   20  | (src)
+---+
|  192  |  168  |   15  |2  | (dest)
+---+
ip4_output_if: call netif->output()
ip_input: iphdr->dest 0x140fa8c0 netif->ip_addr 0x140fa8c0 (0xfa8c0,
0xfa8c0, 0x1400)
ip4_input: packet accepted on interface st
ip4_input: 
IP header:
+---+
| 4 | 5 |  0x00 |48 | (v, hl, tos, len)
+---+
|12882  |000|   0   | (id, flags, offset)
+---+
|   64  |   17  |0xa904 | (ttl, proto, chksum)
+---+
|  192  |  168  |   15  |2  | (src)
+---+
|  192  |  168  |   15  |   20  | (dest)
+---+
ip4_input: p->len 48 p->tot_len 48
pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0

Could anybody send here a successful log of l2tp connection?



--
View this message in context: 
http://lwip.100.n7.nabble.com/lwip2-0-2-l2tp-question-tp30013p30027.html
Sent from the lwip-users mailing list archive at Nabble.com.

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


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

2017-06-29 Thread Sylvain Rochet
Hi,

On Thu, Jun 29, 2017 at 05:31:31AM -0700, odobryabov wrote:
> 
> ppp phase changed[1]: phase=10
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=0, tunnel=53427, session=47857, ns=0, nr=0
> pppol2tp: input packet, len=45, tunnel=53427, session=0, ns=3, nr=4

What's behind those packets, an IPSEC negotiation ? In this case that 
make sense since we do not support IPSEC.

Other than that I have no exact clue what is going on, it just look like 
your VPN server is trying to negotiate something past PPP running phase.

Sylvain


signature.asc
Description: Digital signature
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users