Commit Graph

3605 Commits

Author SHA1 Message Date
Pau Espin 12bac7a917
[PFCP] Avoid requiring optional fields in Update URR IE (#1449) 2022-03-25 05:58:40 +09:00
Sukchan Lee 41553de7a4 [MME] Exception handle - APN duplicated (#1431) 2022-03-24 21:52:42 +09:00
Sukchan Lee 2cb06b3085 remove pool related configuration (#1431) 2022-03-23 15:14:18 +09:00
Sukchan Lee 224d1caca1 change log-level WARNING to INFO 2022-03-22 22:52:10 +09:00
Sukchan Lee 37af21a88d [MEM] fix the pkbuf problem (#1431) 2022-03-22 22:47:45 +09:00
Sukchan Lee fe5fd0f760 Update sponsors 2022-03-19 20:26:49 +09:00
Pau Espin ab5f47ef59
[SMF] PFCP Session Report Req: Allow receiving multiple bits in Report Type (#1442)
3GPP TS 29.244 sec 8.2.21 "Report Type" states:
At least one bit shall be set to "1". Several bits may be set to "1".
2022-03-17 16:23:43 +09:00
Sukchan Lee 72ecd1c005 [SMF] Remove T_RELEASE_HOLDING timer 2022-03-17 16:07:19 +09:00
Pau Espin 7f6f35fe6f
[UPF] Improve logging around IP spoofing (#1441)
* [UPF] Fix Trailing whitespace

* [UPF] Improve logging around IP spoofing

Related: https://github.com/open5gs/open5gs/issues/1435
2022-03-16 21:59:50 +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 73836c063c
[UPF] Fix log typo, trailing whitespace (#1434) 2022-03-15 13:34:32 +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 914bb0a40f Merge branch 'sysmocom-pespin/vrf' into main 2022-03-07 22:44:23 +09:00
Sukchan Lee 253e2ad98a [GTP/PFCP] Support VRF (#1404) 2022-03-07 22:43:18 +09:00
Sukchan Lee c2d10772c6 Merge branch 'pespin/vrf' of https://github.com/sysmocom/open5gs into sysmocom-pespin/vrf 2022-03-07 22:43:10 +09:00
Sukchan Lee f848785360 Update document (#1412) 2022-03-05 18:50:25 +09:00
Sukchan Lee a1be48ed50 [SGW-C] fix the crash (#1353) 2022-03-05 11:27:22 +09:00
Sukchan Lee 896370c2e4 [MME] Oops! Remove redundant warning (#1411) 2022-03-04 23:49:45 +09:00
Sukchan Lee 9bf8a84b81 [SGWC] fix the crash (#1353) 2022-03-05 02:58:53 +09:00
Sukchan Lee 79e34260da [SGWC] fix the crash (#1353) 2022-03-03 23:17:28 +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 ed3444eef5 Need to increase NF ref_count
1. UE registered and PDU established.
2. PCF does not receive Heartbeat.
 - PCF De-registered state.
 - Since PDU is established, SMF should not remove NF instance
3. PCF re-registered.
 - HERE, WE NEED TO INCREASE NF REFERENCE COUNT.
   Otherwise, NF instance will be removed if PCF is de-registered state
4. UE sends PDU release request.
5. Because SMF knows PCF NF instance, SMF can send PCF delete
2022-03-01 22:02:02 +09:00
Sukchan Lee 3217e93124 [LINUX] initialize struct epoll_event (#1399) 2022-03-01 21:03:27 +09:00
ji3k54j062k7 19120acadc
modify building from source md file (#1403)
Signed-off-by: ji3k54j062k7 <ji3k54g4j062k7@gmail.com>
2022-03-01 20:18:47 +09:00
Pau Espin d06acc7f37
Fix trailing whitespace (#1402) 2022-03-01 17:13:40 +09:00
Supreeth Herle bc69ddfc6d
[SMF]: Fix Framed-IPv6-Prefix AVP length in CCR (#1398) 2022-03-01 17:11:28 +09:00
Sukchan Lee d54e8a43ce [PCRF] Fix Framed-IPv6 Prefix in CCR (#1398) 2022-03-01 17:09:47 +09:00
Pau Espin ba3a046c62
[SMF] Avoid crash if smf_ue_pool is full (1024 UEs) (#1397) 2022-02-28 21:27:27 +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 03280d1f5a
Fix prefix length in Gx CCR Framed-IPv6-Prefix AVP (#1396)
As per 3GPP TS 23.401 version 15.12.0, section 5.3.1.2.2
The PDN GW allocates a globally unique /64
IPv6 prefix via Router Advertisement to a given UE.

After the UE has received the Router Advertisement message, it
constructs a full IPv6 address via IPv6 Stateless Address
autoconfiguration in accordance with RFC 4862 using the interface
identifier assigned by PDN GW.

For stateless address autoconfiguration however, the UE can
choose any interface identifier to generate IPv6 addresses, other
than link-local, without involving the network.

And, from section 5.3.1.1, Both EPS network elements and UE shall
support the following mechanisms:

/64 IPv6 prefix allocation via IPv6 Stateless Address
autoconfiguration according to RFC 4862, if IPv6 is
supported.
2022-02-26 15:25:08 +09:00
Pau Espin 51a75cde26
Pespin/pr (#1395)
* [SMF] Gn: Avoid assert crash if no PDP resources available

* [SMF] Gn: Rearrange IE handling order in CreatePDPContextRequest

Let's handle the GTPC remote addr + TEID first, since those should be
used in the CreatePDPContextResponse ideally if available.

Let's then handle parsing of all IEs not related to bearers/UserPlane,
then those missing, and finally do all the IP resource allocation.
2022-02-25 22:39:44 +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
Pau Espin 3833a73a14
[SMF] incorrect GTPv1C cause with changed APN (#1387) 2022-02-23 20:48:36 +09:00
Sukchan Lee 953a7321c6 [SMF] fix the crash in VoLTE test (#1383) 2022-02-23 20:31:28 +09:00
Pau Espin 5ad1b188e4
[SMF] UpdatePDPContext: forward update of remote TEID+IPaddr to UPF (#1383)
* [SMF] typo fixes in commented code

* [SMF] Fix early err return handling UpdatePDPContextRequest

* [SMF] UpdatePDPContext: forward update of remote TEID+IPaddr to UPF

Updating the remote GTP-U IP address and/or TEID on the GGSN is a common
practice, used for instance by an SGSN in a UTRAN network to connect an
HNB(GW) to exchange GTP-U directly with the GGSN. It is also used in
general when doing handovers.
When receiving a UpdatePDPContext with the new address, we need to
forward the update to the UPF so that it takes it into account when
forwarding packets.

This patch only implements updating the information towards the UPF when
GTPv1C is used. Similar approach for GTPv2C (upon receival of Modify
Bearer Request) is still unimplemented.

Related: https://github.com/open5gs/open5gs/issues/1367
2022-02-23 20:21:33 +09:00
Sukchan Lee af3db1770f [SMF] incorrect GTP cause with changed APN (#1360)
SMF setting incorrect Cause when answering
with a changed APN type IPv4v6 ->IPv4/IPv6
2022-02-23 20:16:04 +09:00
Sukchan Lee d61127afcc [SMF] fix the seperate DNS in PCO IPCP (#1358) 2022-02-23 17:38:07 +09:00
Pau Espin 882548de11
[SMF] UpdPDPCtxRsp: Fix adding 2 IP addresses to one GSN Address IE (#1382)
In the event we have 2 local IP addresses available for use, put the one
having same IP version in "GGSN Address *" IE, and the one with the
other IP version in "Alternative GGSN Address *" IE.

Same fix was applied recently to CreatePDPContextResponse.
2022-02-22 07:00:14 +09:00
Pau Espin b0fc06ab6c
Fix trailing whitespace (#1381) 2022-02-22 07:00:06 +09:00
Pau Espin b7698810ac
[SMF] s/'Context not found'/'Non-existent'/ in {Update,Delete}PdpContextResponse (#1379)
TS 29.060 sections 7.3.4 and 7.3.6 specify the possible cause values for
UpdatePdpContextResponse and DeletePdpContextResponse.
Together with section 8.2, it becomes clear that 'Non-existent' cause
should be sent instead of 'Context not found' one in those cases.
2022-02-21 22:18:39 +09:00
Sukchan Lee e3fa731c4a [SBI] fix the timezone string converter (#1376) 2022-02-20 20:18:32 +09:00