Commit Graph

83 Commits

Author SHA1 Message Date
Alexander Couzens 2ec61137ef l2tpd_fsm: implement hello receiver 2016-10-25 16:47:21 +02:00
Alexander Couzens ce52db0a43 l2tpd_packet/rx_eri_tcrp: remove old lookup of l2tp_connection by ccid
already given as function argument
2016-10-25 16:28:48 +02:00
Alexander Couzens 52255ec31c l2tpd_packet: implement rx_eri_tcrp()
dispatch an event to the fsm (L2CC_E_RX_TCRP) when result == 0
2016-10-25 16:16:21 +02:00
Alexander Couzens b34d874def l2tpd_fsm/session: add basic logic into states and sent out packets 2016-10-25 16:12:11 +02:00
Alexander Couzens d670f094ac l2tpd_fsm: jump over L2CC_S_ESTABLISHED
L2CC_S_ESTABLISHED will used later a final state. But for know
ignore this state and move over to WAIT_FOR_TXRP
2016-10-25 16:04:45 +02:00
Alexander Couzens 4b4acb69c3 l2tpd_fsm: only sent SCC RP when received a SCC RQ 2016-10-25 16:04:13 +02:00
Alexander Couzens 2e48578587 l2tpd_packet: save remote_end_id into session
the remote end id is used as bundling group id. To connect session
with sockets later we need to know what data is tunneled into this session
2016-10-25 16:02:57 +02:00
Alexander Couzens 5a221a0bde l2tpd_packet: add l2tpd_connection to ericsson receive functions
As already done to ietf receive function, we need the context of a l2tpd_connection
2016-10-25 16:01:46 +02:00
Alexander Couzens 54f5d5f08b l2tpd_packet: use decimal sapis 2016-10-25 16:00:23 +02:00
Alexander Couzens 20dc4e196b l2tpd_packet: fix assigned connection id avp in header
previous we sent the remote ccid in our assigned ccid avp
2016-10-25 15:59:35 +02:00
Alexander Couzens 13cc5e1d0a l2tpd_packet: add avpp_val_u8()
to complete api for avpp
2016-10-25 15:58:42 +02:00
Alexander Couzens 4fa5b2d1a2 l2tpd_packet: improve log messages for rx_ic_rq 2016-10-25 15:15:13 +02:00
Alexander Couzens a0d08a8995 l2tpd_data/l2tpd_sess_alloc: setup fsm for session 2016-10-25 15:14:58 +02:00
Alexander Couzens 1e7e8dedff l2tpd_packet: fix forgotten ; 2016-10-25 15:07:38 +02:00
Alexander Couzens 5941d7be49 l2tpd_packet: implement l2tp_tx_tc_rq l2tp_tx_altc_rq_superchannel l2tp_tx_altc_rq_timeslot 2016-10-25 15:07:38 +02:00
Alexander Couzens 00120312c3 l2tpd_packet.h: sort tx functions 2016-10-25 14:36:10 +02:00
Alexander Couzens 32ebeebe75 l2tpd_packet: l2tp_tx_stop_ccn_msg(msg) to sent out STOP CCN to unknown control connections 2016-10-25 14:35:11 +02:00
Alexander Couzens 2b3566c365 l2tpd_packet: add cid to wrong seq number received 2016-10-25 14:31:07 +02:00
Alexander Couzens 4da71e0232 l2tpd_fsm: sent out a TCRQ after control connection is established 2016-10-25 14:30:43 +02:00
Alexander Couzens 8af3b8ebf2 l2tpd_fsm: allow to receive L2CC_E_RX_STOP_CCN in L2CC_S_WAIT_CTL_CONN
L2CC_E_RX_STOP_CCN can received at any state
2016-10-25 14:30:21 +02:00
Alexander Couzens 1ec0edc559 l2tpd_fsm: add control connection states L2CC_S_WAIT_FOR_TCRP, L2CC_S_ESTABLISHED_CONFIGURED
L2CC_S_WAIT_FOR_TCRP = after sending a TCRQ
L2CC_S_ESTABLISHED_CONFIGURED = when the connection is fully initialized
2016-10-25 12:11:51 +02:00
Alexander Couzens cc942323f0 l2tpd: free msgb after handling everything 2016-10-25 12:11:05 +02:00
Alexander Couzens 23a1114d28 l2tpd_fsm: send stop ccn on local close requests events 2016-10-25 11:27:59 +02:00
Alexander Couzens 4b4becaa23 l2tpd_packet: implement l2tp_tx_stop_ccn 2016-10-25 11:25:40 +02:00
Alexander Couzens 39c2f5a323 l2tpd: log allocation of new CC with local + remote id 2016-10-24 21:35:21 +02:00
Alexander Couzens f9a4590f2d l2tpd_fsm: answer to a to STOP CCN with an ACK
still a TODO to tear down the fsm and struct
2016-10-24 21:35:02 +02:00
Alexander Couzens 5ce4fc112c l2tpd: set l2i->next_l_ccid to 1
0 is reserved for discovery. so 0 should never assigned to a control connection
2016-10-24 21:33:58 +02:00
Alexander Couzens 10036edca3 l2tpd_fsm: answer to a SCCCN with a ACK 2016-10-24 21:20:42 +02:00
Alexander Couzens 10d655150c l2tpd_packet: fix removal of forgotten local_cid in l2tpd_cc_alloc() 2016-10-24 21:20:25 +02:00
Alexander Couzens 629e0b770e l2tpd_packet: l2tp_tx_ack change to a control connection message
TX Ack is used by control connection, not by session management
2016-10-24 21:19:54 +02:00
Alexander Couzens 4863678b85 l2tpd_packet: add l2tp_connection *l2c into receive functions and lookup the cid 2016-10-24 21:10:44 +02:00
Alexander Couzens 370e69c9bb l2tpd_data: add ccid to fsm id
allows to identifiy the fsm instances
2016-10-24 21:09:43 +02:00
Alexander Couzens 22bdaae934 l2tpd_packet: correct digest, the first byte must be zero in the message
the first byte is the type of digest (hmac-md5)
2016-10-24 18:58:45 +02:00
Alexander Couzens ec03bf207a l2tpd_packet: set router_id to the same value of trace 2016-10-24 07:26:38 +02:00
Alexander Couzens 36294b5878 l2tp_instance: setsockopt to the same tos value of bsc 2016-10-24 07:26:17 +02:00
Alexander Couzens 73b7656636 l2tp_protocol: correct value of AVP_IETF_AS_CTRL_CON_ID 2016-10-24 07:25:47 +02:00
Alexander Couzens 15ef36a217 l2tpd_packet: first packet already count, set the l2c->next_rx_seq_nr = 1 2016-10-24 06:48:14 +02:00
Alexander Couzens 4a043b76d5 l2tpd_packet: add vendor_name = Ericsson to SCCRP 2016-10-24 06:47:30 +02:00
Alexander Couzens 606f60da6c l2tpd_packet: also do htons/htonl in avpp_val_u16/32 2016-10-24 06:30:35 +02:00
Alexander Couzens e17366d0b0 l2tpd_packet: use msgb_data / msgb_length when transmitting 2016-10-24 06:26:27 +02:00
Alexander Couzens 75436421a4 l2tpd_packet: complete l2tp control header
missing session id and incorrect lenght / version field
2016-10-24 06:26:06 +02:00
Alexander Couzens b201ef2f02 l2tpd_packet/digest_avp_update: fix search AVP digest 2016-10-24 06:25:31 +02:00
Alexander Couzens f6a71518cc l2tpd_packet/digest_avp_update: use msgb_data / msgb_lenght 2016-10-24 06:24:51 +02:00
Alexander Couzens e1aa3aaa1c l2tpd: l2tp_msgb_alloc(): sets now l2h -> msg->data 2016-10-24 06:23:55 +02:00
Alexander Couzens 6203509f9d l2tpd_fsm: use priv instead of data
data contains the msgbuffer
2016-10-24 06:23:07 +02:00
Alexander Couzens 4df20bcdcf l2tpd_fsm: sent out SCCRP 2016-10-24 05:38:07 +02:00
Alexander Couzens 8d4c3e0a52 l2tpd_packet: return 0 on success in l2tp_msgb_tx() 2016-10-24 05:37:52 +02:00
Alexander Couzens 387ab48db2 l2tpd_packet: set msg->dst = l2c
when using a session this is an expensive call
2016-10-24 05:37:11 +02:00
Alexander Couzens 8ff4d0b5de l2tpd_packet: use l2c/l2s instead of ls lc as everywhere else in the tree 2016-10-24 05:21:03 +02:00
Alexander Couzens a768dfca4e l2tpd_packet: make tx function public
will be used by the fsm
2016-10-24 05:19:37 +02:00