/proc/net/netstat inconsistent with linux behavior

217 views
Skip to first unread message

qzy888

unread,
Jul 23, 2011, 6:05:17 PM7/23/11
to Android Linux Kernel Development
I notice that the TCPMD5Unexpected does not increment when it should
be. Specifically, according to the kernel source code (2.6.32.9) or
later versions, this counter increments when three of the following
happens for any incoming TCP packets:
1. it is expecting a MD5 hash in the TCP header option, but there is
not.
2. it is not expecting a MD5 hash in the TCP header option, but there
is one.
3. a wrong MD5 hash.

I specifically tested scenario 2 on both a standard linux machine with
a slightly new kernel (2.6.38-10) and three android phones all with
kernel (2.6.32.9-XXXXX). The TCPMD5Unexpected counter increments
always on the linux machine but never on all three android phones. The
three phones are captivate (android 2.2), nexus one (android 2.2), and
atrix (android 2.2.2). The linux kernel version does not appear to be
an issue as the code related to the TCPMD5Unexpected counter seems
identical for both versions.

Does anyone know what's possibly causing this?? Thanks a million!

Chris Stratton

unread,
Jul 25, 2011, 12:30:44 PM7/25/11
to android...@googlegroups.com
On Saturday, July 23, 2011 6:05:17 PM UTC-4, qzy888 wrote:

I specifically tested scenario 2 on both a standard linux machine with
a slightly new kernel (2.6.38-10) and three android phones all with
kernel (2.6.32.9-XXXXX). The TCPMD5Unexpected counter increments
always on the linux machine but never on all three android phones. The
three phones are captivate (android 2.2), nexus one (android 2.2), and
atrix (android 2.2.2). The linux kernel version does not appear to be
an issue as the code related to the TCPMD5Unexpected counter seems
identical for both versions.

Perhaps although you say the source code is the same, the binaries are not due to differences in the kernel config?

A lot of android devices seem to have a /proc/config.gz - you could pull that, unzip it, diff against your desktop and read through the differences for anything that seems relevant.  Or you could read through the relevant source code and makefiles and see what configuration options are required to activate it.

Zhiyun Qian

unread,
Jul 25, 2011, 2:23:09 PM7/25/11
to android...@googlegroups.com
Chris, I think you are right. I compared the config files and the
difference is clear.

"CONFIG_TCP_MD5SIG=y=y" on a ubuntu machine.
"# CONFIG_TCP_MD5SIG is not set" on the android phones.

Thanks!

> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel

Reply all
Reply to author
Forward
0 new messages