Commit Graph

6540 Commits

Author SHA1 Message Date
faluco 0b127fa8c7 - Fixed several errors that could sent uninitialized data through the network. 2020-09-22 18:00:50 +02:00
faluco a4f0ecba36 - Fixed a heap corruption where recvfrom could write past the buffer end. 2020-09-22 18:00:50 +02:00
faluco c1e680769c - Remove stray code left behind. 2020-09-22 18:00:50 +02:00
faluco 47953f4ef4 - Prefer addrlen initialization for each call to recvfrom. 2020-09-22 18:00:50 +02:00
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
faluco f0d651ae8e - Fixed a leak in the MME class not releasing the static byte buffer pool.
- Now the pool gets destroyed on program exit using a unique_ptr.
- Removed manual cleanup() calls in all the code base to free the pool instance.
2020-09-22 18:00:50 +02:00
Francisco Paisana dcf5a727f2 do not send RRC release in case the eNB receives a S1AP UEContextRelease command and the UE is doing handover. Handle GTPU end marker 2020-09-22 16:51:45 +01:00
Ismael Gomez 5968157ea5
Protect better the access to shared variables in phy_common and metrics (#1750) 2020-09-22 14:32:08 +02:00
Andre Puschmann eeb2b904aa ue,rach: fix failing RACH proc when Msg3 grant RNTI matches current CRNTI
this was preventing that the Temp-CRNTI used in the RAR to be identical
to the currently configured C-RNTI of the UE.

The issue simply was that the RACH procedure was declared successful too
early, even before the Msg3 UL grant was filled with the Msg3 content.

The patch moves the logic that detects the successful completion of
the RACH procedure below the Msg3 packing.
2020-09-22 14:03:39 +02:00
Andre Puschmann a36f9bddc2 ttcn3: use RNTI values in RACH provided by tester
this patch extends the SS to use the C-RNTI and Temp CRNTI values
provided by the tester for RAR and Msg3.
2020-09-22 14:03:39 +02:00
faluco e14cb4b405 - Fix a missing thread join in the phy which caused a memory leak. 2020-09-22 09:17:01 +02:00
faluco 5acc1c9a73 - Cleaned up style in the PRACH class:
* Removed magic numbers.
* Reduced indentation of statements with early exists.
* Removed elses after a return statement.
* Trimmed unnecessary include files.
* Default initialized members in the class.
2020-09-21 09:50:20 +02:00
faluco b892da0294 - Calculate the FFT of the PRACH on demand.
- Fixed a PRACH test that was failing with ASAN.
2020-09-21 09:50:20 +02:00
faluco b6bbe8761a - Remove left over printf. 2020-09-21 09:50:20 +02:00
faluco 79f5b62551 - Calculate PRACH buffers on the fly when required instead of pregenerating all of them. 2020-09-21 09:50:20 +02:00
Andre Puschmann b616944a13 ue,rrc: fix security config during HO/reestablishment
we fix a number of very related issues for HO/reestablishment
in the success/error case:

* this patch removes the hard-coded check that intra-cell HO aren't
allowed. There are cases where eNBs use this method to update
the security context.

* the patch also fixes an issue after failed HO where the security context
of the source eNB should be used for the reestablishment.

* update security keys according to specs when mobilitycontrol
indicated change of key
2020-09-21 09:27:07 +02:00
Andre Puschmann d90de639e5 ttcn3_syssim: continue when epoll returns -1
this allows to debug and step in the SS
2020-09-21 09:27:07 +02:00
Andre Puschmann 1b266257a1 ttcn3_phy: improve logging of cell measurements 2020-09-21 09:27:07 +02:00
Andre Puschmann 6827c2df21 rrc_meas: disable layer3 filtering until quantity config is received
the filter alpha was initialized to zero by default which causes an
issue because the first measurement for a cell can't be updated,
because the filtering function will always return the current value.

According to 36.331 Sec 5.5.3.2 Note 2, a k-value of 0 should turn
off filtering, which should be used as the default value until
an update is received from the network.
2020-09-21 09:27:07 +02:00
Francisco Paisana 13a5bfb525 - fix reestablishment reject transmission in the srsenb. For SRB0 SDUs, no RLC header is required, so we do not need to check in such case if there is enough space in the TB for the header.
- fix srsenb reestablishment check for UE context. The pci has to be accounted for the srsenb to understand that the UE trying to do reestablishment corresponds to one of its own
2020-09-18 22:18:05 +01:00
Francisco Paisana 97133894e6 the Ocs value used in the measReport triggering decision was not being set correctly. The enum of the cell individual offset in the measCfg was being cast to an int and stored. Instead what we want is to store the actual offset value using the ASN1 enum->number lookup table. 2020-09-18 13:17:32 +01:00
Xavier Arteaga 8cb3945886 SRSUE: fix RV assertion for PUSCH 2020-09-17 22:39:56 +02:00
Xavier Arteaga 44c2412be2 SRSUE: silent PUSCH encoding error by dropping invalid grant 2020-09-17 22:39:56 +02:00
Francisco Paisana 739c0c5c00 altered plmn search procedure handling of failed cell searches. If a cell search procedure fails due to inability to select a cell or acquire SIB1, the plmn search carries on for other frequencies. 2020-09-17 16:43:58 +01:00
Xavier Arteaga 3e6c337b44 SRSENB: protect MAC softbuffers access
SRSENB: fix retransmissions
2020-09-16 20:07:20 +02:00
Xavier Arteaga b633c1abcd SRSENB: report MAC CSI measurements of all configured cells 2020-09-16 20:07:20 +02:00
Xavier Arteaga d0969a7ad9 SRSENB: review PHY UE DB assertions 2020-09-16 20:07:20 +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
Andre Puschmann 49655cd33c enb,s1ap: only log info in the s1ap connection procedure
the event is logged as error by the calling function already
2020-09-16 13:41:32 +02:00
Andre Puschmann 9dd02af15c network_utils: lower verbosity of when socket connection fails
the network helper can log this event but it should be up to
the caller to decide whether this is an error or not.
2020-09-16 13:41:32 +02:00
Francisco Paisana 7e6487b6fa perform PUCCH+PRACH PRB reservation right at the start of a new TTI in the scheduler 2020-09-15 16:10:50 +01:00
Andre Puschmann 3088cdbb0f ttcn3: fix uncaught exception in SS
fix accessing child element in parsed Json without checking
its existence.
2020-09-14 21:20:59 +02:00
Andre Puschmann 8df388ba3e usim: fix typo in log 2020-09-14 21:20:59 +02:00
Andre Puschmann 3e824f6370 ttcn3: convert TTI action vector to queue
this makes sures queued events are executed FIFO
2020-09-14 21:20:59 +02:00
Andre Puschmann 624c8142ad ttcn3: refactor cell handling in SS
this rather large patch changes the way cells are handled in the SS.
It moves RLC and PDCP entities to the cell map of the SS, such that each cell
has its own entities. This allows to support HO operation, for example,
in which two cells need to send SRB messages.

It also extends most of the syssim interface to include the cell name
in all commands so they can be applied on the specified cell only.
2020-09-14 21:20:59 +02:00
Andre Puschmann 4650a620d9 ttcn3: refactor cell search and selection in TTCN3 PHY
- make sure only suitable cells are reported/selected
2020-09-14 21:20:59 +02:00
Andre Puschmann 973de8f78d ttcn3_dut: block OS signals before starting log backend
this prevents the backend thread from handling the signals. they
are only handled by epoll running in the main thread.

this fixes #1713
2020-09-14 21:20:00 +02:00
Andre Puschmann 6dc7841369 epoll_helper: move code to block OS signals into own helper function
before epoll can handle signals, the calling thread needs to block
them. the blocking needs to happen before any other threads get
spawned so they inherit the mask.
2020-09-14 21:20:00 +02:00
Andre Puschmann d30822784f enb: refactor MAC PDU logging
* remove single line MAC PDU subheader logging in favor
  of to_string() helper that prints entire MAC header in single line
* log MAC PDU after parsing and packing
2020-09-14 20:09:46 +02:00
Andre Puschmann 33c050791f pdu: add missing to_string() content for MAC SCH PDU subheaders
* add both scell activation CE
* add rnti to CRNTI and CONT RES CE
2020-09-14 20:09:46 +02:00
Ismael Gomez b397878d25 Fix comments in ue.conf 2020-09-14 16:54:47 +02:00
Andre Puschmann 0ec49a7b19 update readme and bump version of 20.04.2 2020-09-13 21:07:04 +02:00
Andre Puschmann 9e7d881bc8 srsenb: remove QAM256 related options in RRC Connection Reconfig
this part of the RRC connection reconfig has caused issue for some
newer phones like the Iphone X, One Plus 6T.
The phone would receive the message but not respond with a reconfig
complete.

The patch fixes this issue by disabling QAM-256 support altogether.
2020-09-13 20:59:20 +02:00
faluco c178e362b8 - Rewrite log management so that a log sink can be swapped for each testcase. 2020-09-10 17:14:51 +02:00
Xavier Arteaga 1d71cf8557 Avoid zero division 2020-09-10 11:11:46 +02:00
faluco 5e8a4c898d
Bring back the circular array object. (#1712) 2020-09-09 17:16:47 +02:00
Ismael Gomez 59b6301cc8 Remove legacy arbritrary 1s timeout for eNB requests 2020-09-08 22:28:35 +02:00
Andre Puschmann 6a56476b2a rlc: increase RLC Tx SDU queue
the Tx SDU has been set to 128 PDUs because this gives approx.
150kByte UL buffer state (max value for Rel 8 BSR).

Previously, however, we've always reported too much pending UL
data because we weren't subtracting the transmitted data from
the reported data.

with this newer BSR reporting, however, even with full buffers we would
never report full buffers because the queues size is too short.

This seems to cause issues for iperf TCP sessions not resulting
in full DL rate, see isse #1703. It seems that the TCP bandwitdh
probing works better with larger buffers (in our case this can
only be achieved with more PDUs in the pool).

This should fix #1703
2020-09-08 22:27:21 +02:00