Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35627?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: gsup: Convert PDP-Type IE to PDP-Address IE
......................................................................
gsup: Convert PDP-Type IE to PDP-Address IE
The previous PDP-Type IE should have been a PDP-Address from the
start, since having only PDP-Type with no address is only a specific
case (dynamic addressing).
This becomes clear by looking at other similar protocols like:
* MAP: APN-Configuration IE has servedPartyIP-IP{v4,v6}-Address IEs
* Diameter S6b, 3GPP TS 29.272 7.3.35 APN-Configuration contains
Served-Party-IP-Address AVPs
* Diameter SWx, 3GPP TS 29.273 APN-Configuration.
* GTPv1C Ts 29.060 7.7.29 PDP Context containing PDP Address.
Since PDP-Type on its own really makes no sense, being it a special case
of PDP-Address, let's keep the IE by renaming it (keeping old name too
for API backward compat) and extend it to support lengths > 2 bytes.
Old implementation of libosmogsm gsup actually ignored lengths > 2
bytes, so we are safe acting against older implementations here, both
on the sending and receiving side on the wire.
The big drawback of this commit is that it breaks ABI compatibility due
to adding "struct osmo_sockaddr pdp_address[2];" to struct
osmo_gsup_pdp_info, which in turn affects shift of fields in struct
osmo_gsup_message. Unfortunately, there's not much that can be done to
improve the situation when adding the missing field, due to existing API
having the same struct for all messages. Ideally we'd have 1 union with
structs per message type inside, this way the ABI break would be far
less pronounced.
The GSUP test output change is becaue we now accept some of the len>2
cases for PDP-Type/Address IE which were being rejected since a couple
commits ago.
libosmogsm gsup code is now disabled in EMBEDDED mode, since it nows
depends on core/socket.h (struct osmo_sockaddr) which is not available
in EMBEDDED, and hence fails during build:
"""
In file included from /build/include/osmocom/gsm/gsup.h:45,
from /build/src/gsm/gsup_sms.c:28:
/build/include/osmocom/core/socket.h:15:10: fatal error: arpa/inet.h: No such file or directory
15 | #include <arpa/inet.h>
| ^~~~~~~~~~~~~
"""
Related: OS#6091
Change-Id: I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
---
M TODO-RELEASE
M include/osmocom/gsm/gsup.h
M src/gsm/Makefile.am
M src/gsm/gsup.c
M tests/Makefile.am
M tests/gsup/gsup_test.err
6 files changed, 162 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/35627/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35627?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
Gerrit-Change-Number: 35627
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/35628?usp=email )
Change subject: gsup: Convert PDP-Type IE to PDP-Address IE
......................................................................
gsup: Convert PDP-Type IE to PDP-Address IE
The previous PDP-Type IE should have been a PDP-Address from the
start, since having only PDP-Type with no address is only a specific
case (dynamic addressing).
This becomes clear by looking at other similar protocols like:
* MAP: APN-Configuration IE has servedPartyIP-IP{v4,v6}-Address IEs
* Diameter S6b, 3GPP TS 29.272 7.3.35 APN-Configuration contains
Served-Party-IP-Address AVPs
* Diameter SWx, 3GPP TS 29.273 APN-Configuration.
* GTPv1C Ts 29.060 7.7.29 PDP Context containing PDP Address.
Since PDP-Type on its own really makes no sense, being it a special case
of PDP-Address, let's keep the IE by renaming it (keeping old name too
for API backward compat) and extend it to support lengths > 2 bytes.
Old implementation of libosmogsm gsup actually ignored lengths > 2
bytes, so we are safe acting against older implementations here, both
on the sending and receiving side on the wire.
While at it, fix the packetdiag representation, which was already wrong
before:
* Length is 1 byte, not 2 (this happened probably due to confusion
between TS 29.060 EUA and TS 24.008 PDP address, the former TLV being
2 bytes like all of GTP, and TS 24.008 being 1 byte).
* The bytes sharing several fields were swapped.
Change-Id: Ifb4e44b23d19ea049f03a3602c39f2471ff1bff4
Related: OS#6091
Related: libosmocore.git Change-Id I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
---
M common/chapters/gsup.adoc
1 file changed, 56 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/28/35628/1
diff --git a/common/chapters/gsup.adoc b/common/chapters/gsup.adoc
index d9a87ca..eeada52 100644
--- a/common/chapters/gsup.adoc
+++ b/common/chapters/gsup.adoc
@@ -1105,7 +1105,7 @@
| |PDP Info IEI|<<gsup-iei>>|M|V|1
| |Length of PDP Info IE||M|V|1
|10|PDP Context ID|<<gsup-ie-pdpctxid>>|C|TLV|3
-|11|PDP Type|<<gsup-ie-pdptype>>|C|TLV|4
+|11|PDP Address|<<gsup-ie-pdpaddress>>|C|TLV|4-24
|12|Access Point Name|<<gsup-ie-apn>>|C|TLV|3-102
|13|Quality of Service|<<gsup-ie-qos>>|O|TLV|1-20
|14|PDP-Charging Characteristics|<<gsup-ie-charging>>|O|TLV|4
@@ -1113,11 +1113,14 @@
The conditional IE are mandantory unless mentioned otherwise.
-[[gsup-ie-pdptype]]
-==== PDP Type
+[[gsup-ie-pdpaddress]]
+==== PDP Address
-The PDP type value consists of 2 octets that are encoded like octet 4-5 of the
-End User Address (EUA) defined in 3GPP TS 29.060, 7.7.27.
+The value part is encoded like in the Packet data protocol address IE defined
+in 3GPP TS 24.008, Chapter 10.5.6.4.
+Hence this value also relates to End User Address (EUA) IE defined in 3GPP TS
+29.060, 7.7.27.
+The PDP type organization value must be set to 'IETF allocated address'.
[packetdiag]
----
@@ -1127,21 +1130,24 @@
0-6: PDP type IEI
7: Res
- 8-15: Length (2)
- 16-19: Spare
- 20-23: PDP type org
+ 8-15: Length
+ 16-19: PDP type org
+ 20-23: Spare
24-31: PDP type number
+ 32-191: Address (v4|v6|v4+v6)
}
----
-The spare bits are left undefined. While 29.060 defines them as '1 1 1 1', there
-are MAP traces where these bits are set to '0 0 0 0'. So the receiver shall
-ignore these bits.
+The spare bits are left undefined. While 3GPP TS 29.060 7.7.27 defines them as
+'1 1 1 1', there are MAP traces where these bits are set to '0 0 0 0'. So the
+receiver shall ignore these bits.
Examples:
-* IPv4: PDP type org: 1 (IETF), PDP type number: 0x21
-* IPv6: PDP type org: 1 (IETF), PDP type number: 0x57
+* IPv4: PDP type org: 1 (IETF), PDP type number: 0x21, 0 bytes address (dynamic addressing)
+* IPv4: PDP type org: 1 (IETF), PDP type number: 0x21, 4 bytes address
+* IPv6: PDP type org: 1 (IETF), PDP type number: 0x57, 16 bytes address
+* IPv6: PDP type org: 1 (IETF), PDP type number: 0x8D, 20 bytes address (v4+v6)
[[gsup-ie-pdpctxid]]
==== PDP Context ID
@@ -1296,7 +1302,7 @@
|0x09|HLR Number|<<gsup-ie-hlr>>
|0x0a|Message Class| <<gsup-ie-message-class>>
|0x10|PDP Context ID|<<gsup-ie-pdpctxid>>
-|0x11|PDP Type|<<gsup-ie-pdptype>>
+|0x11|PDP Address|<<gsup-ie-pdptaddress>>
|0x12|Access Point Name|<<gsup-ie-apn>>
|0x13|QoS|<<gsup-ie-qos>>
|0x14|PDP-Charging Characteristics|<<gsup-ie-charging>>
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/35628?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ifb4e44b23d19ea049f03a3602c39f2471ff1bff4
Gerrit-Change-Number: 35628
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange