From 3d67f22f846b247f217bf648812434ace903ab54 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Thu, 25 Dec 2008 17:12:58 -0800 Subject: [PATCH] --- yaml --- r: 122867 b: refs/heads/master c: 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 h: refs/heads/master i: 122865: 15c93660d0647c941c0d8e6b2dea4ac17fb7dc06 122863: f4e02090b3fd4ad24977e898ff9f72c56a7361ab v: v3 --- [refs] | 2 +- trunk/net/ipv4/tcp_output.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index fac17cd5b76f..613e42e34bd7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8510b937ae1e23583abdeb828cad5c518295c61d +refs/heads/master: 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 diff --git a/trunk/net/ipv4/tcp_output.c b/trunk/net/ipv4/tcp_output.c index dda42f0bd7a3..557fe16cbfb0 100644 --- a/trunk/net/ipv4/tcp_output.c +++ b/trunk/net/ipv4/tcp_output.c @@ -663,10 +663,14 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, th->urg_ptr = 0; /* The urg_mode check is necessary during a below snd_una win probe */ - if (unlikely(tcp_urg_mode(tp) && - between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF))) { - th->urg_ptr = htons(tp->snd_up - tcb->seq); - th->urg = 1; + if (unlikely(tcp_urg_mode(tp))) { + if (between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF)) { + th->urg_ptr = htons(tp->snd_up - tcb->seq); + th->urg = 1; + } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { + th->urg_ptr = 0xFFFF; + th->urg = 1; + } } tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location);