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
This commit is contained in:
Harald Welte 2017-12-04 17:33:07 +01:00
parent bcab7fb4af
commit 4f0343233b
1 changed files with 0 additions and 2 deletions

View File

@ -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;