Commit Graph

94 Commits

Author SHA1 Message Date
Vadim Yanitskiy 19ed00e9bb srsue/extnas: move EEA/EIA API from 'nas' to 'nas_base'
This way 'nas_ext' would also be able to use it.
2022-01-31 17:18:02 +06:00
Vadim Yanitskiy 2b1ded220e srsue/extnas: derive abstract 'nas_base' class from 'nas'
This is the first step towards the goal of having an external NAS
interface.  The new 'nas_base' class becomes a parent of 'nas',
combining all interfaces and the basic (common) API.

The 'ue_stack_lte' now holds a unique_ptr of type 'srsue::nas_base',
so the underlying NAS implementation (built-in or external) can
be choosen at run-time depending on configuration.

The implementation specific configuration now needs to be passed
to the constructor instead, not to the init() method as was before.
2020-11-09 05:34:03 +07:00
faluco dfeed52514 - Rename out_stream function to console. 2020-09-29 17:38:13 +02:00
faluco 62faef7c71 - Replaced all uses of the log::console method. 2020-09-29 17:38:13 +02:00
Andre Puschmann 138ec1f8e7 nas,usim: remove use of shadowed variables 2020-07-20 10:58:10 +02:00
Francisco Paisana 1a9c04bf2f use of task scheduler handle in pdcp 2020-07-13 11:19:25 +01:00
Andre Puschmann 1e4eae7395 nas: log estimated count instead of local rx_count when logging integrity check result 2020-07-05 16:56:06 +02:00
Pedro Alvarez 772ab89391 srsUE: Fix for NAS overflow counter computation. 2020-07-02 14:52:21 +01:00
Xavier Arteaga de230826b9 Added string helper for removing spaces and parsing list
Fix

Fix string parser
2020-06-16 11:00:51 +02:00
Andre Puschmann 25ab36ddd5 nas: fix UE not attaching if PLMN isn't found after switching on
if no cell/PLMN can be found if the UE is switched on, the UE was never
trying again.
In theory this would be handled by T3410, but the timer
is not started in case the PLMN search isn't done yet.
2020-05-01 21:03:47 +02:00
Xavier Arteaga 77d5dedddc Fix LGTM warnings and recommendations 2020-04-22 18:01:43 +02:00
Francisco Paisana 28467d568d eliminated old way to schedule tasks using the heap 2020-04-17 11:38:24 +01:00
Andre Puschmann d35c9e2b89 nas: add support ot UE test loop mode B
extend GW-NAS interface to signal test mode activation.
The method is a noop in the normal GW but is implemented in
the TTCN3 DUT according to TS 36.509 for Mode B
2020-04-10 21:18:43 +02:00
Daniel Willmann 925225dbeb Implement Close UE Test Loop/Complete messages
This commit implements support for the CLOSE_UE_TEST_LOOP message.
Currently the mode is not saved and looping the data is not implemented.
Only the *_COMPLETE message is sent back as a response.
2020-04-04 22:51:43 +02:00
Andre Puschmann a4abd96ab6 nas: use MME security header when receiving identity request
this basically avoids sending a integrity protected or ciphered
identity response to a plain identity request
2020-04-03 22:22:04 +02:00
Andre Puschmann 4f8f6bf90c nas: add comment as to why attach request is only integrity protected 2020-04-03 22:22:04 +02:00
Andre Puschmann acc2948b45 nas: fix security handling
First of all, with this the NAS conformance tests pass with ciphering and
integrity turned on. Before only integrity was working.

Mainly the NAS was applying the integrity protection and/or ciphering
incorrectly because it wasn't taking the secuirty status of the PDUs
into account. Some where already correct, some not. The patch
streamlines the handling for all outgoing messages.
2020-04-03 22:22:04 +02:00
Francisco Paisana 30ae2226c1 common interface for stack multiqueue tasks, background tasks and timers 2020-03-31 13:42:06 +01:00
Andre Puschmann dbb8b6a360 nas: add helper for entering new state in FSM
the helper will log the event
2020-03-30 11:23:40 +02:00
Andre Puschmann ef80502047 nas: print attach attempts on console 2020-03-30 11:23:40 +02:00
Andre Puschmann f477c1d2e5 nas: allow starting a attach request procedure even if a PLMN is already selected
previously the NAS would cancel a attach request procedure if the PLMN
is already selected. PLMN selection, however, in not necessarily happening
before requesting RRC to establish a connection.
2020-03-30 11:23:40 +02:00
Andre Puschmann d8680cc9a8 nas: add helper to pack attach request and send to RRC 2020-03-30 11:23:40 +02:00
Andre Puschmann cf28276a3a nas: add helper function to reset NAS security context 2020-03-30 11:23:40 +02:00
Andre Puschmann 94c6034339 nas: rename start_attach_request to start_attach_proc
this is to better differentiate from "send_attach_request" that
only packs and send the actual attach request message. The
entire attach procedure may include PLMN search, etc.
2020-03-30 11:23:40 +02:00
Andre Puschmann 0e76b9ed15 nas: set NAS key set identifier to no key available when attaching with IMSI 2020-03-28 21:24:13 +01:00
Andre Puschmann 9cfe692825 nas: fix reset of attach attempt counter according to 24.301 Sec 5.5.1.1 2020-03-27 18:15:37 +01:00
Andre Puschmann d0480141e5 nas: move re-arming and stopping of attach request related timers
t3402, t3410 and t3411 are now managed in the sender
function of the attach request. previosly they were only
correctly started in the high-level NAS call start_attach_request()
which may not be called if NAS itself resends the request
2020-03-27 18:15:37 +01:00
Andre Puschmann 15c47fab56 nas: adding t3402 to restart attach after initial attach attempt counter expired 2020-03-27 18:15:37 +01:00
Andre Puschmann 7ef56cb637 nas: add an attach attempt counter as described in 24.301 2020-03-27 18:15:37 +01:00
Francisco Paisana 344eaf49ec use logmap in the whole enb and ue 2020-03-25 15:50:30 +00:00
Andre Puschmann 3f10224729 refactor airplane mode simulation and move to NAS
- move handling to NAS
- use switch off to enable airplane mode (don't wait for EPC response)
- add tiny FSM to control airplane mode activation/deactivation
- only start on/off counter after state has been entered
2020-03-23 13:36:25 +01:00
Francisco Paisana de3c28e52d added task dispatch capabilities to stack interface 2020-03-22 11:50:58 +00:00
Francisco Paisana 138347b6b5 nas using stack timers 2020-03-19 21:52:53 +00:00
Francisco Paisana d3f49d0e3c changed interface sync-stack to allow tti jumps > 1 2020-03-19 16:47:55 +00:00
Xavier Arteaga e832769ae6 Updated copyright 2020-03-16 11:26:06 +01:00
Daniel Willmann b7e11b7bda Use RRC establishment cause mo-signalling for NAS Attach procedure 2020-03-15 18:27:51 +01:00
Daniel Willmann 275f26d875 liblte_mme.h: Add/fix UE_TEST_LOOP/DEACT_TEST_MODE msg types 2020-03-15 18:27:51 +01:00
Andre Puschmann 70ffe79b43 add support for periodic airplane mode simulation in srsUE 2020-03-13 17:35:03 +01:00
Andre Puschmann 5b8b718482 simplify NAS security handling and fix missing call in act test mode complete
add extra method to apply NAS security config, if configured,
that can be used by each NAS message sender
2020-03-06 18:07:21 +01:00
Andre Puschmann ae4cfb50f2 print warning to console if TUN interface couldn't be setup 2020-03-03 15:25:53 +01:00
Andre Puschmann dffa2af461 fix NAS re-attach after detach request from network
needed to add a timer to delay transmission of attach request
to allow RRC release on eNB side
2020-02-28 18:09:21 +01:00
Andre Puschmann e4f85ec390 remove re-arming of t3411 after PLMN search
t3411 is restarted after attach or TAU failure only
2020-02-28 18:09:21 +01:00
Andre Puschmann 5b31c1db43 nas: delete security context when receiving attach reject with cause 3, 6, or 35 2020-02-28 12:52:44 +01:00
Andre Puschmann f25b4f17f1 nas: log attach request cause 2020-02-15 19:33:25 +01:00
Andre Puschmann 7c1b4c1f12 add support for IMEISV when requesting UE idendity 2020-02-07 10:19:42 +01:00
Francisco Paisana 296af7e297 fix setting up nas log before all log configuration 2020-01-31 11:56:02 +00:00
Francisco Paisana ea777d92e8 applied new logmap class to nas 2020-01-29 14:20:43 +00:00
Francisco Paisana 91d83fc20d different way to retrieve a proc future 2020-01-24 10:10:27 +00:00
Andre Puschmann 476f970ee1 replace FIXME with TODO 2019-12-18 11:25:56 +01:00
Pedro Alvarez c5979f59eb Clang format UE, eNB and lib (#850)
* Clang-formated UE, eNB and lib.
* Fixed compiling errors from clang-format.
* Fix linking issues introduced by clang-format
* Fix poor formating in initializing arrays of arrays.
* Fix mistake in conflict resolution on rm_turbo.c
* Re-apply clang format to gtpc_ies.h
2019-12-16 16:04:22 +01:00