diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-02-21 23:52:29 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-21 23:52:29 -0800 |
commit | 7691367d71fd77ab668ff3b6edb4340cecddc805 (patch) | |
tree | 1c3dbf52edfad6e4706a698b685b5e0fa1547b2e /drivers/net/arm | |
parent | 7d3d5ec168f1f40e8547d2a1659670ef222a053b (diff) | |
download | linux-7691367d71fd77ab668ff3b6edb4340cecddc805.tar.bz2 |
tcp: Always set urgent pointer if it's beyond snd_nxt
Our TCP stack does not set the urgent flag if the urgent pointer
does not fit in 16 bits, i.e., if it is more than 64K from the
sequence number of a packet.
This behaviour is different from the BSDs, and clearly contradicts
the purpose of urgent mode, which is to send the notification
(though not necessarily the associated data) as soon as possible.
Our current behaviour may in fact delay the urgent notification
indefinitely if the receiver window does not open up.
Simply matching BSD however may break legacy applications which
incorrectly rely on the out-of-band delivery of urgent data, and
conversely the in-band delivery of non-urgent data.
Alexey Kuznetsov suggested a safe solution of following BSD only
if the urgent pointer itself has not yet been transmitted. This
way we guarantee that when the remote end sees the packet with
non-urgent data marked as urgent due to wrap-around we would have
advanced the urgent pointer beyond, either to the actual urgent
data or to an as-yet untransmitted packet.
The only potential downside is that applications on the remote
end may see multiple SIGURG notifications. However, this would
occur anyway with other TCP stacks. More importantly, the outcome
of such a duplicate notification is likely to be harmless since
the signal itself does not carry any information other than the
fact that we're in urgent mode.
Thanks to Ilpo Järvinen for fixing a critical bug in this and
Jeff Chua for reporting that bug.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/arm')
0 files changed, 0 insertions, 0 deletions