diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-14 19:24:06 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 20:24:18 +0800 |
commit | f83032284612bd2cdffd84da03ba0d97ee6acf53 (patch) | |
tree | cf80b429a1edca2d4f5d51c3b1147017511e065a | |
parent | 12dc89ad37c3ced7538d228e432587036ad52189 (diff) |
[nat] Fix the size check of the LU Request.
-rw-r--r-- | openbsc/src/nat/bsc_nat_utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c index 275ecb472..7c05edc32 100644 --- a/openbsc/src/nat/bsc_nat_utils.c +++ b/openbsc/src/nat/bsc_nat_utils.c @@ -200,8 +200,9 @@ static int _cr_check_loc_upd(struct bsc_connection *bsc, uint8_t *data, unsigned struct gsm48_loc_upd_req *lu; char mi_string[GSM48_MI_SIZE]; - if (sizeof(*lu) < length) { - LOGP(DNAT, LOGL_ERROR, "Location updating request does not fit.\n"); + if (length < sizeof(*lu)) { + LOGP(DNAT, LOGL_ERROR, + "LU does not fit. Length is %d \n", length); return -1; } |