Alexander Couzens
cac30c474c
l2tpd: move ofd setup before osmo_sock_init_ofd()
2016-11-05 18:46:34 +01:00
Alexander Couzens
047e96a805
init logging system
2016-11-05 18:46:34 +01:00
Alexander Couzens
9586b78d02
l2tpd_fsm: make fsm itself and states public
2016-11-05 18:46:34 +01:00
Alexander Couzens
ea516e972d
l2tpd: fix compiler errors and misused format string
2016-11-05 18:46:34 +01:00
Alexander Couzens
1a2dc58e38
fixme: use local version until osmo_sockaddr_equal is upstream
...
work around old libosmocore version
2016-11-05 18:46:34 +01:00
Alexander Couzens
002f9e06f4
lookup the l2tpd connection using the src ip
2016-11-05 18:46:34 +01:00
Alexander Couzens
f1c1de8dd0
generalize l2tp_rcvmsg: dont to any difference between ip and udp
...
this should handle the upper layer
2016-11-05 18:46:34 +01:00
Alexander Couzens
bb5b5f5b3b
l2tpd_data: init l2connetion fsm
2016-11-05 18:46:34 +01:00
Alexander Couzens
775c56353f
l2tpd_cc_find_by_sockaddr: add sockaddr length to function signature
...
osmo_sockaddr_equal requires an sockaddr length
2016-11-05 18:46:34 +01:00
Alexander Couzens
3563192ccb
l2tp_data: give l2tp_recvmsg socketaddr of the incoming packet
2016-11-05 18:46:34 +01:00
Alexander Couzens
486b7acbfc
l2tp_data: add l2tpd_cc_find_by_sockaddr()
2016-11-05 18:46:34 +01:00
Alexander Couzens
a3ea0eef15
WIP: l2tpd: make it compile again
...
fix all compiler warnings & errors but -Wunsed-function
2016-11-05 18:46:34 +01:00
Harald Welte
394608d082
l2tpd socket naming: there's no oml associated with p-gsl or trau
2016-11-04 12:34:49 +01:00
Alexander Couzens
d601392fa7
add simple test_connect example programm
2016-11-02 21:45:55 +01:00
Alexander Couzens
82888d9558
fixup! implement l2tpd_tx_data including crc32
2016-11-02 21:32:20 +01:00
Alexander Couzens
1e1eebddc6
implement lapd decoding/encoding and rx/tx data path
2016-11-02 21:31:49 +01:00
Alexander Couzens
404cfd772f
l2tpd_packet/controlconnection: improve sequence checks and log output
2016-11-02 21:30:07 +01:00
Alexander Couzens
b2a4c2c85e
l2tpd_packet: correct usage of l2tpd_data functions
2016-11-02 21:28:16 +01:00
Alexander Couzens
146e57ec32
fixup! implement l2tpd_tx_data including crc32
2016-11-02 20:56:32 +01:00
Alexander Couzens
7c69530eae
l2tpd_socket: complete unix socket implementation
2016-11-02 20:51:30 +01:00
Alexander Couzens
ee24efc5e0
implement l2tpd_tx_data including crc32
2016-11-02 20:48:40 +01:00
Alexander Couzens
4c11f1bd23
l2tpd_packet: add msgb_free() after sending the message
2016-11-02 20:46:08 +01:00
Alexander Couzens
ea53d3999e
l2tp_socket_init: setup log_class in l2tp_socket_init
2016-11-02 20:31:09 +01:00
Alexander Couzens
3f3191b4f0
l2tp_socket: handle unix sockets using wqueue
2016-10-31 22:27:17 +01:00
Alexander Couzens
af3181040f
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-10-31 00:45:47 +01:00
Alexander Couzens
53c8999df1
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-10-31 00:45:01 +01:00
Alexander Couzens
c0720cbf22
l2tpd_packet/fsm: fix last missing parts for conf_fsm
2016-10-30 21:08:47 +01:00
Alexander Couzens
44749b1dfe
l2tpd_packet: add missing AVP ResultError for STOP_CCN
2016-10-30 21:07:58 +01:00
Alexander Couzens
c9b24084f4
l2tpd_fsm: dispatch L2CONF_E_ESTABLISH_SESSION on L2IC_S_ESTABLISHED
2016-10-30 20:36:37 +01:00
Alexander Couzens
75e72bd705
l2tpd_fsm: rename L2CONF_E_RX_ICCN -> L2CONF_E_ESTABLISH_SESSION
...
will only triggered when a session change state to established
2016-10-30 20:36:10 +01:00
Alexander Couzens
f90d51e16a
l2tpd_packet: implement rx_ic_cn() to dispatch L2IC_E_RX_ICCN
2016-10-30 20:13:36 +01:00
Alexander Couzens
b1601d6996
l2tpd_packet: correct sequence number in ACKs
2016-10-30 20:12:59 +01:00
Alexander Couzens
86e5a57ce5
l2tpd_fsm/l2tp_conf: sent TC_RQ on L2CONF_E_TX_TCRQ event
2016-10-30 20:12:41 +01:00
Alexander Couzens
7e3f5b6cfc
l2tpd_fsm: correct naming of all old L2CC_ enums in L2CONF fsm
2016-10-30 20:12:21 +01:00
Alexander Couzens
e6502cd8f1
l2tpd_fsm: correct valuestring of L2CONF_E_TX_TCRQ
2016-10-30 19:54:10 +01:00
Alexander Couzens
af2cd0815b
l2tpd: correct event name of L2CONF_E_RX_ALTCRP
2016-10-30 19:53:52 +01:00
Alexander Couzens
7e0bc95155
l2tpd: allow transistion from INIT -> INIT, when a StopSC received in init
2016-10-30 19:53:20 +01:00
Alexander Couzens
2f21b23c46
l2tpd: register l2tp_conf_fsm
...
every fsm must registered
2016-10-30 19:52:58 +01:00
Alexander Couzens
5ca60d694e
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-10-30 19:31:18 +01:00
Alexander Couzens
aa4b668e5d
l2tpd_fsm: include osmocom/core/fsm.h
2016-10-30 19:30:10 +01:00
Alexander Couzens
1a8498aa0d
l2tpd_data: add conf_fsm as into 'struct l2tpd_connection'
2016-10-30 19:29:42 +01:00
Alexander Couzens
f3e1138782
l2tpd_fsm: move TC/ALTC logic into own fsm
2016-10-30 19:27:58 +01:00
Alexander Couzens
8bac56c1d4
l2tpd_packet: improve log message for unknown sessions
2016-10-30 18:06:22 +01:00
Alexander Couzens
d28d4e31f5
l2tpd_fsm: remove l2tp_ic_allstate() call, directly called by fsm code
2016-10-30 18:06:04 +01:00
Alexander Couzens
fc1486ed73
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-10-30 18:05:41 +01:00
Alexander Couzens
f859aaab16
l2tpd_data: start with 1 as session id
...
session with 0 is special and used for discovery
2016-10-30 18:04:12 +01:00
Alexander Couzens
34104f6d52
l2tpd_packet: use correct fsm on rx_ic_rq
2016-10-30 18:03:42 +01:00
Alexander Couzens
af5c3e22c4
l2tpd: add debug logs on recieved packets
2016-10-27 04:16:54 +02:00
Alexander Couzens
cc0456ac45
l2tpd_fsm: sent stop ccn for unknown sessions
2016-10-27 04:07:49 +02:00
Alexander Couzens
3b84bcebc4
l2tpd_fsm: go to state INIT after L2CC_E_RX_STOP_CCN
2016-10-27 04:06:03 +02:00