pespin has uploaded this change for review.

View Change

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 change 35628. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ifb4e44b23d19ea049f03a3602c39f2471ff1bff4
Gerrit-Change-Number: 35628
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange