Bug 15098 - GetActiveTcpConnections parses /proc/net/tcp socket statuses incorrectly
Summary: GetActiveTcpConnections parses /proc/net/tcp socket statuses incorrectly
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-10-01 11:23 UTC by paul firth
Modified: 2018-03-13 14:18 UTC (History)
3 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description paul firth 2013-10-01 11:23:37 UTC
Hi guys,

Looking in System.Net.NetworkInformation.MibIPGlobalProperties.GetActiveTcpConnections(), I can see that the TCP socket status from /proc/net/tcp is parsed and directly interpreted as the enum System.Net.NetworkInformation.TcpState.

However, the order and numbering of the states in System.Net.NetworkInformation.TcpState is quite different from the linux TCP status listed here http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/net/tcp_states.h?id=HEAD.

This means statuses are incorrectly returned from GetActiveTcpConnections().

Cheers, Paul.
Comment 1 pkyres 2017-10-26 14:35:43 UTC
This is still an issue. An "Established" TCP connection is reported as "Closed" on Linux operating systems. More information here

Note You need to log in before you can comment on or make changes to this bug.