diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2016-04-27 21:02:39 +0200 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-04-28 11:16:47 +0300 |
commit | 72b21d0537b49f23254bdf63ad9a3d1a61b3bbbe (patch) | |
tree | 95b6fc1a967d3ec8263163bcbebb3651b63611cf /rfc/rfc2433.txt | |
parent | 16449c4f4972ffad500951db5c71403cae0422e7 (diff) | |
download | accel-ppp-72b21d0537b49f23254bdf63ad9a3d1a61b3bbbe.tar.gz accel-ppp-72b21d0537b49f23254bdf63ad9a3d1a61b3bbbe.zip |
cli: fix data output miss-ordering
In tcp and telnet backends, the first buffer been queued is directly
pointed to by cln->xmit_buf. It's not added to cln->xmit_queue.
Therefore testing if ->xmit_queue is empty doesn't reliably tells
if data has already been queued.
We should test if ->xmit_buf is non-NULL instead. This is reliable
because ->xmit_buf is re-filled with the first buffer from ->xmit_queue
after every successful write().
Failure to properly check if data has already been queued can lead to
message miss-ordering because cli_client_send() or telnet_send() will
try to directly write() their input buffer, effectively bypassing the
one previously queued up in ->xmit_buf.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'rfc/rfc2433.txt')
0 files changed, 0 insertions, 0 deletions