diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2015-12-02 15:44:34 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2015-12-03 11:47:16 +0100 |
commit | c6d51f5fb477c9ebf0345edb088b86d70eb119a1 (patch) | |
tree | 6977c69a276af6c30cded7836b39ee4d6725eff7 /openbsc/src/gprs/gtphub.c | |
parent | 996ec1d73150366fa105b7d42ba8003fb018fcf8 (diff) |
gtphub: fix restart cleanup peer matching.
Adjust test expectations accordingly.
Sponsored-by: On-Waves ehi
Diffstat (limited to 'openbsc/src/gprs/gtphub.c')
-rw-r--r-- | openbsc/src/gprs/gtphub.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index 55b900492..2ae86781d 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -1791,7 +1791,11 @@ static void gtphub_restarted(struct gtphub *hub, llist_for_each_entry(tun, &hub->tunnels, entry) { int side_idx; for_each_side(side_idx) { - if (pp != tun->endpoint[side_idx][GTPH_PLANE_CTRL].peer) + struct gtphub_tunnel_endpoint *te = &tun->endpoint[side_idx][GTPH_PLANE_CTRL]; + struct gtphub_tunnel_endpoint *te2 = &tun->endpoint[other_side_idx(side_idx)][GTPH_PLANE_CTRL]; + if ((!te->peer) + || (!te2->tei_orig) + || (pp->peer_addr->peer != te->peer->peer_addr->peer)) continue; LOG(LOGL_DEBUG, "Deleting tunnel due to peer restart: %s\n", |