[MERGED] osmo-ggsn[master]: gtpie_{encaps, encaps2}(): RAI is a fixe 6-byte length field, ...

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Oct 14 06:16:37 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: gtpie_{encaps,encaps2}(): RAI is a fixe 6-byte length field, not 8 bytes
......................................................................


gtpie_{encaps,encaps2}(): RAI is a fixe 6-byte length field, not 8 bytes

gtpie_decaps() always had this right, but the encapsulation functions
treated it as 8-byte fixed length IE.

I hope we had a chance to convert all of this to the normal libosmogsm
tlv_parser one day.  This would have one description table for all TLV
types which then is used from encoder and decoder.

Change-Id: I48471f2735511806ac424b5ffc1929e85bb156f3
---
M gtp/gtpie.c
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/gtp/gtpie.c b/gtp/gtpie.c
index c4eabf8..fa21ab2 100644
--- a/gtp/gtpie.c
+++ b/gtp/gtpie.c
@@ -652,11 +652,13 @@
 			case GTPIE_TEI_DII:	/* TV GTPIE types with value length 5 */
 				iesize = 6;
 				break;
+			case GTPIE_RAI:		/* TV GTPIE types with value length 6 */
+				iesize = 7;
+				break;
 			case GTPIE_RAB_CONTEXT:	/* TV GTPIE types with value length 7 */
 				iesize = 8;
 				break;
 			case GTPIE_IMSI:	/* TV GTPIE types with value length 8 */
-			case GTPIE_RAI:
 				iesize = 9;
 				break;
 			case GTPIE_AUTH_TRIPLET:	/* TV GTPIE types with value length 28 */
@@ -827,11 +829,13 @@
 				case GTPIE_TEI_DII:	/* TV GTPIE types with value length 5 */
 					iesize = 6;
 					break;
+				case GTPIE_RAI:		/* TV GTPIE types with value length 6 */
+					iesize = 7;
+					break;
 				case GTPIE_RAB_CONTEXT:	/* TV GTPIE types with value length 7 */
 					iesize = 8;
 					break;
 				case GTPIE_IMSI:	/* TV GTPIE types with value length 8 */
-				case GTPIE_RAI:
 					iesize = 9;
 					break;
 				case GTPIE_AUTH_TRIPLET:	/* TV GTPIE types with value length 28 */

-- 
To view, visit https://gerrit.osmocom.org/4264
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I48471f2735511806ac424b5ffc1929e85bb156f3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder


More information about the gerrit-log mailing list