gtphub: fix: when checking TEIs, skip 0.
Sponsored-by: On-Waves ehi
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c
index 923c553..24d0c58 100644
--- a/openbsc/src/gprs/gtphub.c
+++ b/openbsc/src/gprs/gtphub.c
@@ -1217,6 +1217,8 @@
uint32_t *tei_min,
uint32_t *tei_max)
{
+ if (!new_te->tei_repl)
+ return 1;
if (new_te->tei_repl != iterated_te->tei_repl)
return 1;
@@ -1265,7 +1267,8 @@
for_each_plane(plane_idx) {
te = &tun->endpoint[side_idx][plane_idx];
te2 = &new_tun->endpoint[side_idx][plane_idx];
- if ((te->tei_orig != te2->tei_orig)
+ if ((te->tei_orig == 0)
+ || (te->tei_orig != te2->tei_orig)
|| (!te->peer)
|| (!te2->peer)
|| !gsn_addr_same(&te->peer->peer_addr->addr,