osmo-msc/openbsc/tests/gtphub
Neels Hofmeyr d010c49407 gtphub: improve handling of restarted peer.
Handle peer restart earlier, so that all the tunnels are deleted by the restart
code path, instead of the first one being deleted due to reused TEI. That
caused confusing logging messages.

Also, when receiving Delete confirmations from the peer that didn't restart,
don't complain about unknown peer, but acknowledge and remove the half
invalidated tunnel. This means that the pending delete entry from the restart
code path is not needed / not used, so don't bother to add pending delete
entries upon peer restart.

The test test_peer_restarted_reusing_tei() hits the situation where a tunnel is
removed because of a reused TEI rather than the restart counter. Adjust the
test to expect the "out-of-band" delete request earlier on, and to still see
the half invalidated tunnel around. Enhance the test by adding the delete
response from the peer that didn't restart, and add a final tunnels_are()
verification.

Sponsored-by: On-Waves ehi
2015-12-07 13:37:15 +01:00
..
Makefile.am gtphub: wrap gtphub_write() for test suite. 2015-12-03 11:47:12 +01:00
gtphub_test.c gtphub: improve handling of restarted peer. 2015-12-07 13:37:15 +01:00
gtphub_test.ok gtphub: improve handling of restarted peer. 2015-12-07 13:37:15 +01:00