Commit Graph

27 Commits

Author SHA1 Message Date
Sukchan Lee 2f8ae91b0b Fixed dynamic-stack-buffer-overflow (#2578, #2577) 2023-09-05 21:58:05 +09:00
Sukchan Lee 642d9e2e18 [PFCP/GTP] SEID/TEID Randomness (#1303) 2023-04-16 12:30:36 +09:00
Sukchan Lee 79d46be086 Introduced Subscription identifier de-concealing
o Generate the private key as below.
   $ openssl genpkey -algorithm X25519 -out /etc/open5gs/hnet/curve25519-1.key
   $ openssl ecparam -name prime256v1 -genkey -conv_form compressed -out /etc/open5gs/hnet/secp256r1-2.key

 o The private and public keys can be viewed with the command.
   The public key is used when creating the SIM.
   $ openssl pkey -in /etc/open5gs/hnet/curve25519-1.key -text
   $ openssl ec -in /etc/open5gs/hnet/secp256r1-2.key -conv_form compressed -text

In ausf/udm.yaml

 hnet:
    o Home network public key identifier(PKI) value : 1
      Protection scheme identifier : ECIES scheme profile A
    - id: 1
      scheme: 1
      key: /etc/open5gs/hnet/curve25519-1.key

    o Home network public key identifier(PKI) value : 2
      Protection scheme identifier : ECIES scheme profile B
    - id: 2
      scheme: 2
      key: /etc/open5gs/hnet/secp256r1-2.key

    o Home network public key identifier(PKI) value : 3
      Protection scheme identifier : ECIES scheme profile A
    - id: 3
      scheme: 1
      key: /etc/open5gs/hnet/curve25519-1.key

    o Home network public key identifier(PKI) value : 4
      Protection scheme identifier : ECIES scheme profile B
    - id: 4
      scheme: 2
      key: /etc/open5gs/hnet/secp256r1-2.key

Related to #1779
2022-12-24 20:22:45 +09:00
Sukchan Lee 15e3c1f166 Fix to avoid port (7777) conflicts on Mac OS X 2022-10-30 13:58:28 +09:00
Sukchan Lee 1d17e68c56 [ALL] Removing trailing whitespace and tab 2022-09-02 23:38:39 +09:00
Sukchan Lee e6a14cb73d Move src/../nf-sm.[ch] to lib/sbi/nf-sm.[ch] 2022-08-12 14:03:53 +09:00
Sukchan Lee 051c19b7c8 Changes MAX TLV MORE to 16
OGS_MAX_NUM_OF_PDR is 16, but OGS_TLV_MAX_MORE is 8.
To match the size of two macros, increased OGS_TLV_MAX_MORE to 16.
2022-06-29 14:35:01 +09:00
Sukchan Lee 35201f6ed1 Fix the MacOSX CI (#1454) 2022-03-31 23:06:52 +09:00
Sukchan Lee 24d20bb20b Update automatic CI (#1454) 2022-03-31 22:55:27 +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
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
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 68407efa16
[CORE] tlv_test: Fix trailing whitespace (#1337) 2022-01-22 06:44:08 +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 b988e7edce Use talloc for all memory pool (#1263) 2022-01-04 08:29:18 +09:00
Sukchan Lee 118d62d42d Add more memory log 2021-06-06 22:35:46 +09:00
Sukchan Lee 37e0a714f9 Fixes UE IPv6 BUG (#808) 2021-03-15 10:01:55 +09:00
Sukchan Lee 235a041b8d feat: Add dedicated QoS flow 2020-12-31 21:07:08 -05:00
Sukchan Lee 23e8e6577c Update ogs_pollset library
- Fix the ogs_pollset_remove() bug in select(WIN32), kqueue(MacOSX)
- Modify to enable ogs_pollset_remove() in pollset callback handler
2020-11-09 22:57:14 -05:00
Sukchan Lee 18c483950c Change Number of UEs usage [#533]
- Set the number of UEs in units of AMF/MME instead of gNB/eNB.
- See default value as shown below
    Number of UEs per AMF/MME : 4,096
    Number of gNB/eNB per AMF/MME : 32
2020-08-25 23:05:01 -04:00
Sukchan Lee a71d2ee3db refine SGW/UPF selection code 2020-07-09 01:38:09 -04:00
Sukchan Lee 72370ff0b2 Add AUSF, UDM, and UDR 2020-06-04 14:12:05 -04:00
Sukchan Lee d0673e3066 Added NRF 2020-05-18 17:00:37 -04:00
Sukchan Lee ae75f43a88 Initial proposal CUPS using PFCP 2020-04-26 15:36:05 -04:00
Sukchan Lee 9f1a5d19a4 Build with usrsctp source using MESON Subproject 2019-10-31 14:17:43 +09:00
Sukchan Lee 142763c280 Rename Project to Open5GS
- Change BuildTool to Meson
 - Many BUGS Fixed
2019-10-27 17:41:14 +09:00