]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: peers: fix a case where peer session is not cleanly reset on release.
authorEmeric Brun <ebrun@haproxy.com>
Tue, 2 Apr 2019 15:22:01 +0000 (17:22 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Apr 2019 12:42:10 +0000 (14:42 +0200)
commit9ef2ad7844e577b505019695c59284f4a439fc33
tree4a7dd76e727d853e83fc92f14ee275c3e80f2e27
parentce4ec5039fb9ff598861a714653ba2f5fcd79f54
BUG/MEDIUM: peers: fix a case where peer session is not cleanly reset on release.

The deinit took place in only peer_session_release, but in the a case of a
previous call to peer_session_forceshutdown, the session cursors
won't be reset, resulting in a bad state for new session of the same
peer. For instance, a table definition message could be dropped and
so all update messages will be dropped by the remote peer.

This patch move the deinit processing directly in the force shutdown
funtion. Killed session remains in "ST_END" state but ref on peer was
reset to NULL and deinit will be skipped on session release function.

The session release continue to assure the deinit for "active" sessions.

This patch should be backported on all stable version since proto
peers v2.
src/peers.c