Re: [PATCH] tcp: make urg+gso work for real this time
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2008-12-17 22:16:57
On Wed, Dec 17, 2008 at 03:55:05PM +0300, Alexey Kuznetsov wrote:
Probably, netbsd/openbsd have some another quirk to work this around. I do not see how, though.
Indeed they do have more quirks. I only saw it after reading it
again, but they always use snd_nxt instead of the current sequence
number:
if (SEQ_GT(tp->snd_up, tp->snd_nxt)) {
u_int32_t urp = tp->snd_up - tp->snd_nxt;
if (urp > IP_MAXPACKET)
urp = IP_MAXPACKET;
th->th_urp = htons((u_int16_t)urp);
th->th_flags |= TH_URG;
So on the one hand this means that for a fresh transmission we
only use 0xffff when the urgent data is not in the packet.
However, for retransmissions the urgent pointer is comletely
bogus!
Again this shows that any application that's relying on the urgent
data to be out-of-band is just broken. The only sane way to use
urgent mode is as a notification.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt