netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A question about inet_csk_bind_conflict
@ 2018-03-30 11:39 martin zhang
  0 siblings, 0 replies; only message in thread
From: martin zhang @ 2018-03-30 11:39 UTC (permalink / raw)
  To: davem, Eric Dumazet; +Cc: netdev

HI all,

I have a question about tcp bind check function:inet_csk_bind_conflict.

My case:

192.168.56.101:37818    ==> 192.168.56.193:22
On host A (tcp client: 192.168.56.101), there is  a tcp connection to
server B(192.168.56.193, tcp server).

I want run a tcp server on A, and listen/bind tcp port 37818, but it failed.
I check the kernel source and found it is stopped by inet_csk_bind_conflict.

I think in this case, it should success.
Because,
1. when a tcp packet arrives network stack, we firstly look the
established/timewait socket,
and then search for listen socket.
2. peer side(192.168.56.193:22), is a tcp server. It will never
connect to192.168.56.101:37818, with 192.168.56.193:22.

I don’t  understand why the kernel fail at inet_csk_bind_conflict,
I wonder if I ignore some case or  it is a bug?

Thanks!

Martin

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-30 11:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-30 11:39 A question about inet_csk_bind_conflict martin zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).