aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_sndcp.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-07-02 10:11:42 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-02 10:11:42 +0200
commit993697c8d2f0d999fa9867e18d8c07cd8398b46c (patch)
tree3e39fbb144d9c0fb85c42d4c12bc8b4365ebffd5 /openbsc/src/gprs/gprs_sndcp.c
parentb87bc8600659e63635f4c4fa2916ba86720082b4 (diff)
[SGSN] SNDCP: Fix off-by-one error missing last segment in defrag
When we defragment the segments from the defrage queue, we have to iterate all the way up to (and including) the last segment number that we have received.
Diffstat (limited to 'openbsc/src/gprs/gprs_sndcp.c')
-rw-r--r--openbsc/src/gprs/gprs_sndcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_sndcp.c b/openbsc/src/gprs/gprs_sndcp.c
index 5857ab227..46753c76c 100644
--- a/openbsc/src/gprs/gprs_sndcp.c
+++ b/openbsc/src/gprs/gprs_sndcp.c
@@ -150,7 +150,7 @@ static int defrag_segments(struct gprs_sndcp_entity *sne)
npdu = msg->data;
- for (seg_nr = 0; seg_nr < sne->defrag.highest_seg; seg_nr++) {
+ for (seg_nr = 0; seg_nr <= sne->defrag.highest_seg; seg_nr++) {
struct defrag_queue_entry *dqe;
uint8_t *data;