Commit Graph

287 Commits

Author SHA1 Message Date
Harald Welte e1c4716fa6 convert to autotools 2020-05-03 19:28:03 +02:00
Harald Welte df3b385b34 rename paths 2020-05-03 19:28:01 +02:00
Harald Welte 1e399e69e8 The socket is not MNCC (copy+paste error) 2020-05-03 19:27:46 +02:00
Alexander Couzens f6964b0659 l2tpd: introduce a version/datacontrol header (2byte) for RSL/OML unix socket
The ALT TC/Superchannel switch requires a seperate side channel. By introducing a header this
can be done in a clean way within the RSL/OML channel. So every packet gets
- 1 byte version
- 1 byte data or control
2020-05-03 19:27:45 +02:00
Alexander Couzens 2e6868f4c4 l2tpd: rename unix_rsl_oml_cb -> unix_read_cb:
it's used by all unix sockets
2020-05-03 19:27:45 +02:00
Alexander Couzens 17faeefa27 l2tpd_lapd: remove unsued unix_trau_cb|unix_pgsl_cb
These functions are only dummy functions in case pgsl, rsl, trau requires very different handling.
2020-05-03 19:27:45 +02:00
Alexander Couzens e49f36bc28 l2tpd_lapd: move assignment of channel->session under check of channel->session 2020-05-03 19:27:45 +02:00
Alexander Couzens 3d2c99c54d l2tpd_lapd/lapd_ehdlc_to_lapd(): improve log message 2020-05-03 19:27:45 +02:00
Alexander Couzens 93ec7f0aed l2tpd_lapd: improve lapd_ehdlc_to_lapd() function comment 2020-05-03 19:27:45 +02:00
Alexander Couzens aa97a1d4b1 l2tpd_lapd: fix memleak when sending data to unix sockets
The msg was allocated a second time by msgb_copy() even when lapd_ehdlc_to_lapd
handles the further allocation itself. Meaning every data packet leaked.
2020-05-03 19:27:45 +02:00
Alexander Couzens 0400931ac2 l2tpd_packet: remove superfluous `;` 2020-05-03 19:27:45 +02:00
Alexander Couzens 47b1285115 l2tpd_packet: remove handled fixme 2020-05-03 19:27:45 +02:00
Alexander Couzens 9f76bcd8e0 l2tpd_packet: improve log level and log messages 2020-05-03 19:27:45 +02:00
Alexander Couzens 5ba33810a2 l2tpd_lapd: check rc of wqueue_enqueue because
wqueue_enqueue now returns -ENOSPC when the queue is full
2020-05-03 19:27:45 +02:00
Alexander Couzens 183f9d6e5c l2tpd: add name to traffic_channels to improve logging 2020-05-03 19:27:45 +02:00
Alexander Couzens 6b0af57fdf l2tpd: zero struct sockaddr before using it 2020-05-03 19:27:45 +02:00
Alexander Couzens 9aadf0cf6d l2tpd: implement signal handler 2020-05-03 19:27:45 +02:00
Alexander Couzens a1a5c08e73 l2tpd: call msgb_talloc_ctx_init() to init msgb 2020-05-03 19:27:45 +02:00
Alexander Couzens c41a310fe2 move osmo_fsm_register() of fsm into constructor of l2tp_fsm.c 2020-05-03 19:27:45 +02:00
Alexander Couzens 923f4c9f1c l2tpd: move logging into own file 2020-05-03 19:27:45 +02:00
Harald Welte e6b5f61938 test_connect: remove 'socket.h'
At least debian doesn't have a 'socket.h' outside /usr/include/sys/
and 'man 7 socket' also states sys/socket.h as the proper reference.
2016-11-13 19:56:15 +01:00
Harald Welte f8b6837862 l2tpd: Add mechanism for explicitly ACKing a packet after 20ms
If we are not implicitly ACKing a control packet within 20ms of having
received it, let's send an explicit ACK.
2016-11-13 19:56:15 +01:00
Alexander Couzens 2d97ca9467 Merge branch 'lynxis' into master 2016-11-11 18:51:21 +01:00
Alexander Couzens eb07d89ffc l2tp_packet: dont answer an ACK with a StopCCN if connection is unknown
as long we don't do real ack handling, just ignore ACK without connection, because
on a StopCCN an ACK is sent out
2016-11-11 16:19:19 +01:00
Alexander Couzens 9143daf21e l2tp_packet: remove logoutput on every data packet 2016-11-11 16:18:24 +01:00
Alexander Couzens 95f8ae04bd lapd_switch_altc: allow to switch between timeslot and superchannel
a special crafted packet can switch between the modes. The packet look like
0x23004200 as magic and 1byte as value (0 = timeslot, 1 = superchannel)
2016-11-11 16:17:54 +01:00
Alexander Couzens 388a33ca9c lapd: use l2tp_msgb_alloc() instead of msgb_alloc() 2016-11-08 11:41:36 +01:00
Alexander Couzens 283c2c3257 lapd: free message in unix_rsl_oml_cb() 2016-11-08 11:41:36 +01:00
Harald Welte 8697fa7091 l2tpd socket naming: there's no oml associated with p-gsl or trau 2016-11-05 18:46:35 +01:00
Alexander Couzens 132c380336 add simple test_connect example programm 2016-11-05 18:46:35 +01:00
Alexander Couzens 52f099f27f fixup! implement l2tpd_tx_data including crc32 2016-11-05 18:46:35 +01:00
Alexander Couzens 5304db9a38 implement lapd decoding/encoding and rx/tx data path 2016-11-05 18:46:35 +01:00
Alexander Couzens 7bb03d7308 l2tpd_packet/controlconnection: improve sequence checks and log output 2016-11-05 18:46:35 +01:00
Alexander Couzens 7854b9abfb l2tpd_packet: correct usage of l2tpd_data functions 2016-11-05 18:46:35 +01:00
Alexander Couzens 4c3607544f fixup! implement l2tpd_tx_data including crc32 2016-11-05 18:46:35 +01:00
Alexander Couzens 0204667e06 l2tpd_socket: complete unix socket implementation 2016-11-05 18:46:35 +01:00
Alexander Couzens bcd9772fe5 implement l2tpd_tx_data including crc32 2016-11-05 18:46:35 +01:00
Alexander Couzens bc48fe2f98 l2tpd_packet: add msgb_free() after sending the message 2016-11-05 18:46:35 +01:00
Alexander Couzens 9b7111c3a2 l2tp_socket_init: setup log_class in l2tp_socket_init 2016-11-05 18:46:35 +01:00
Alexander Couzens 5b97a7ab47 l2tp_socket: handle unix sockets using wqueue 2016-11-05 18:46:35 +01:00
Alexander Couzens b0688440f0 l2tpd_data: search for a specific session_id using all connections
because sessions are unique per l2tp_instance we have to search over all connections to
find the correct session
2016-11-05 18:46:35 +01:00
Alexander Couzens 7916154136 l2tpd: move next_l_sess_id into l2tp_instance
the sessions are unique to the daemon. E.g. data packets only contain a
session id and no connection id
2016-11-05 18:46:35 +01:00
Alexander Couzens 0cd2a3d8bd l2tpd_packet/fsm: fix last missing parts for conf_fsm 2016-11-05 18:46:35 +01:00
Alexander Couzens 68ee0c9ef6 l2tpd_packet: add missing AVP ResultError for STOP_CCN 2016-11-05 18:46:35 +01:00
Alexander Couzens 4f47b2af70 l2tpd_fsm: dispatch L2CONF_E_ESTABLISH_SESSION on L2IC_S_ESTABLISHED 2016-11-05 18:46:35 +01:00
Alexander Couzens 09a9db3782 l2tpd_fsm: rename L2CONF_E_RX_ICCN -> L2CONF_E_ESTABLISH_SESSION
will only triggered when a session change state to established
2016-11-05 18:46:35 +01:00
Alexander Couzens e833cb7d4b l2tpd_packet: implement rx_ic_cn() to dispatch L2IC_E_RX_ICCN 2016-11-05 18:46:35 +01:00
Alexander Couzens 6737e11b06 l2tpd_packet: correct sequence number in ACKs 2016-11-05 18:46:35 +01:00
Alexander Couzens d886177eca l2tpd_fsm/l2tp_conf: sent TC_RQ on L2CONF_E_TX_TCRQ event 2016-11-05 18:46:35 +01:00
Alexander Couzens b3399a9679 l2tpd_fsm: correct naming of all old L2CC_ enums in L2CONF fsm 2016-11-05 18:46:35 +01:00