Review at  https://gerrit.osmocom.org/5176

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/76/5176/1

diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 82e1b12..e2ff88c 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: newchange
Gerrit-Change-Id: I36660566a8ee2ca80ae6ee99c86e167e7c208df2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to