diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-08-23 13:28:27 +0200 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 07:45:25 +0200 |
commit | 48816322ad4d9ce195aaddd10f0ce98c944af193 (patch) | |
tree | bd4123966a18259cb8f93607ae077541920cf75c /net/packet | |
parent | eac7726bf5cd24440d84b166e0813668d1bf3224 (diff) | |
download | kernel_samsung_tuna-48816322ad4d9ce195aaddd10f0ce98c944af193.zip kernel_samsung_tuna-48816322ad4d9ce195aaddd10f0ce98c944af193.tar.gz kernel_samsung_tuna-48816322ad4d9ce195aaddd10f0ce98c944af193.tar.bz2 |
dccp: Empty the write queue when disconnecting
dccp_disconnect() can be called due to several reasons:
1. when the connection setup failed (inet_stream_connect());
2. when shutting down (inet_shutdown(), inet_csk_listen_stop());
3. when aborting the connection (dccp_close() with 0 linger time).
In case (1) the write queue is empty. This patch empties the write queue,
if in case (2) or (3) it was not yet empty.
This avoids triggering the write-queue BUG_TRAP in sk_stream_kill_queues()
later on.
It also seems natural to do: when breaking an association, to delete all
packets that were originally intended for the soon-disconnected end (compare
with call to tcp_write_queue_purge in tcp_disconnect()).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/packet')
0 files changed, 0 insertions, 0 deletions