Commit Graph

1394 Commits

Author SHA1 Message Date
Pau Espin 3a28ddce37
[PFCP] Fix typo in log line (#1526) 2022-05-10 22:40:32 +09:00
Sukchan Lee de2ecd6400 [GTP2] Fixed handling multi-bearer messages(#1498) 2022-04-29 21:28:16 +09:00
Sukchan Lee d50a5a44f9 [SBI] cJSON v1.7.7 -> v1.7.15 (#1503) 2022-04-23 02:42:53 +09:00
Pau Espin 2de12e32f4
[SMF] Integrate session tear down cycle into sess->sm (#1500)
* [SMF] smf_sm.c Fix indentation

* [SMF] gsm-sm: log fsm events

* [SMF] Integrate session tear down cycle into sess->sm
2022-04-20 21:42:18 +09:00
Sukchan Lee 79de674fd8 [PFCP] F-TEID allocation by SMF (#1466) 2022-04-16 14:08:56 +09:00
Sukchan Lee 433d5f6bf3 Distinguish the type of session creation 2022-04-14 17:34:55 +09:00
Sukchan Lee 80cd9d725f [SBI] fixed HTTP2 header values is 0 (#1488) 2022-04-14 11:28:37 +09:00
Pau Espin e3da7c9934
Rename GTPv2C specifics to gtp2 prefix (#1485)
In the past only GTPv2C was supported, and had the "gtp" generic prefix.
Later on, GTPv1C support was added, and "gtp1" prefix was used.
Let's move GTPv2C specific bits to have "gtp2" prefix too, and leave
"gtp" prefix for generic stuff among different GTP versions.
2022-04-13 07:07:39 +09:00
Sukchan Lee e5ff03b249 [SBI] Change the reference count (#1440)
Change the client's reference count method
to use the same method as nf_instance
2022-04-10 20:09:27 +09:00
Sukchan Lee 49c34605db [SBI] fixed the SMF discover bug (#1440) 2022-04-09 13:24:40 +09:00
Sukchan Lee ff242cd6ea [Gy] Follow-up PRs (#1479) 2022-04-09 10:41:02 +09:00
Pau Espin 2be12903cb
[SMF] Introduce optional Gy interface support (#1479)
The use of the Gy interface (SMF acting as CTF towards an OCS node) is
mandated through configuration file. Default value "enable: auto" will
only make use of it in case a Diameter peer announcing support for the
Credit-Control Application is found.

Upon subscriber session creation, and after auth check over Gx, the SMF
will create a Gy session with the OCS and only after that step the SMF
will accept the session back to the subscriber.
The OCS may then grant some traffic volumes/time and ask to be notified
back with updated measurements.
In order to get the measurements, the SMF relies on PFCP URR configured
to the UPF through Session Repoort Request messages.
When closing the subscriber session, the SMF will also terminate the Gy
session at the OCS.

So far only some specifics parts of the Gy interface as well as the PFCP
side are implemented. Those should be enough to at least have
volume/time thresholds granted by the OCS, which then will be able to
track subsriber resource use.

This patch doesn't implement the OCS side of the Gy interface, that's
left as a future exercise. The interface was tested using an OCS
emulator implemented in TTCN-3 [1]

[1] https://cgit.osmocom.org/osmo-ttcn3-hacks/
2022-04-09 08:26:28 +09:00
Pau Espin 7455424d29
Fix trailing whitespace (#1478) 2022-04-09 08:19:59 +09:00
Sukchan Lee 0b3df3e3db Revert "Introduce Gy interface (#1471)"
This reverts commit 106f2729c3.
2022-04-09 00:45:26 +09:00
Pau Espin 106f2729c3
Introduce Gy interface (#1471)
TODO:

* Use an event for the report, like SMF_EVT_N4_TIMER?

*  Properly set Service identifier in Gy CCR

* SMF: Properly set pkt/octet volumes in Gy CCR
** Update when receiving PFCP Modify Response.

* Figure out best way to require Gy through config file in open5gs-smfd.

* Create a new sess-sm.c which handles smf_sess_t state through
  Gx+Gy+PFCP creation, modification and tear down. This way we can do
stuff in parallel, for instance Gx+Gy. It will alsoavoid duplicating
some code paths due to Gy being optional.
2022-04-09 00:08:58 +09:00
Pau Espin fb8ebcdbea
[UPF] Add initial support for URR Usage Report (#1476) 2022-04-08 23:10:42 +09:00
Pau Espin 52672cff65
[DIAM] Add Gy interface support to lib/diameter (#1474)
This commit adds required blocks in lib/diameter to be able to handle Gy
messages later in open5gs apps.

The Gy interface is mainly decribed in 3GPP TS 32.299  and 3GPP TS
32.251, which in turn refers to Diameter protcols defined in RFC4006.
This interface allows charging managment through an external OCS node.
2022-04-08 21:13:02 +09:00
Pau Espin 77f7bb7af7
[PFCP] Use proper IE to signal triggers in Usage Report (#1472)
The "Report Triggers" is sent SMF->UPF to tell in which situations a
report should be sent.
The "Usage Report Trigger" is sent UPF->SMF to indicate which situation
triggered the report.
2022-04-08 21:12:42 +09:00
Sukchan Lee 3121d183f0 [HSS/PCF] Store IMEISV instead of IMEI (#1464) 2022-04-02 00:46:05 +09:00
EugeneBogush f557fc8eaa
Add/update current imei of UE in subscriber profile (#1464)
* first commit

* fix

Co-authored-by: root <root@lfv.unassigned-domain>
2022-03-31 19:35:30 +09:00
Pau Espin fbfb72c1b7
[PFCP] Support multiple Usage Report IEs in all messages (#1461)
* [PFCP] Properly check down_data_report inclusion building SessionReportRequest

* [PFCP] Support multiple Usage Report IEs in all messages
2022-03-31 09:43:35 +09:00
Sukchan Lee 038fb680f4 Revert configuration for backward compatibility 2022-03-31 02:15:13 +09:00
Pau Espin 4b8d3a845a
[PFCP] Support associating multiple URRs to a PDR (#1456)
* [PFCP] Fix trailing whitespace in message generation files

* [PFCP] message gen: Support multiple URR ID IEs in Create PDR group

* [PFCP] Support associating multiple URRs to a PDR

According to 3GPP TS 29.244:
"""
A PDR shall contain:
- zero, one or more URRs, which contains instructions related to traffic measurement and reporting.
"""
2022-03-28 21:56:58 +09:00
Sukchan Lee 12c656efd0 Improve Slice/DNN selection (#1438), (#1440) 2022-03-27 17:50:31 +09:00
Sukchan Lee ced37a6201 fix the slice issues (#1438), (#1440) 2022-03-26 23:53:53 +09:00
Pau Espin 38e2dee17f
[PFCP] Handle Measurement Information in Create/Update URR IEs (#1453) 2022-03-26 00:33:32 +09:00
Pau Espin 89636fa8d3
[PFCP] Handle Measurement Information in Create/Update URR IEs (#1452) 2022-03-26 00:07:34 +09:00
Pau Espin cc0d147f5c
Fix trailing whitespace (#1451) 2022-03-25 23:35:27 +09:00
Pau Espin 12bac7a917
[PFCP] Avoid requiring optional fields in Update URR IE (#1449) 2022-03-25 05:58:40 +09:00
Sukchan Lee 2cb06b3085 remove pool related configuration (#1431) 2022-03-23 15:14:18 +09:00
Sukchan Lee 37af21a88d [MEM] fix the pkbuf problem (#1431) 2022-03-22 22:47:45 +09:00
Sukchan Lee bf77318602 [MME] re-factor to check a piggybacked ESM (#1431) 2022-03-16 20:48:48 +09:00
Sukchan Lee a6ec206998 Change EPERM to OGS_EPERM (#1436,#1404) 2022-03-16 20:32:19 +09:00
Pau Espin f060da45d5
[CORE] time: Add APIs to manage NTP 32-bit timestamps (#1439)
These will be further needed in PFCP in the future, as well as in other
Diameter based interfaces (such as Gy).
Let's put all implementation details in APIs so that devs don't need to
care about those details every time.
2022-03-16 11:25:30 +09:00
Pau Espin 80ce991aa6
[CORE] Improve SO_BINDTODEVICE error log line (#1436) 2022-03-16 11:25:21 +09:00
Sukchan Lee bcf53124d5 Improve the socket option configuration (#1404)
o GTP-C Option (Default)
  - so_bindtodevice : NULL

  gtpc:
    addr: 127.0.0.7
    option:
      so_bindtodevice: vrf-blue

o GTP-U Option (Default)
  - so_bindtodevice : NULL

  gtpu:
    addr: 127.0.0.7
    option:
      so_bindtodevice: vrf-blue

o PFCP Option (Default)
  - so_bindtodevice : NULL

  pfcp:
    addr: 127.0.0.7
    option:
      so_bindtodevice: vrf-blue

o SBI Option (Default)
  - tcp_nodelay : true
  - so_linger.l_onoff : false

  sbi:
    addr: 127.0.0.10
    option:
      tcp_nodelay: false
      so_linger:
        l_onoff: true
        l_linger: 10

o NGAP Option (Default)
  - sctp_nodelay : true
  - so_linger.l_onoff : false
ngap:
  addr: 127.0.0.5
  option:
    stcp_nodelay: false
    so_linger:
      l_onoff: true
      l_linger: 10

o NGAP SCTP Option (Default)
  - spp_hbinterval : 5000 (5secs)
  - spp_sackdelay : 200 (200ms)
  - srto_initial : 3000 (3secs)
  - srto_min : 1000 (1sec)
  - srto_max : 5000 (5secs)
  - sinit_num_ostreams : 30
  - sinit_max_instreams : 65535
  - sinit_max_attempts : 4
  - sinit_max_init_timeo : 8000(8secs)
ngap:
  addr: 127.0.0.5
  option:
    sctp:
      spp_hbinterval : 5000
      spp_sackdelay : 200
      srto_initial : 3000
      srto_min : 1000
      srto_max : 5000
      sinit_num_ostreams : 30
      sinit_max_instreams : 65535
      sinit_max_attempts : 4
      sinit_max_init_timeo : 8000
2022-03-15 22:03:50 +09:00
Pau Espin dd5abb79b4
[PFCP] Fix wrong endianess enc of some URR values (#1433)
* [PFCP] Fix trailing whitespace

* [PFCP] Fix wrong endianess enc of some URR values

u32 tlvs are already converted to big endian automatically. Manually
doing so ends up in double conversion and hence in wrong endianness
being sent over the wire.
Similar issue was also fixed recently in the PFCP decoding path.
Related: https://github.com/open5gs/open5gs/issues/1349
2022-03-15 13:34:22 +09:00
Pau Espin 5b81802be9
[Gx] Fix trailing whitespace (#1420) 2022-03-08 21:50:20 +09:00
Pau Espin 4388f9bf3a
[Gx] Use OGS_DIAM_GX_APPLICATION_ID define instead of hardcoded val (#1419) 2022-03-08 21:50:05 +09:00
Sukchan Lee c1fc25958c Change default to bindtodevice:false 2022-03-08 19:49:16 +09:00
Sukchan Lee 253e2ad98a [GTP/PFCP] Support VRF (#1404) 2022-03-07 22:43:18 +09:00
Pau Espin 7bddc92322 [GTP] Support binding socket to device
This is useful, among other possible applications, to make use of VRFs [1],
in this case for GTP-C and GTP-U traffic in the PGW.

The bind_dev field is added to the ogs_socknode_t so that it's easy to
extend its use into lots of other sockets being set up based on config
file information.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/vrf.rst
2022-03-02 20:07:51 +01:00
Sukchan Lee 3217e93124 [LINUX] initialize struct epoll_event (#1399) 2022-03-01 21:03:27 +09:00
Pau Espin d06acc7f37
Fix trailing whitespace (#1402) 2022-03-01 17:13:40 +09:00
Sukchan Lee efe37c1e84 [ASN1C] asn.1 issues in NGAP (#1394 from @nkout)
mouse07410/asn1c#89
Found when tried to encode NGAP_CauseRadioNetwork_release_due_to_pre_emption

mouse07410/asn1c#90
Found when tried to decode messages encoded with newer schema
2022-02-26 16:09:38 +09:00
Supreeth Herle 52bc4be547
Bugfix packet filter for pre rel11 LTE devices (#1393)
* Fix conversion from IPFilterRule to packet filter

As per 3GPP TS 24.008, following Packet filter component type identifier
are not supported on the LTE pre release-11 UEs:

IPv4 local address type
IPv6 remote address/prefix length type
IPv6 local address/prefix length type

And,
IPv6 remote address/prefix length type and
IPv6 local address/prefix length type shall be used when both MS and
Network support Local Address in TFTs.

This commit add logic to omit adding local address in packet filters
for compatibility with pre-release LTE 11 devices. The following parameter
could be used to toggle omit/no to omit behavior.

parameter:
	no_ipv4v6_local_addr_in_packet_filter: <true/false>

* Remove logic of supporting pre-release LTE 11 devices in PCRF
2022-02-25 22:11:51 +09:00
Pau Espin 3b6da3ddb2
[GTPv1C] Fix sequm not added to EchoResponse and VersionNotSupported (#1390)
According to TS 29.060 they should be added.

section 7.6:
"if it is a request for which a response has been defined, shall be sent
with a Sequence Number"

section 8.2:
"""
Sequence number flag (S) shall be set to "1"
...
For GTP-C messages not having a defined response message for a request
message, i.e. for messages Version Not Supported, RAN Information Relay
and Supported Extension Headers Notification, the Sequence Number shall
be ignored by the receiver.
"
2022-02-24 23:38:52 +09:00
Pau Espin dbd9e8bd78
[GTPv1C] Set EUA spare field to '1111' as per spec (#1388) 2022-02-24 06:03:54 +09:00
Sukchan Lee d61127afcc [SMF] fix the seperate DNS in PCO IPCP (#1358) 2022-02-23 17:38:07 +09:00
Pau Espin b0fc06ab6c
Fix trailing whitespace (#1381) 2022-02-22 07:00:06 +09:00
Sukchan Lee e3fa731c4a [SBI] fix the timezone string converter (#1376) 2022-02-20 20:18:32 +09:00
Sukchan Lee 420c1d5ad3 [SMF] fix the PCO bug (#1357, #1358)
- SMF can handle PCO ID PAP (0xc023)
- SMF adds DNS servers to PCO IPCP only if UE requested
2022-02-19 16:05:07 +09:00
Sukchan Lee b4f382d360 [MEM] fix pkbuf problem in multi-threads (#1353)
We should use talloc in multi-threads instead of pkbuf.
Now, pkbuf library only uses single-thread environment.
2022-02-19 09:47:44 +09:00
Pau Espin 137ed99dd5
[GTPv1C] Send conditional IE Reordering Required in CreatePDPCtxResp (#1374)
It seems to be actually mandatory in GGSN->SGN directon, though it is
ignored in Release99 upwards. Let's hardcode it to 0 for now, should be
fine in the majority of cases.
2022-02-19 06:36:54 +09:00
Pau Espin f7999a2cad
[GTPv1C] Fix outer message length field containing wrong value (#1373)
The mandatory part of the header must be excluded from the header, that
is flags(1)+type(1)+length(2)+teid(4) = 8 bytes.
2022-02-19 06:36:40 +09:00
Pau Espin 8cc70694db
Introduce Gn interface (GTPv1C) Support to PGW (#1351)
* [CORE] tlv: Store mode in ogs_tlv_t

This allows specifying the format of the IE for each individual IE,
hence allowing messages containing IEs formatted in different ways.

This is needed in order to support parsing GTPv1-C, since messages
contain IEs with different structure (TLV vs TV). Hence, this is a
preparation patch to add support for parsing TVs in ogs-tlv.c/.h.

* [CORE] tlv: Support parsing msg with both TLV and TV in it

IEs of type TV are sometimes used in GTPv1-C. Current tlv parser/builder
doesn't provide with ways to parse messages which contain TV formatted
IEs. This patch adds the relevant types and ways to encode/decode them.

Furthermore, the current parser/builder allows parsing/building messages
containing the exact same format in all its IEs. A new parser function
is added which allows parsing messages of different types (TV, TLV)
mixed in the same message. In order to be able to do so, it uses the
general msg_mode passed to it in order to know the general TLV format
(in essence, the length of the Tag field, and also the length of the
Length field if applicable each IE).

Looking up the instance in the TLV description is left undone and
hadcoded to 0, since the only user so far requiring this API is GTPv1-C,
which has no instances.

* [CORE] tlv: Support repeated tag+instance parsing TLV message

In GTPv2C, repeated IEs (same tag) are easily differentiated by the
Instance byte, which provides info to match different decoded
structures. In GTPv1C though, there's no Instance byte, and we still
encounter repeated IEs (like GSN Address in Create PDP Context Request).
Hence, the TLV decoder needs to be updated to track count of IEs found
(identified by tag+instance, where instance is always 0 in GTPv1C) and
get the proper description index + offset into the decoded structure.

* [GTP]: Move GTPv2-C specifics to its own libgtp subdir

This will allow adding GTPv1-C code by the side. Most GTPv2 code is left
in this patch as "gtp" instead of renaming it to "gtp2" in order to
avoid massive changes. It can be done at a later stage if wanted.

* [GTP] Support generating GTPv1-C messages

* [SMF] Add Gn interface support

This patch introduces GTPv1C support to open5gs-smfd. With it,
open5gs-becomes a GGSN too, where SGSN can connect to, hence supporting
GERAN and UTRAN networks.
2022-02-18 22:23:45 +09:00
Pau Espin 757285bf25
Fix trailing whitespace (#1365)
* [SMF] Fix trailing whitespace

* [CORE] Fix trailing whitespace

* [GTP] Fix trailing whitespace
2022-02-14 20:11:04 +09:00
Sukchan Lee 0e1ab26ee5 Check if Source IP address spoofing (#1354, #1355) 2022-02-14 17:34:22 +09:00
Sukchan Lee ffcd92c2f3 [SBI] Remove Accept-Encoding in HTTP client 2022-02-12 14:40:48 +09:00
Sukchan Lee 900e888dc1 [SBI] fix crash when no mandatory item (#1350)
NRF crashed if NFService does not have a versions.
Versions are mandatory, we've modified the SBI interface for the safety.
2022-02-05 20:20:45 +09:00
Sukchan Lee acfcbda8fa [PFCP] remove be32toh() in TLV u32 leaf (#1349) 2022-02-04 00:26:27 +09:00
Sukchan Lee 83d56fe40d [ALL] Fix the memory leak (#1282) 2022-01-31 22:58:52 +09:00
Sukchan Lee 340b23af94 [SMF] Fixed case without transportLayerAddr(#1341)
Fixed the crash if TransportLayerAddress in GTPTunnel does not exist
2022-01-26 08:09:26 +09:00
Sukchan Lee 3b275edec7 [SBI] Remove one octet length in FQDN (#1333) 2022-01-23 13:49:03 +09:00
Sukchan Lee 866ae78f5e [NRF] fix the crash for invalid FQDN (#1333) 2022-01-22 09:34:38 +09:00
Pau Espin c071bf3c6d
[CORE]: tlv: Fix trailing whitespace (#1334) 2022-01-21 21:41:36 +09:00
Sukchan Lee 23647f643b [FQDN] fix the fqdn_parse bug (#1335) 2022-01-21 21:32:35 +09:00
Sukchan Lee 776892e09d [PFCP] xact: avoid exporting internal (#1329) 2022-01-19 20:03:28 +09:00
Pau Espin ed3a3a527a
[GTP] xact: Avoid exporting internally used functions (#1329)
* [GTP] xact: Fix trailing whitespace

* [GTP] xact: Avoid exporting internally used functions

This simplifies the API header hiding unneeded APIs from external
components, and lets the compiler further optimize by
marking the functions as static.

* [GTP] xact: Drop unused API ogs_gtp_xact_find

After making it static, it became clear to the compiler that this
function is not used anywhere, warning about it. Let's drop it.
2022-01-19 19:54:44 +09:00
Sukchan Lee 8955fdcd5d [SBI] FQDN bug from talloc (#1328) 2022-01-19 17:10:39 +09:00
Pau Espin b3ac5b35eb
[SMF] Fix potential null pointer dereference (#1324)
* [SMF] Fix potential null pointer dereference

Pointer "sess" was first dereferenced and later on checked for nullness.
This is clearly wrong. Rearrange the code path to make sure the check is
done first, then dereferenced.

* gitignore: Add subprojects/libtins

* cosmetic: Fix whitespace
2022-01-18 11:23:40 +09:00
Sukchan Lee 79239d8eff [IMPORTANT] changed network_access_mode: 0 (#1323)
The network access mode of HSS has been changed to 0 (Packet and Circuit).

Versions of MME prior to v2.4.2 did not use this value. Open5GS set
the attach result of Attach Complete message as it is by looking
at the attach type of the Attach Request message.

Now, if the network access mode of HSS is set to 2 (Only Packet),
this value is affected by MME from v2.4.3. Regardless of the attach type
of the Attach Request, the MME will set EPS Only to the attach result
of Attach Complete.
2022-01-16 12:35:55 +09:00
Sukchan Lee e4f864c1f5 Change IPv6 Prefix (#1321) 2022-01-14 11:53:15 +09:00
Julian Lemmerich f75e51ca46
changed default ipv6 prefix to 2001:db8:cafe:: (#1321)
to be compliant with RFC3849
2022-01-14 11:50:27 +09:00
Sukchan Lee ea6675879c [ALL] GNB/NF Memory pool from 32 to 64 2022-01-13 17:55:36 +09:00
Sukchan Lee fdddeaca98 [S6A] Change PUR-Flags to Optional (#1298) 2022-01-13 17:53:54 +09:00
Sukchan Lee cfd0193bbd [PCRF] fix the crash in flow->description (#1313) 2022-01-12 10:15:36 +09:00
Sukchan Lee 070cdbc657 [ALL] fix the epoll(map) crash (#1311) 2022-01-06 22:28:24 +09:00
Sukchan Lee 715e4c0b50 Shall cipher in the NAS message container IE
3GPP TS 24.501 version 16.6.0 Release 16
4.4 NAS security
4.4.6 Protection of initial NAS signalling messages

1) the UE needs to send non-cleartext IEs in a REGISTRATION REQUEST
or SERVICE REQUEST message, the UE includes the entire REGISTRATION
REQUEST or SERVICE REQUEST message (i.e. containing both cleartext IEs
and non-cleartext IEs) in the NAS message container IE and shall cipher
the value part of the NAS message container IE. The UE shall then send
a REGISTRATION REQUEST or SERVICE REQUEST message containing
the cleartext IEs and the NAS message container IE;
2022-01-05 22:39:06 +09:00
Sukchan Lee b988e7edce Use talloc for all memory pool (#1263) 2022-01-04 08:29:18 +09:00
Sukchan Lee 49d9ed03c7 [MME] fix the crash (#1263)
- Change memory pool using talloc library
- Apply ASN1 with r16.7.0
2021-12-28 17:38:11 +09:00
Sukchan Lee d87d7c12c2 [MME] fix the crash with unknown S-NSSAI (#1287) 2021-12-17 21:42:26 +09:00
Sukchan Lee 54b919f65f Remove error message (#1294) 2021-12-17 20:51:11 +09:00
Mehmet Hakan Doğan 414c230f00
this commit is made to reflect changes in PR #1289 (#1293) 2021-12-17 16:00:05 +09:00
Sukchan Lee a3166ab537 Find link-local address in SMF-All address (#1291) 2021-12-17 11:33:54 +09:00
Supreeth Herle 232c387276
[SMF] Fix router advertisement as per rfc 4861 (#1291)
As per RFC 4861 Router advertisement message
format, Source Address MUST be the link-local address
assigned to the interface from which this message is sent.

Since SMF was not sending it as per RFC, certain
phones were not completing the procedure of stateless
IPv6 address autoconfiguration mentioned in
3GPP TS 23.401 version 15.12.0 Release 15, section 5.3.1.2.2
2021-12-17 10:38:37 +09:00
Sukchan Lee 9b40fe25ff added "usage report" to user plane report (#1289)
Author: mhkndgn <hakan.dogan@b-ulltech.com>
Date:   Thu Dec 16 09:51:49 2021 +0300
2021-12-16 21:52:48 +09:00
Sukchan Lee a5a5c424c1 Added AMF-initiated AM Policy Termination 2021-12-04 19:31:36 +09:00
Sukchan Lee fc8c807da2 [SMF] fix the crash during IMS calls (#1238)
If PFCP is not deactivated, some eNBs send an GTP error indication.
To solve the problem, SMF deactivates the bearer that will be deleted.
2021-11-23 14:19:30 +09:00
Sukchan Lee d919b2744c [AMF] fix the memory problem (#1247)
1. memory corruption
- Overflow num_of_part in SBI message
2. null pointer dereference
- n2InfoContent->ngap_ie_type
2021-11-17 08:09:16 +09:00
Sukchan Lee bfa34be222 fix the buffer overflow (CVE-2021-41794) 2021-11-15 15:49:58 +09:00
Sukchan Lee 0fb8279e36 VoNR added but not tested! 2021-11-14 21:07:56 +09:00
Sukchan Lee 7567659a29 [UPF] remove link-local (#1217) 2021-10-30 22:34:47 +09:00
Balint Cristian 0d2c07361e
Add explicit 3GPP paragraph name as comments at generation time (#1215) 2021-10-27 15:26:57 +09:00
Sukchan Lee 42c9dce2b7 mistype cachedir in pfcp-tly generator (#1212) 2021-10-24 08:40:52 +09:00
Balint Cristian 13bba81227
Minor fixes: instance extraction & python generator (#1212) 2021-10-24 08:37:11 +09:00
Sukchan Lee c0f6955250 [AMF] fix the crash when long MSIN length (#1206)
When the UE is in initially registered period,
if the length of MSIN(Part of SUPI) exceeds the normal length,
AMF stack smashing will be caused
2021-10-19 21:21:12 +09:00
Sukchan Lee 9ba4b317d2 Improve GTP message (#1201)
Extended Indication
Add Delay Value
2021-10-16 17:26:30 +09:00
Sukchan Lee f05accc7f3 MME/AMF will not crash with no APN length (#1199) 2021-10-13 23:01:24 +09:00
Mehmet Hakan Doğan 3cb2808ebf
this commit is made to reflect the contribution on pull request #1190 (#1192) 2021-10-05 18:11:03 +09:00
Sukchan Lee 013b4dc8e9 update coding style 2021-10-04 22:33:57 +09:00
Sukchan Lee 5e016937c7 Update URR contribution (#1190) 2021-10-04 22:28:32 +09:00
Sukchan Lee 13f1b390ae CVE-2021-41794 from NCC Group by Mark Tedman
When connecting to the UPF port for the PFCP protocol (8805) and sending
an association setup request followed by a session establishment request
with a PDI Network Instance set to ‘internet’, it causes a stack corruption
to occur.

So, ogs_fqdn_parse() fixed.
2021-10-01 22:41:03 +09:00
Sukchan Lee 1354947164 Improve Milenage library for [R1-R5] (#1153) 2021-09-01 19:38:36 +09:00
Umakant Kulkarni 5234001b0a
Increase cluster_2048_pool to 1024 (#1143) 2021-08-23 08:06:14 +09:00
Sukchan Lee ced4a6f945 [SGW-C] fix the shared object error (#595)
nas-common library includes libcrypt. However, SGW-C don't have to use
crypt library. As such, ogs_nas_plmn_id function was moved to
3gpp-core-types.[ch]

For more information,

$ ./install/bin/open5gs-sgwcd
./install/bin/open5gs-sgwcd: error while loading shared libraries: libogscrypt.so.2: cannot open shared object file: No such file or directory

$ ldd ./install/bin/open5gs-sgwcd
	linux-vdso.so.1 (0x00007ffc749ad000)
	libogsapp.so.2 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogsapp.so.2 (0x00007f1f92277000)
	libogscore.so.2 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogscore.so.2 (0x00007f1f92240000)
	libogsgtp.so.2 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogsgtp.so.2 (0x00007f1f921eb000)
	libogsnas-common.so.2 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogsnas-common.so.2 (0x00007f1f921e5000)
	libogspfcp.so.2 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogspfcp.so.2 (0x00007f1f92177000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1f92134000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1f91f42000)
	libyaml-0.so.2 => /usr/lib/x86_64-linux-gnu/libyaml-0.so.2 (0x00007f1f91f20000)
	libogscrypt.so.2 => not found
	libogsipfw.so.2 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogsipfw.so.2 (0x00007f1f91ef5000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f1f922b1000)
2021-08-17 21:58:31 +09:00
Sukchan Lee 3564fe5c8c [SMF/UPF] Clarify FALLBACK SUBNET [#1128] 2021-08-14 16:52:53 +09:00
Sukchan Lee 831b29973f [PCF] fix the 'NULL' AfEvent in VoNR (#1120) 2021-08-08 09:10:37 +09:00
Sukchan Lee 68edcd6438 fix the SMF crash when num of flow > 8 (#1108) 2021-08-07 14:23:20 +09:00
Sukchan Lee acb4db5dd1 Fix the crash when number of flow > 8 (#1108) 2021-07-28 14:00:03 +09:00
Sukchan Lee c6b13be92a do the finishing touches (#1108) 2021-07-27 20:33:46 +09:00
herlesupreeth 0db09f5c25 Fix stash smashing when number of PFs for bearer > 8 2021-07-23 14:22:55 +02:00
Sukchan Lee 039b9d0aaa SBI updated
- openapi-generator version 5.2.0
- add priority/capacity/load in NFProfile/NFService
- add AllowedNfTypes in NFProfile/NFService
2021-07-16 17:02:33 +09:00
Sukchan Lee 005cd30e02 fix the bug for Real PCF unable to PATCH (#1086) 2021-07-12 17:30:45 +09:00
Sukchan Lee 2471b1b53d comply with coding standard 2021-07-08 15:00:59 +09:00
Sukchan Lee f278d58a69 Upgrade SBI(Service-based Interface)
* OpenAPI Generator version: 4.3.1 ==> 5.5.1
* Specification : r16.8.0 (20210629)
2021-07-07 17:32:55 +09:00
Sukchan Lee 442e7d44e7 Change Open5GS API for exit (#1069) 2021-06-24 12:44:52 +09:00
Spencer Sevilla e1e3f254e2
need to exit (and therefore restart HSS) on FD_LOG_FATAL (#1069) 2021-06-24 12:44:24 +09:00
Sukchan Lee 7f774884ea [MEM] increase memory pool (#1062) 2021-06-22 16:56:18 +09:00
Sukchan Lee 00c96a3f0f [NAS] fix the security issue (ZDI-CAN-14043) 2021-06-21 14:56:03 +09:00
Sukchan Lee 4537142929 [EPC] Support ePDG Interface (#1039) 2021-06-21 22:36:38 +09:00
Sukchan Lee 780f829962 use 'continue' instead of 'return' (#1052) 2021-06-15 11:04:56 +09:00
Spencer Sevilla 449b5b484f
need to return here to prevent segfault (#1052) 2021-06-15 11:04:36 +09:00
Sukchan Lee e31a8474b2 [SMF/UPF] fix the crash bug (#1034, #1006) 2021-06-08 21:14:18 +09:00
Sukchan Lee 118d62d42d Add more memory log 2021-06-06 22:35:46 +09:00
Sukchan Lee 80a9497afd [PFCP] Add more error log (#1012) 2021-05-30 20:35:30 +09:00
Sukchan Lee ef07ccfb88 fix the default SBI port (#997, #1008) 2021-05-30 10:35:01 +09:00
Sukchan Lee 8dab1852cc Merge branch 'tap' of https://github.com/anarkiwi/open5gs into pull1022 2021-05-29 18:06:43 +09:00
Sukchan Lee fe89f7cd11 [5GC] Added BSF(Binding Support Function) 2021-05-29 15:56:12 +09:00
Sukchan Lee 611986794b Squashed commit of the following:
commit 183d8b8344122f25f77be79b1b698c71f48c1656
Author: Sukchan Lee <acetcom@gmail.com>
Date:   Fri May 28 23:44:26 2021 +0900

    [SMF] introduce new list API [#1019]

    Sometimes we may need two lists for same node.
    To do this, I created a new list API, and applied it this pull request.
2021-05-28 23:46:48 +09:00
Josh Bailey caa73e1f5e Support TAP interfaces, with ARP/ND. 2021-05-28 05:59:03 +00:00
Sukchan Lee 873cf398c7 [ALL] Add protection of message encoding (#991)
All process will be forcely exited if it failed to encode the S1AP/NGAP/GTP/PFCP message. It is to make sure there was no problem with the encoding of open5gs.
2021-05-16 12:22:10 +09:00
Sukchan Lee 3df75e37df [GTP/PFCP] Remove SO_REUSEADDR in UDP (#986,#992)
In case of IP conflict, it has been modified to automatically shut down with an error message so that users can easily recognize it.
2021-05-15 20:37:15 +09:00
Sukchan Lee f861919507 [AMF] asn1c decode error for APC_EXTENSIBLE (#994) 2021-05-14 16:46:08 +09:00
Sukchan Lee 257f398a11 [AMF] Add more buffer for 5GMM capability (#959) 2021-05-13 19:55:00 +09:00
Sukchan Lee 3b19190f56 [AMF] fix crash due to malformed NGAP (#960) 2021-05-08 15:09:10 +09:00
Sukchan Lee 5ea9b22209 [AMF] security protection (UERANSIM-issues316)
1. Allocate ngKSI other than the value already used.
2. Add the protection of Service request
3. fix SBI convert error ng_ap_cause
2021-05-08 13:24:17 +09:00
Sukchan Lee b0e8dbb31a [NAS] Protection for malformed NAS message (#959)
Add the protection code to avoid AMF/MME crash due to malformed NAS
message
2021-05-07 23:04:48 +09:00
Sukchan Lee 182a61dc0b [IPFilter] Assert if getprotobyname() problem (#977) 2021-05-07 10:47:10 +09:00
Sukchan Lee dc870cc839 [SMF/UPF] fix the bug for decoding IPFilter (977) 2021-05-06 21:15:32 +09:00
Sukchan Lee 5901582281 [GTPv2] fix incorrect formatting PLMN-ID (#969) 2021-05-05 22:51:50 +09:00
Sukchan Lee e5a0dfb444 [SBI] fix the compile warning in MacOSX 2021-05-05 22:04:17 +09:00
Sukchan Lee 0b063a57c8 [MME] fix the NAS encoding for AMBR (#967) 2021-05-05 21:16:31 +09:00
Sukchan Lee cea1dff5a1 [Alpine] remove GLIBC macro (#957) 2021-04-30 22:16:07 +09:00
Sukchan Lee 002e3c7ae9 [Alpine] Add Dockerfile and Document 2021-04-30 22:13:04 +09:00
Venkata Pilla 27b25b8993
Added support for musl libc, to support compilation on Alpine Linux and other musl libc based systems. (#957) 2021-04-30 22:07:20 +09:00
Sukchan Lee 3b1ebfa9ed [MME] Fix the Invalid AMBR Unit (#967) 2021-04-30 11:58:02 +09:00
Sukchan Lee 959bc6a248 [PFCP] DNS delay during PFCP association (#891)
1. Remove ogs_getnameinfo().
2. Modify to check a valid IP address by using ogs_inet_pton() in order not to use DNS query
2021-04-30 10:17:01 +09:00
Sukchan Lee 49d7fe3b82 fix compilation error in FreeBSD 2021-04-30 00:17:26 +00:00
Sukchan Lee a58214da76 [5GC/EPC] tested with concurrent 500 UEs (#949)
Fix the memory problem in many simulatneous connections test
2021-04-29 22:01:34 +09:00