Commit Graph

130 Commits

Author SHA1 Message Date
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
Alexander Couzens ca07a4bb09 l2tpd_fsm: correct valuestring of L2CONF_E_TX_TCRQ 2016-11-05 18:46:35 +01:00
Alexander Couzens 701d6ab2e9 l2tpd: correct event name of L2CONF_E_RX_ALTCRP 2016-11-05 18:46:35 +01:00
Alexander Couzens 2cc7bf4b12 l2tpd: allow transistion from INIT -> INIT, when a StopSC received in init 2016-11-05 18:46:35 +01:00
Alexander Couzens 513780aab7 l2tpd: register l2tp_conf_fsm
every fsm must registered
2016-11-05 18:46:35 +01:00
Alexander Couzens 49348f8664 l2tpd_fsm: migrate state & event into conf_fsm
the l2tp_conf_fsm handle traffic channels and wait between allocation,
because the siu can not handle to many packets at once
2016-11-05 18:46:34 +01:00
Alexander Couzens fee0a2bf15 l2tpd_fsm: include osmocom/core/fsm.h 2016-11-05 18:46:34 +01:00
Alexander Couzens 38ec8e5e5b l2tpd_data: add conf_fsm as into 'struct l2tpd_connection' 2016-11-05 18:46:34 +01:00
Alexander Couzens 02af3b5089 l2tpd_fsm: move TC/ALTC logic into own fsm 2016-11-05 18:46:34 +01:00
Alexander Couzens d54ccaf083 l2tpd_packet: improve log message for unknown sessions 2016-11-05 18:46:34 +01:00
Alexander Couzens c41d629c78 l2tpd_fsm: remove l2tp_ic_allstate() call, directly called by fsm code 2016-11-05 18:46:34 +01:00
Alexander Couzens 47877011c7 l2tpd_packet: add backref for session
I'vnt't found a solution using container_of() to get the connection for a session.
add a direct pointer to have a direct reference. Saves a lot lookups using the connection id every time
2016-11-05 18:46:34 +01:00
Alexander Couzens 21ee9718d2 l2tpd_data: start with 1 as session id
session with 0 is special and used for discovery
2016-11-05 18:46:34 +01:00
Alexander Couzens 1369188484 l2tpd_packet: use correct fsm on rx_ic_rq 2016-11-05 18:46:34 +01:00
Alexander Couzens 821613e307 l2tpd: add debug logs on recieved packets 2016-11-05 18:46:34 +01:00
Alexander Couzens f5a6bff7d0 l2tpd_fsm: sent stop ccn for unknown sessions 2016-11-05 18:46:34 +01:00
Alexander Couzens 85ff316bb0 l2tpd_fsm: go to state INIT after L2CC_E_RX_STOP_CCN 2016-11-05 18:46:34 +01:00
Alexander Couzens fb23f34630 l2tpd_fsm: add RX-HELLO events 2016-11-05 18:46:34 +01:00
Alexander Couzens f3a1f37dce l2tpd: implement ALTCRP as states 2016-11-05 18:46:34 +01:00
Alexander Couzens 37b81ebc86 l2tpd: improve logmessage recvfrom() 2016-11-05 18:46:34 +01:00
Alexander Couzens ba9ab6cecf l2tpd_packet: implement rx_eri_altcrp() to push fsm 2016-11-05 18:46:34 +01:00
Alexander Couzens 420ed9c3b7 l2tpd_packet: implement router_id based on a ip 2016-11-05 18:46:34 +01:00
Alexander Couzens fae4740395 l2tpd: correct length of AVP_ERIC_ABIS_LO_MODE 2016-11-05 18:46:34 +01:00
Alexander Couzens ce855cae4d l2tpd: correct sequence number for acks *FIXME* 2016-11-05 18:46:34 +01:00
Alexander Couzens 2421f45ca0 l2tpd_packet: fix correct hardcoded ip address for receiving SAPIs
the ip must exact match the from of the actually connection otherwise the SIU will
try to reach the IP via SCCRQ to create a secondary connection
2016-11-05 18:46:34 +01:00
Alexander Couzens 00ddccf947 l2tpd: log error message of recvfrom() 2016-11-05 18:46:34 +01:00
Alexander Couzens 7493c1db5d l2tpd_fsm: add an allstate_action for HELLO LOCAL_CLOSE_REQ RX_STOP_CCN 2016-11-05 18:46:34 +01:00
Alexander Couzens 89787e5f0b l2tpd_fsm: implement hello receiver 2016-11-05 18:46:34 +01:00
Alexander Couzens d6c216c29f l2tpd_packet/rx_eri_tcrp: remove old lookup of l2tp_connection by ccid
already given as function argument
2016-11-05 18:46:34 +01:00
Alexander Couzens d36bde70a5 l2tpd_packet: implement rx_eri_tcrp()
dispatch an event to the fsm (L2CC_E_RX_TCRP) when result == 0
2016-11-05 18:46:34 +01:00