gbproxy: Fix parser to accept GSM 24.008 Attach Req messages
Currently the parse expects a 'MS network capability' IE with 2 <= length <= 3 which is compliant to GSM 04.08, 9.4.1 but not to GSM 24.008, 9.4.1 which specifies 3 <= length <= 9. Thus the parser rejects messages with a length >= 4 (including length field). This patch relaxes the length check to accept either range by requiring 2 <= length <= 9. Ticket: OW#1258 Sponsored-by: On-Waves ehf
This commit is contained in:
parent
b36032cb27
commit
c9cd15fbc9
|
@ -155,7 +155,7 @@ static int gprs_gb_parse_gmm_attach_req(uint8_t *data, size_t data_len,
|
||||||
|
|
||||||
/* Skip MS network capability */
|
/* Skip MS network capability */
|
||||||
if (lv_shift(&data, &data_len, NULL, &value_len) <= 0 ||
|
if (lv_shift(&data, &data_len, NULL, &value_len) <= 0 ||
|
||||||
value_len < 1 || value_len > 2)
|
value_len < 1 || value_len > 8)
|
||||||
/* invalid */
|
/* invalid */
|
||||||
return 0;;
|
return 0;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue