aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-12-02 00:31:31 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-12-03 11:40:05 +0100
commitfc1be3a0c1cb7a220c174c7d7d3d4bd1cd4dedf4 (patch)
tree6eceb11397349cfdd918672c8a48e65bef142cad
parente54cd1555a874b132116b1269264de7d6cc3d24d (diff)
gtphub: avoid segfault for incomplete tunnels.
Sponsored-by: On-Waves ehi
-rw-r--r--openbsc/src/gprs/gtphub.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c
index 60c3cc191..8a2815655 100644
--- a/openbsc/src/gprs/gtphub.c
+++ b/openbsc/src/gprs/gtphub.c
@@ -1276,6 +1276,7 @@ static struct gtphub_tunnel_endpoint *gtphub_unmap_tei(struct gtphub *hub,
struct gtphub_tunnel_endpoint *te_to =
&tun->endpoint[other_side][p->plane_idx];
if ((te_to->tei_repl == p->header_tei_rx)
+ && te_from->peer
&& gsn_addr_same(&te_from->peer->peer_addr->addr,
&from->peer_addr->addr)) {
gtphub_tunnel_refresh(hub, tun, p->timestamp);