Skip to content

Commit

Permalink
tcp: fix regression in urgent data handling
Browse files Browse the repository at this point in the history
Stephan Springl found that commit 1402d36 "tcp: introduce
tcp_try_coalesce" introduced a regression for rlogin

It turns out problem comes from TCP urgent data handling and
a change in behavior in input path.

rlogin sends two one-byte packets with URG ptr set, and when next data
frame is coalesced, we lack sk_data_ready() calls to wakeup consumer.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Stephan Springl <springl-k@lar.bfw.de>
Cc: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Sep 18, 2012
1 parent 0e698bf commit 1d57f19
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -4661,7 +4661,7 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)

if (eaten > 0)
kfree_skb_partial(skb, fragstolen);
else if (!sock_flag(sk, SOCK_DEAD))
if (!sock_flag(sk, SOCK_DEAD))
sk->sk_data_ready(sk, 0);
return;
}
Expand Down Expand Up @@ -5556,8 +5556,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
#endif
if (eaten)
kfree_skb_partial(skb, fragstolen);
else
sk->sk_data_ready(sk, 0);
sk->sk_data_ready(sk, 0);
return 0;
}
}
Expand Down

0 comments on commit 1d57f19

Please sign in to comment.