aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gb_parse.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-29 12:36:45 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-10-09 18:07:10 +0200
commitc9cd15fbc9902dd6792347bd6462c689dbc5374b (patch)
treef99e8bccda9beb2525c60b999c9a24115ccafed9 /openbsc/src/gprs/gprs_gb_parse.c
parentb36032cb27292146bd652337cf5b63087b223e69 (diff)
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
Diffstat (limited to 'openbsc/src/gprs/gprs_gb_parse.c')
-rw-r--r--openbsc/src/gprs/gprs_gb_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_gb_parse.c b/openbsc/src/gprs/gprs_gb_parse.c
index a0a4469b3..db40e9772 100644
--- a/openbsc/src/gprs/gprs_gb_parse.c
+++ b/openbsc/src/gprs/gprs_gb_parse.c
@@ -155,7 +155,7 @@ static int gprs_gb_parse_gmm_attach_req(uint8_t *data, size_t data_len,
/* Skip MS network capability */
if (lv_shift(&data, &data_len, NULL, &value_len) <= 0 ||
- value_len < 1 || value_len > 2)
+ value_len < 1 || value_len > 8)
/* invalid */
return 0;;