android_kernel_oneplus_msm8998/net
Neal Cardwell 70315d22d3 inet_diag: fix inet_diag_dump_icsk() to use correct state for timewait sockets
Fix inet_diag_dump_icsk() to reflect the fact that both TCP_TIME_WAIT
and TCP_FIN_WAIT2 connections are represented by inet_timewait_sock
(not just TIME_WAIT), and for such sockets the tw_substate field holds
the real state, which can be either TCP_TIME_WAIT or TCP_FIN_WAIT2.

This brings the inet_diag state-matching code in line with the field
it uses to populate idiag_state. This is also analogous to the info
exported in /proc/net/tcp, where get_tcp4_sock() exports sk->sk_state
and get_timewait4_sock() exports tw->tw_substate.

Before fixing this, (a) neither "ss -nemoi" nor "ss -nemoi state
fin-wait-2" would return a socket in TCP_FIN_WAIT2; and (b) "ss -nemoi
state time-wait" would also return sockets in state TCP_FIN_WAIT2.

This is an old bug that predates 05dbc7b ("tcp/dccp: remove twchain").

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-13 22:35:46 -08:00
..
9p
802
8021q vlan: Fix header ops passthru when doing TX VLAN offload. 2013-12-31 16:23:35 -05:00
appletalk
atm
ax25
batman-adv batman-adv: fix vlan header access 2013-12-28 14:48:40 +01:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2013-12-18 13:46:08 -05:00
bridge bridge: use spin_lock_bh() in br_multicast_set_hash_max 2014-01-06 16:39:47 -05:00
caif
can
ceph
core net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
dcb
dccp dccp: catch failed request_module call in dccp_probe init 2013-12-19 19:25:50 -05:00
decnet
dns_resolver
dsa
ethernet
hsr net/hsr: Support iproute print_opt ('ip -details ...') 2013-11-30 12:48:14 -05:00
ieee802154 net: 6lowpan: fix lowpan_header_create non-compression memcpy call 2014-01-05 20:25:24 -05:00
ipv4 inet_diag: fix inet_diag_dump_icsk() to use correct state for timewait sockets 2014-01-13 22:35:46 -08:00
ipv6 ipv6: add link-local, sit and loopback address with INFINITY_LIFE_TIME 2014-01-09 23:07:47 -05:00
ipx
irda
iucv
key
l2tp ipv6: do not erase dst address with flow label destination 2013-12-10 22:51:00 -05:00
lapb
llc net: llc: fix use after free in llc_ui_recvmsg 2014-01-02 19:31:09 -05:00
mac80211 net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
mac802154
mpls
netfilter netfilter: only warn once on wrong seqadj usage 2014-01-06 14:23:17 +01:00
netlabel
netlink genetlink/pmcraid: use proper genetlink multicast API 2013-11-28 18:26:30 -05:00
netrom
nfc NFC: Fix target mode p2p link establishment 2014-01-04 03:31:32 +01:00
openvswitch
packet packet: fix send path when running with proto == 0 2013-12-09 20:09:20 -05:00
phonet
rds rds: prevent dereference of a NULL device 2013-12-27 12:33:58 -05:00
rfkill
rose net: rose: restore old recvmsg behavior 2013-12-29 22:33:17 -05:00
rxrpc
sched net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
sctp sctp: Remove outqueue empty state 2014-01-02 17:22:48 -05:00
sunrpc NFS client bugfixes 2013-12-05 13:05:48 -08:00
tipc tipc: correctly unlink packets from deferred packet queue 2014-01-07 16:15:24 -05:00
unix net: unix: allow bind to fail on mutex lock 2013-12-17 15:04:42 -05:00
vmw_vsock
wimax
wireless radiotap: fix bitmap-end-finding buffer overrun 2013-12-16 12:06:43 +01:00
x25
xfrm
compat.c net: clamp ->msg_namelen instead of returning an error 2013-11-29 16:12:52 -05:00
Kconfig
Makefile
nonet.c
socket.c net: clamp ->msg_namelen instead of returning an error 2013-11-29 16:12:52 -05:00
sysctl_net.c