aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-12-04 17:33:07 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-05 17:29:24 +0000
commit4f0343233b83337afa1e1dfb4bcf9d076ecd4be2 (patch)
treeaa6cda15934d78bae93affa0184756cc2498c790
parentbcab7fb4afcd5c9015f05ce1cce02f9a76928217 (diff)
ggsn: Ignore PCO with length 0, don't abort processing
The existing code would abort iterating over the list of PCO TLVs if a TLV of length zero was encountered. However, there's nothing in the spec that would make a zero-length PCO invalid, so we should continue to iterate over any PCO TLVs after the zero-length one. This issue was discovered while writing test cases in osmo-ttcn3-hacks.git Change-Id: I36660566a8ee2ca80ae6ee99c86e167e7c208df2
-rw-r--r--ggsn/ggsn.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 1507c96..1c1276f 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -400,8 +400,6 @@ static bool pco_contains_proto(struct ul255_t *pco, uint16_t prot)
uint8_t cur_len = cur[2];
if (cur_prot == prot)
return true;
- if (cur_len == 0)
- break;
cur += cur_len + 3;
}
return false;