Commit Graph

669 Commits

Author SHA1 Message Date
faluco f604506858 - Fixed missing initialization issues in nas that caused several jumps in liblte_mme to use uninitialized memory.
- Fixed missing initialization in spgw that caused recvfrom to use an unitialized argument.
2020-09-22 18:00:50 +02:00
faluco 8d1705d6c6 - Fixed a leak in mme_gtpc where the singleton instance was not freed.
- Rewritten the class to be self manage its lifetime.
2020-09-22 18:00:50 +02:00
faluco b5b726ed48 - Fixed a memory leak in s1ap_paging. The static instance was not getting freed.
- Rewrite the singleton to self manage its lifetime.
2020-09-22 18:00:50 +02:00
Pedro Alvarez f85fe1c5ac Don't allow S1 setup with mis-matched TA codes between eNB and EPC. 2020-09-16 13:41:47 +02:00
Pedro Alvarez aafd2cd81c Fix order of discription in user_db.csv.example. 2020-08-31 17:17:41 +01:00
Francisco Paisana 841b884796 remove extern C flags from common_helper.h 2020-08-18 13:54:23 +01:00
faluco cfd3f51931
Import of srslog into srsepc and srsenb. (#1574)
* - Import of srslog into srsepc and srsenb.
* - Removed logger_file and logger_stdout files.
2020-07-30 19:17:23 +02:00
Andre Puschmann 2012fdcbae gtpu: remove unused vars 2020-07-03 16:42:46 +02:00
Pedro Alvarez 5746375b05 srsEPC: Deleted unsued bool in ue context removal interface 2020-06-25 16:32:16 +01:00
Pedro Alvarez 163c078c42 srsEPC: Using bearer state to decide weather to send release bearer request or not. 2020-06-25 16:32:16 +01:00
Pedro Alvarez 10050d2651 srsEPC: Fix sending release bearers request uncessarly on dettach request. 2020-06-25 16:32:16 +01:00
Andre Puschmann 8512c10286 create simple helper method to log command line arguments 2020-06-09 20:55:38 +02:00
Francisco Paisana 0b701022a3 added ue nr mac 2020-05-26 10:02:08 +01:00
Andre Puschmann 63fd12a705 epc,s1ap: fix loop counter that is narrower than size_t 2020-05-11 14:49:56 +02:00
faluco 080ef5ae9a Fix for 1480090. 2020-05-07 10:12:29 +02:00
faluco 7ff251f112 - Fixed warnings caught by Clang 9.0.0 2020-05-07 10:10:24 +02:00
Francisco Paisana 38f848ecdf fix type name deducing for clang 2020-04-27 22:19:08 +01:00
Pedro Alvarez 8c52839599 Disable SIGPIPE when sending S1AP messages in the EPC. 2020-04-27 11:32:12 +01:00
Pedro Alvarez 9680f42925 Fix premature release of UE context on the MME. 2020-04-25 11:31:32 +02:00
Xavier Arteaga 89dcd6339f More LGTM fixes 2020-04-22 18:01:43 +02:00
Xavier Arteaga 77d5dedddc Fix LGTM warnings and recommendations 2020-04-22 18:01:43 +02:00
Andre Puschmann 9f4e1ba62d srsepc: use received NAS count to calculate MAC
this is according to 24.301 Sec 4.4.3.3 which says the receiver
should use the sequence number included in the received message
rather a local estimate
2020-04-03 22:22:04 +02:00
Francisco Paisana 344eaf49ec use logmap in the whole enb and ue 2020-03-25 15:50:30 +00:00
Andre Puschmann ac17ec6452 add common signal_handler for srsUE/srsENB/srsEPC
the signal handler is the same for all three apps. The "running" flag
as well as the file_logger object are in the common header in order
to allow the signal handler to flush the file if the alarm goes off.
2020-03-17 09:58:01 +01:00
Xavier Arteaga e832769ae6 Updated copyright 2020-03-16 11:26:06 +01:00
David Lin be7c5a009d Fixed typo in invalid ip header length
Note that the word 'lenght' is wrong,
so that 'lenght' should been replaced with 'length'.
2020-03-09 10:16:48 +01:00
Pedro Alvarez bd3598f774 Moved srsEPC to the new S1AP library. Deleted liblte_s1ap.cc and liblte_s1ap.h. 2020-03-06 11:57:07 +00:00
Andre Puschmann a8bbe551ac move thread class into srslte namespace to avoid ambiguity between std::thread 2020-03-03 16:22:04 +01:00
Pedro Alvarez 746de79859 Adding const to some setters (adressing Francisco's comments). 2020-02-26 18:15:13 +00:00
Pedro Alvarez 126e6126fa Removed unused function. 2020-02-26 18:15:13 +00:00
Pedro Alvarez 1be699ce32 Removed unused variable in HSS. 2020-02-26 18:15:13 +00:00
Pedro Alvarez 38411a8417 Clang-formated the EPC in preperation for PR. 2020-02-26 18:15:13 +00:00
Pedro Alvarez 3d4f300b6f Moved some helper setters/getters to hss_ue_ctx_t to remove more useless lookups. 2020-02-26 18:15:13 +00:00
Pedro Alvarez 88c7988813 Fix bug in re-sync procedure. 2020-02-26 18:15:13 +00:00
Pedro Alvarez 469c3ad273 Removed more useless lookups. 2020-02-26 18:15:13 +00:00
Pedro Alvarez 93fbf741d7 Remove unecessary context lookup in increment_ue_sqn 2020-02-26 18:15:13 +00:00
Pedro Alvarez 4f62e6c08c Started to remove unecesssary lookups in gen_auth_info_answer_milenage 2020-02-26 18:15:13 +00:00
Pedro Alvarez a99ce1fc51 Started to remove unecesssary lookups in gen_auth_info_answer_xor 2020-02-26 18:15:13 +00:00
Pedro Alvarez 98400f65e2 Changed hss ue_ctx map to use unique pointers. 2020-02-26 18:15:13 +00:00
Pedro Alvarez 58bd5631e3 Starting to change map in HSS to use uinque_ptr. 2020-02-26 18:15:13 +00:00
Ismael Gomez a5b7dcdf16
Remove boost string (#936)
* Remove boost string

* Make sure that int/enc algos can be specified in capital case in the MME.

* Use == instead of compare for comparing strings with const chars

Co-authored-by: Pedro Alvarez <pedro.alvarez@softwareradiosystems.com>
2020-02-16 21:32:49 +01:00
Andre Puschmann cccabdaf4f removing unneeded install targets for static libs (reported by Filipe) 2020-02-10 17:38:42 +01:00
Pau Espin Pedrol 4949df257e Proper shutdown on SIGHUP
If a process exits and has a controlling terminal, everything under
it gets a SIGHUP by the kernel. That's the case for instance when
running a srsUE over ssh with some specific parameters. As a result,
when the ssh client is killed, SIGHUP is sent to srsUE, which will be
killed immediatelly without proper release, which means in turn that log
buffers are not flushed.
Let's do proper shutdown when SIGHUP is received so that everyone can
get log files.
2020-02-06 16:19:40 +01:00
Pau Espin Pedrol 64de92183b epc: Drop signal(SIGKILL) calls
SIGKILL cannot be intercepted by apps, so it's useless adding a signal
handler for them. I'm pretty sure the signal() function is erroring in
this scenarios. From signal() man page:
"The signals SIGKILL and SIGSTOP cannot be caught or ignored."
2020-02-06 16:19:40 +01:00
Merlin Chlosta c2e95b1e2a Reject TAU to force UE to reconnect 2020-01-28 11:50:28 +00:00
Andre Puschmann 476f970ee1 replace FIXME with TODO 2019-12-18 11:25:56 +01:00
Xavier Arteaga b48bb0d754 Removed atof, atoll and atoi calls 2019-12-02 09:47:22 +01:00
Pedro Alvarez 48f9df8615 Applied clang-format to all of the srsepc folder. 2019-10-18 15:40:40 +02:00
Andre Puschmann a2ab043c0d fix memleaks and uninitialized vars found by cppcheck 2019-09-20 10:55:29 +02:00
Andre Puschmann 4ac5448ad7 fix formatting in NAS 2019-09-16 21:39:15 +02:00
Pedro Alvarez 1ae8ccda8c Added EIA3 and EEA3 to default UE capabilities to srsUE. Added parsers for EEA3/EIA3 config options in srsENB and srsEPC 2019-09-10 13:46:21 +02:00
David Rupprecht bb97d7d199 fixing key naming 2019-09-10 13:46:21 +02:00
David Rupprecht 50332089ce Add EEA3 and EIA3 support for UE/enodeb and MME 2019-09-10 13:46:21 +02:00
Ismael Gomez c92c61d560
Optimized front-end logging processing (#641)
Avoid memory allocation and stringstream in log frontend calls (executed from worker threads). Uses a buffer pool of fixed buffer and vsnprintf
2019-09-04 15:32:29 +02:00
Francisco Paisana 67d6a25194 Moving mac timers to stack timers (#638)
* first step towards moving MAC timers to stack. Mac is still using its own timers. srslte::timers class can be restructured.

* moved timers out of the UE MAC
2019-09-04 15:28:09 +02:00
Digicrat 86ec3101e0 Fix bug wherein blank lines or trailing newlines causes parsing of user_db.csv to fail. 2019-08-05 11:16:41 +02:00
Pedro Alvarez 494be243c0 Changed security direction to use an enum. 2019-07-30 15:01:50 +02:00
Andre Puschmann 5faa819dcd fixing uninitialized class members found by coverity 2019-07-08 11:12:46 +01:00
Pedro Alvarez de4d459e5f Fix issue of IMSI context already present when receiving a GUTI attach with bad integrity. This could cause a sigpipe in the EPC when the eNB was re-started. 2019-07-03 17:24:40 +02:00
Pedro Alvarez b617f76bdc S1AP Debug message. 2019-07-03 17:24:40 +02:00
Pedro Alvarez b97d1191f4 Added more debug info at eNB GTP-U. Changed the pdcp_entity to follow the standard more strictly for RLC AM DRBs. 2019-06-27 17:09:52 +02:00
Pedro Alvarez 609e5cce2c Initializing attach request in EPC NAS. 2019-06-24 21:27:08 +02:00
Pedro Alvarez 2ed60412b9 Removing debug printfs. 2019-06-24 21:27:08 +02:00
Pedro Alvarez 36bd20d308 Making sure that the security algorithms are kept when the NAS context is reset. Attach request after a service reject seems to work now (with COTS UE). 2019-06-24 21:27:08 +02:00
Pedro Alvarez 50506ffa26 Changed NAS initialization from init function to constructor. Continuing to add the logic to handle attach request as a Uplink NAS message. Added debug log to s1ap::send_downling_nas_message. 2019-06-24 21:27:08 +02:00
Pedro Alvarez 20ee17088f Starting to add handling of attach request as a Uplink NAS transport message. 2019-06-24 21:27:08 +02:00
Pedro Alvarez d67d18cc6b Removing deplicated error codes. 2019-06-07 13:51:56 +02:00
Andre Puschmann e47010130f extend thread class to set unique thread name in ctor
this will also extend all classes that use srslte::thread
to specify the name of the thread in the ctor as well
as to set the name of the worker threads in the thread pool
the thread name will be displayed in gdb.
2019-06-03 15:03:20 +02:00
Francisco Paisana 0e3baa0f2f Renamed the reset() method of byte_buffer_t to clear() 2019-05-16 12:35:01 +02:00
Andre Puschmann 7e5e2b142e fix uninitialized members in MME NAS 2019-05-03 10:15:37 +02:00
Pedro Alvarez f303167206 Fix GTP-C socket initialization to remove compiler warnings. 2019-05-02 11:41:59 +02:00
Andre Puschmann 4c16a1f719 fix uninitialized struct 2019-04-30 13:59:06 +02:00
Andre Puschmann 64dd4c1fc4 fix issue when packing service reject fails and NAS uses initialized logger 2019-04-30 13:59:06 +02:00
Andre Puschmann 4b01a2e4a0 update copyright notice 2019-04-29 09:20:02 +02:00
Andre Puschmann 205db6f229 add missing license headers 2019-04-26 21:20:12 +02:00
Ismael Gomez 7780b1aba5 add tdd/ca support 2019-04-25 20:57:58 +02:00
Pedro Alvarez 64d50040e7 Changed some paging logs to debug and removed noisy print to console in the EPC 2019-04-15 14:52:09 +01:00
Pedro Alvarez 49577b6b5f Making sure that packet queued in the SPGW is freed when queue_downlink_packet enconters errors. Reverse the order of sending paging and queueing packet so that paging_pending is properly set to true. 2019-04-15 12:52:14 +02:00
Pedro Alvarez 7cdc012bb2 Printing fixes in the EPC for ARM 2019-04-12 20:08:25 +02:00
Pedro Alvarez 1bac758a85 EPC now sends service reject to a UE that sends service request with bad integrity. 2019-04-12 16:24:57 +02:00
David Rupprecht dabf586316 ISMI to IMSI typo 2019-04-11 21:38:01 +02:00
Pedro Alvarez d7d461fb8c Change user_db.csv.example to consider static IPs. Changed warning print in HSS. 2019-04-11 15:55:46 +02:00
Joseph Giovatto 056bfef996 use inet_pton to vefify ip address validity 2019-04-11 15:55:46 +02:00
Joseph Giovatto fa99aa590e added support for optional ue static ip address (rebase #225) 2019-04-11 15:55:46 +02:00
Andre Puschmann 41c85adaf2 handle EPC config file errors gracefully 2019-04-09 17:28:09 +02:00
Pedro Alvarez 3ad19f21b6 Adding per UE authentication algorithm choice to the HSS and users_db.csv. 2019-04-09 17:17:02 +02:00
Pedro Alvarez ca603810ce Adding Downlink data notification and paging functionality to the EPC.
This entails:

  * Adding S1AP paging messaging to the MME.
  * Adding the Downlink Data Notification, Donlink Data Notification Acknoledgment, and Downlink Data Notification Failure Messages.
  * Adding the logic at the GTP-U to detect that Downlink Data notification needs to be sent.
  * Proper handling of the new GTP-C messages at the MME GTPC and SPGW GTPC classes
  * Add queuing mechanisms at the GTP-U while waiting for paging response. Queue is flushed when paging fails (timeout or other).
  * Make sure eNB's SCTP information is properly stored.
  * Make sure UE's GUTI information is properly stored.
2019-04-09 16:59:44 +02:00
Pedro Alvarez 1db959c661 Added NAS timer functionality to the EPC. This entails:
* Adding timer creation at NAS using timerfd_create
  * Adding the ability to add and remove the timer file descriptor to the MME main select loop
  * Adding the ability to the MME for the NAS to check if a timer is running
  * Adding the timer expiry handling functionality at the MME
2019-04-08 13:05:54 +02:00
Pedro Alvarez 9463b95dc1 Remove unused mutex in the SPGW. 2019-04-03 09:52:18 +02:00
Pedro Alvarez 3933b269d7 Added GTP-C message passing between MME and SPGW using UNIX sockets.
* Added S11 sockets to SPGW select and MME select
  * Added send_s11_pdu message to SPGW and MME
  * Remove pointer for replies in handle_s11_pdu
2019-04-03 09:52:18 +02:00
Pedro Alvarez 3e9f10e20d Adding S11 initialization in MME and SPGW as unix sockets. 2019-04-03 09:52:18 +02:00
Pedro Alvarez 5f7b6ba79e Split GTP-C and GTP-U functionality into seperate classes in the SPGW. Added GTP-U specific logging in the EPC. Added handle_s11_pdu function to both the MME GTP-C entity and the SPGW GTP-C entity. 2019-04-02 09:17:00 +02:00
Pedro Alvarez 6e500c5b86 Changed initilization of the NAS at the EPC, to make it easier to add new interfaces. 2019-03-20 14:00:02 +01:00
Pedro Alvarez add60c1288 Applied clang-format to the EPC. 2019-03-20 14:00:02 +01:00
Andre Puschmann a436baed39 fix build string for builds without valid .git folder 2019-01-22 12:09:52 +01:00
Pedro Alvarez c5dad67a16 Adding catch to boost program options parser. 2019-01-18 12:38:56 +00:00
Francisco Paisana 0204db2e12 new asn1 rrc library 2019-01-17 17:43:13 +01:00
Pedro Alvarez b675e1fcc9 Ciphering EMM information message. Chainging detach_request security header in the UE to integrity and ciphered to avoid malformed message. 2019-01-14 17:00:16 +00:00
Pedro Alvarez b5d5f9f91c Re-adding support for EIA2 in EPC. 2019-01-14 15:38:19 +00:00
Pedro Alvarez 179aeddfa2 Added encryption of security mode command and attach accept again. Attach is working with encryption. 2019-01-11 18:13:29 +00:00