diff options
author | Todd Poynor <toddpoynor@google.com> | 2013-01-15 19:33:11 -0800 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2013-01-15 19:33:11 -0800 |
commit | fbad46f30d0ccb24fcadf4fa129d917fd0bfa1fe (patch) | |
tree | b7ed0216b986c7a0c8f7ab7f2b77191d9b070ead /net/ipv4/tcp.c | |
parent | 2627bab94940583e37f36ffa9f635e35a335c33d (diff) | |
parent | 2a68fec1118107fbaa40c631d45641d40d88ad71 (diff) | |
download | kernel_samsung_tuna-fbad46f30d0ccb24fcadf4fa129d917fd0bfa1fe.zip kernel_samsung_tuna-fbad46f30d0ccb24fcadf4fa129d917fd0bfa1fe.tar.gz kernel_samsung_tuna-fbad46f30d0ccb24fcadf4fa129d917fd0bfa1fe.tar.bz2 |
Merge commit 'v3.0.58' into android-3.0
Change-Id: I05959ed26f71cf9197df59291e8e13f254b2115c
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 08d2244..1a9a57a 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -485,14 +485,12 @@ int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg) !tp->urg_data || before(tp->urg_seq, tp->copied_seq) || !before(tp->urg_seq, tp->rcv_nxt)) { - struct sk_buff *skb; answ = tp->rcv_nxt - tp->copied_seq; - /* Subtract 1, if FIN is in queue. */ - skb = skb_peek_tail(&sk->sk_receive_queue); - if (answ && skb) - answ -= tcp_hdr(skb)->fin; + /* Subtract 1, if FIN was received */ + if (answ && sock_flag(sk, SOCK_DONE)) + answ--; } else answ = tp->urg_seq - tp->copied_seq; release_sock(sk); |