Harald Welte has submitted this change and it was merged.
Change subject: ggsn: Ignore PCO with length 0, don't abort processing
......................................................................
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
---
M ggsn/ggsn.c
1 file changed, 0 insertions(+), 2 deletions(-)
Approvals:
Max: Looks good to me, but someone else must approve
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
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 @@
uint8_t cur_len = cur[2];
if (cur_prot == prot)
return true;
- if (cur_len == 0)
- break;
cur += cur_len + 3;
}
return false;
--
To view, visit https://gerrit.osmocom.org/5176
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I36660566a8ee2ca80ae6ee99c86e167e7c208df2
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <[email protected]>