It is currently Thu Jul 27, 2017 7:38 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: To execute openl2tpd on uClinux
PostPosted: Tue Sep 25, 2012 1:51 pm 

Joined: Tue Sep 25, 2012 8:26 am
Posts: 3
Hello forum,

Recently, I tried to port openl2tp onto embedded uClinux.
I could compile the file successfully, however, as I tried to execute the program, it seemed to be failed.
Then I tried to execute openl2tpd in the debug mode and I got the log as follow.

Code:
Start, trace_flags=00000000 (debug enabled)
OpenL2TP V1.8, (c) Copyright 2004-2010 Katalix Systems Ltd.
Loading plugin /lib/openl2tp/ppp_unix.so, version V1.5
Using config file: /etc/openl2tpd.conf
FUNC: tunl 63612: allocated context using profile 'default'
FSM: CCE(63612) event OPEN_REQ in state IDLE
AVP: tunl 63612: building SCCRQ message, 9 AVPs
PROTO: tunl 63612: sending SCCRQ
XPRT: tunl 63612: queuing tx packet, type 1, len 142, ns/nr 0/0
XPRT: tunl 63612: update ns to 1
XPRT: tunl 63612: adding packet to ackq, type 1, len 142, ns/nr 0/0
DATA: TX: tunl 63612/0: send 142 bytes to peer 192.168.10.1, packet ns/nr 0/0 type 1, retry 0
FSM: CCE(63612) state change: IDLE --> WAITCTLREPLY
FUNC: tunl 63612 created
FSM: LAIC(63612/18097) event INCALL_IND in state IDLE
PROTO: tunl 63612/18097: waiting for tunnel up
FSM: LAIC(63612/18097) state change: IDLE --> WAITTUNNEL
63612/18097: creating UNIX pppd context
63612/18097: using ppp profile 'default'
XPRT: tunl 63612: set retry interval to 2
XPRT: tunl 63612: set retry interval to 4
DATA: TX: tunl 63612/0: resend 142 bytes to peer 192.168.10.1, packet ns/nr 0/0 type 1, retry 1
XPRT: tunl 63612: set retry interval to 8
DATA: TX: tunl 63612/0: resend 142 bytes to peer 192.168.10.1, packet ns/nr 0/0 type 1, retry 2
DATA: TX: tunl 63612/0: resend 142 bytes to peer 192.168.10.1, packet ns/nr 0/0 type 1, retry 3
DATA: TX: tunl 63612/0: resend 142 bytes to peer 192.168.10.1, packet ns/nr 0/0 type 1, retry 4
DATA: TX: tunl 63612/0: resend 142 bytes to peer 192.168.10.1, packet ns/nr 0/0 type 1, retry 5
XPRT: tunl 63612: retry failure
FSM: CCE(63612) event XPRT_DOWN in state WAITCTLREPLY
FUNC: tunl 63612: starting cleanup timer
FSM: CCE(63612) state change: WAITCTLREPLY --> CLOSING
Exiting
Cleaning up before exiting
L2TP: tunl 63612/18097: free when use_count=2
tunl 63612: free when use_count=3
Unloading plugin /lib/openl2tp/ppp_unix.so


Also, I used the sniffer to get the packet and found that the SCCRQ packet is a malformed packet which the AVP information cannot be analyzed by the sniffer.

Any idea?
Thanks for your help


Top
 Profile  
 
 Post subject: Re: To execute openl2tpd on uClinux
PostPosted: Thu Sep 27, 2012 8:37 am 

Joined: Tue Sep 25, 2012 8:26 am
Posts: 3
Solved, it's compiler issue.


Top
 Profile  
 
 Post subject: Re: To execute openl2tpd on uClinux
PostPosted: Mon Oct 01, 2012 12:59 pm 

Joined: Tue Sep 25, 2012 8:26 am
Posts: 3
Hi forum, now I encounter another problem.
My platform doesn't support MMU, hence I modify the function vfork instead of fork.
However, the program seems to crash down as the pppol2tp.so is loaded.
The dump information is showed as follow:

Code:
sess 50920/58744: pppd debug kdebug 7 noipdefault sync refuse-eap nodetach user test password test local noauth noaccomp nopcomp nobsdcomp nodeflate nopredictor1 novj novjccomp noendpoint plugin /lib/pppd/2.4.3/pppol2tp.so pppol2tp 15 pppol2tp_tunnel_id 50920 pppol2tp_session_id 58744 pppol2tp_debug_mask 15       
Plugin /lib/pppd/2.4.3/pppol2tp.so loaded.[  405.850000]
[  405.850000] Process openl2tpd (pid: 5221)
[  405.850000] text = 0x42280000-0x422f57f8  data = 0x412c07f8-0x412c4b98
[  405.850000] bss = 0x412c4b98-0x41280000   user-stack = 0x4129fe10
[  405.850000]
[  405.850000] Kernel Trap: Causes: 0x00001250
[  405.850000]  decode: 00000010 dst address decode error
[  405.850000]  decode: 00000040 dst alignment error
[  405.850000]  decode: 00000200 DCAPT error
[  405.850000]  decode: 00001000 dst range error
[  405.850000] regs: 42f19e84, tid: 5
[  405.850000] pc: 40130864, previous_pc: 40130860
[  405.850000]
[  405.850000] Data registers
[  405.850000] D00: 00000000, D01: 00000000, D02: 00000000, D03: 00000000,
[  405.850000] D04: 00000000, D05: 00000000, D06: 00000000, D07: 006420cf,
[  405.850000] D08: 000000af, D09: 4129e000, D10: 42f6a208, D11: 42f6a208,
[  405.850000] D12: 428f8f98, D13: 0000c6e8, D14: 00000280, D15: 00001f50,
[  405.850000]
[  405.850000] Address registers
[  405.850000] A00: 429ec060, A01: 00000001, A02: 4129fe14, A03: 40987080,
[  405.850000] A04: 42ce55e0, A05: 4012fed4, A06: 42f19f48, A07: 42f19f34,
[  405.850000]
[  405.850000] acc0: 80000000-00000000, acc1: 00000000-00000000
[  405.850000] mac_rc16: 00000000, source3: 00000000
[  405.850000] inst_cnt: 44a9adaa, csr: 00000000
[  405.850000] int_mask0: 00000000, int_mask1: 00000000
[  405.850000] IRange0: en:00000fff, range: 3ffc0000-43fffffc
[  405.850000] IRange1: en:00000fff, range: 40100000-401005b4
[  405.850000] IRange2: en:00000fff, range: 403dc000-43fffffc
[  405.850000] DRange0: en:00000fff, range: 00000800-02009ffc
[  405.850000] DRange1: en:00000fff, range: 3ffc0000-43fffffc
[  405.850000] DRange2: en:00000fff, range: 403da000-43fffffc
[  405.850000] DRange3: en:00000000, range: 40005540-400ffffc
[  405.850000] frame_type: 2, nesting_level: 0, thread_type 0
[  405.850000]
[  405.850000] Starting backtrace: PID 5221 'openl2tpd'
[  405.850000]   Kernel Stack:
[  405.850000]     code[0x40100000-0x44000000] ocm_code[0x3ffc1f00-0x3ffe0000]
[  405.850000]     stack[0x42f19f34-0x42f19ff8]
[  405.850000]   CALL && CALLI on stack:
[  405.850000]     0x4082ed04, 0x40811a60, 0x40811a60,
[  405.850000] Userspace stack at 0x4129f130 frame type -1
[  405.850000]   User Stack (fdpic):
[  405.850000]     code[0x40100000-0x44000000]
[  405.850000]     stack[0x4129f130-0x4129fe10]
[  405.850000]   CALL && CALLI on stack:
[  405.850000]     0x422d9ad4, 0x422da70c, 0x42de6630, 0x42de6658,
[  405.850000]     0x42de80f0, 0x40829154, 0x40828ab0, 0x4082e2fc,
[  405.850000]     0x40828e04, 0x40828798, 0x40829154, 0x40828ab0,
[  405.850000]     0x4082e2fc, 0x40828a70, 0x422b5e70, 0x422b915c,
[  405.850000]     0x422b9fe4, 0x422dd364, 0x422dd3f8, 0x422b4d94, ...
[  405.850000] --- End Trap ---

using channel 2
Using interface ppp0
Connect: ppp0 <-->
PPPoL2TP options: tid 50920 sid 58744 debugmask 15
[  405.930000] PPPOL2TP: sess 50920/58744: set debug=f
[  405.930000] PPPOL2TP: sess 50920/58744: pppol2tp_session_ioctl(cmd=0x40047452, arg=0x412bfac4)
[  405.940000] PPPOL2TP: sess 50920/58744: set mru=1400
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x76d328ca>]
[  405.960000] PPPOL2TP: sess 50920/58744: send 18 bytes
[  405.960000] sess 50920/58744: xmit: F7 7B 06 A5 00 22 00 00 00 02 EC 71 E9 AA FF 03 C0 21
[  405.970000] PPPOL2TP: sess 50920/58744: recv 28 byte data frame, passing to ppp
SEGV
/ # rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x76d328ca>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x76d328ca>]
[  408.970000] PPPOL2TP: sess 50920/58744: send 18 bytes
[  408.970000] sess 50920/58744: xmit: F7 7B 06 A5 00 22 00 00 00 02 EC 71 E9 AA FF 03 C0 21
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x76d328ca>]
[  411.980000] PPPOL2TP: sess 50920/58744: send 18 bytes
[  411.980000] sess 50920/58744: xmit: F7 7B 06 A5 00 22 00 00 00 02 EC 71 E9 AA FF 03 C0 21
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x76d328ca>]
[  414.980000] PPPOL2TP: sess 50920/58744: send 18 bytes
[  414.980000] sess 50920/58744: xmit: F7 7B 06 A5 00 22 00 00 00 02 EC 71 E9 AA FF 03 C0 21
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x76d328ca>]


Does that mean openl2tpd cannot to be ported on the system without MMU feature :(
My kernel version is 2.6.28
Any advice will be appreciated, thanks for your help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group