It is currently Tue May 23, 2017 7:46 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: segfault bug ...
PostPosted: Mon Apr 23, 2012 2:39 pm 

Joined: Sat Jun 04, 2011 9:18 am
Posts: 15
Hi,

Seeing the following segfault when incoming connections from a MT l2tp client comes in ...

Code:
# gdb --args openl2tpd -f -D -c /etc/openl2tpd.conf
GNU gdb (Gentoo 7.3.1 p1) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/sbin/openl2tpd...Reading symbols from /usr/lib64/debug/usr/sbin/openl2tpd.debug...done.
done.
(gdb) run
Starting program: /usr/sbin/openl2tpd -f -D -c /etc/openl2tpd.conf
Start, trace_flags=00000000 (debug enabled)
OpenL2TP V1.8, (c) Copyright 2004-2010 Katalix Systems Ltd.
Loading plugin /usr/lib64/openl2tp/ppp_unix.so, version V1.5
Using config file: /etc/openl2tpd.conf
FUNC: tunl 10265: allocated context using profile 'default', created by network request
XPRT: RX: tunl 10265/0: len=103 ns/nr=0/0, our ns/nr=0/0, peer ns/nr=0/0
XPRT: tunl 10265: peer ns/nr is 0/0
DATA: RX: tunl 10265/0: rcv 103 bytes from peer 192.168.42.2, packet ns/nr 0/0 type 0
XPRT: tunl 10265: update nr from 0 to 1
AVP: tunl 10265: SCCRQ message decode of 83 bytes started
AVPDATA: PROTOCOL_VERSION: ver=1 rev=0
AVPDATA: FRAMING_CAP: cap=1
AVPDATA: BEARER_CAP: cap=0
AVPDATA: FIRMWARE_VERSION: revision=1
AVPDATA: HOST_NAME: name=ULSinternal
AVPDATA: VENDOR_NAME: name=MikroTik
AVPDATA: TUNNEL_ID: id=258
AVPDATA: RX_WINDOW_SIZE: size=4
PROTO: tunl 10265: SCCRQ received from peer 258
FSM: CCE(10265) event SCCRQ_ACCEPT in state IDLE
PROTO: tunl 10265: adjust tx_window_size: peer=4, ours=10
AVP: tunl 10265: building SCCRP message, 9 AVPs
PROTO: tunl 10265: sending SCCRP to peer 258
XPRT: tunl 10265: queuing tx packet, type 2, len 143, ns/nr 0/1
XPRT: tunl 10265: update ns to 1
XPRT: tunl 10265: adding packet to ackq, type 2, len 143, ns/nr 0/1
DATA: TX: tunl 10265/0: send 143 bytes to peer 192.168.42.2, packet ns/nr 0/1 type 2, retry 0
FSM: CCE(10265) state change: IDLE --> WAITCTLCONN
XPRT: RX: tunl 10265/0: len=20 ns/nr=1/1, our ns/nr=1/1, peer ns/nr=0/0
XPRT: tunl 10265: peer ns/nr is 1/1
XPRT: tunl 10265: pkt 0/1 is acked by nr 1
DATA: RX: tunl 10265/0: rcv 20 bytes from peer 192.168.42.2, packet ns/nr 1/1 type 0
XPRT: tunl 10265: update nr from 1 to 2
AVP: tunl 10265: SCCCN message decode of 0 bytes started
PROTO: tunl 10265: SCCCN received from peer 258
FSM: CCE(10265) event SCCCN_ACCEPT in state WAITCTLCONN
FUNC: tunl 10265 up
FSM: CCE(10265) state change: WAITCTLCONN --> ESTABLISHED
XPRT: tunl 10265: send zlb ack, ns/nr=1/2
XPRT: RX: tunl 10265/0: len=48 ns/nr=2/1, our ns/nr=1/2, peer ns/nr=1/1
XPRT: tunl 10265: peer ns/nr is 2/1
DATA: RX: tunl 10265/0: rcv 48 bytes from peer 192.168.42.2, packet ns/nr 2/1 type 0
XPRT: tunl 10265: update nr from 2 to 3
AVP: tunl 10265: ICRQ message decode of 28 bytes started
AVPDATA: SESSION_ID: id=1
AVPDATA: CALL_SERIAL_NUMBER: value=4
AVPDATA: BEARER_TYPE: type=0

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x000000000040f95b in l2tp_tunnel_recv ()
#2  0x0000000000415956 in l2tp_xprt_deliver_up ()
#3  0x0000000000416688 in l2tp_xprt_recv ()
#4  0x000000000040d03b in l2tp_net_recv_core.clone.0 ()
#5  0x000000000040d3d8 in l2tp_net_recv ()
#6  0x00000000004271e5 in usl_fd_poll () at usl_fd.c:266
#7  0x0000000000427e3e in usl_main_loop () at usl_signal.c:216
#8  0x00000000004090ff in main ()
(gdb)


/etc/init.d/openl2tpd.conf as follows:

Code:
# cat /etc/openl2tpd.conf
ppp profile modify profile_name=default optionsfile=/etc/ppp/options.l2tp clientip_as_ipparam=yes

tunnel profile modify profile_name=default \
        our_udp_port=1701


Note that I am running a patch (available in this forum somewhere) for the clientip_as_ipparam option, same for the optionsfile option.

Not sure what's triggering the segfault. The MT config looks like:

Code:
0    name="l2tp-out1" max-mtu=1460 max-mru=1460 mrru=1600 connect-to=192.168.42.75 user="jkroon"
      password="jkroon" profile=default-encryption add-default-route=no dial-on-demand=no
      allow=pap,chap


Any assistance much appreciated. The default-encryption profile above is at the ppp level, I don't even see the pppd daemon starting on the server ... and the pppd server is in any case configured to run using mppe encryption ...


Top
 Profile  
 
 Post subject: Re: segfault bug ...
PostPosted: Mon Apr 23, 2012 3:15 pm 

Joined: Sat Jun 04, 2011 9:18 am
Posts: 15
Never mind ... was missing LNS support on the server ...

braindead moment there.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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