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
This commit is contained in:
parent
2d3fae7e36
commit
236d1d4865
|
@ -109,7 +109,7 @@ int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len,
|
|||
buf = trasp_layer_addr->buf;
|
||||
len = trasp_layer_addr->size;
|
||||
|
||||
if (buf[0] == 0x35 && len > 7)
|
||||
if (buf[0] == 0x35 && len == 7)
|
||||
rc = inet_ntop(AF_INET, buf + 3, addr, addr_len);
|
||||
else if (len > 3)
|
||||
rc = inet_ntop(AF_INET, buf, addr, addr_len);
|
||||
|
|
Loading…
Reference in New Issue