diff options
| author | Tony Lindgren <tony@atomide.com> | 2012-11-13 13:25:38 -0800 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2012-11-13 13:25:38 -0800 |
| commit | 89ab216b33ba9405880fd3d89531305a931bc70f (patch) | |
| tree | 8f6428ce51ecaed6f6e1379c036dbe341eb71e34 /net/ipv4/tcp.c | |
| parent | c9d501e5cb0238910337213e12a09127221c35d8 (diff) | |
| parent | 46bf4a562207c5ebd24e1dde5e5ee326cd3d6b91 (diff) | |
| download | olio-linux-3.10-89ab216b33ba9405880fd3d89531305a931bc70f.tar.xz olio-linux-3.10-89ab216b33ba9405880fd3d89531305a931bc70f.zip | |
Merge branch 'omap-for-v3.8/pm' into omap-for-v3.8/clock
Diffstat (limited to 'net/ipv4/tcp.c')
| -rw-r--r-- | net/ipv4/tcp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index f32c02e2a54..197c0008503 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -549,14 +549,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); @@ -2766,6 +2764,8 @@ void tcp_get_info(const struct sock *sk, struct tcp_info *info) info->tcpi_options |= TCPI_OPT_ECN; if (tp->ecn_flags & TCP_ECN_SEEN) info->tcpi_options |= TCPI_OPT_ECN_SEEN; + if (tp->syn_data_acked) + info->tcpi_options |= TCPI_OPT_SYN_DATA; info->tcpi_rto = jiffies_to_usecs(icsk->icsk_rto); info->tcpi_ato = jiffies_to_usecs(icsk->icsk_ack.ato); |