Commit Graph

8 Commits

Author SHA1 Message Date
Neels Hofmeyr a770f6967b fix transport layer addr again, for nano3g
The nano3G sends the RAB Assignment Response's Transport Layer Address in X.213
NSAP padded to 20 bytes (160bit). Do not interpret it as 4-byte IP address,
which currently breaks nano3G voice calls (wrong RTP IP address).

Recent commit I2cd1b2d8e1c1ae707cfc0dc7961a2b31ecdf29e0 fixed decoding of X.213
NSAP that is exactly seven bytes, but broke decoding of the padded version from
the nano3G.

A proper X.213 NSAP decoding would still be more welcome than this patching
back and forth, but this is (another) quick fix without spending too much time
on it.

Related: OS#3420
Change-Id: I0ad8bce6fcfd3829394c39490058c1ab85cdfde3
2018-09-30 23:35:35 +02:00
Neels Hofmeyr 236d1d4865 fix decoding of incoming X.213 NSAP addr
Fix ranap_transp_layer_addr_decode() to test == 7 instead of > 7: If a femto
cell sends its Transport Layer Address as X.213 NSAP IPv4, we receive 3 header
bytes and four IP-address bytes, so the length is exactly 7.

This function is very vague on numerous other decoding details, but this patch
only fixes the vital length check that makes 3G usable with X.213 NSAP.

Related: OS#3420
Change-Id: I2cd1b2d8e1c1ae707cfc0dc7961a2b31ecdf29e0
2018-08-20 17:31:58 +02:00
Philipp Maier ee03876dd1 iu: iu_helpers: add functions to decode ip/port from rab-ass
add ranap_transp_assoc_decode() to decode the port information from
an  RANAP_IuTransportAssociation_t field.

add ranap_transp_layer_addr_decode() to decode the ip-address from
an RANAP_TransportLayerAddress_t field.

Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062
2017-12-20 16:03:19 +00:00
Harald Welte 056984fab1 merge (+rename) iu_helpers.c into libosmo-ranap 2016-01-03 16:31:31 +01:00
Harald Welte 77847ad020 add copyright statement and AGPLv3 headers to source code files 2015-10-06 22:07:04 +02:00
Harald Welte 1d2c39d83b various cleanups (compiler warnings, coding style) 2015-09-11 17:49:37 +02:00
Harald Welte 208b7b0778 iu_helpers: fix encoding of BCD (like IMSI) into OCTET STING 2015-09-11 17:35:52 +02:00
Harald Welte 393f2bd9fb move BCD string encoding/decoding functions to iu_helpers.[ch] 2015-09-11 17:13:51 +02:00