From: martin zhang <martinbj2008@gmail.com>
To: davem@davemloft.net, Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org
Subject: A question about inet_csk_bind_conflict
Date: Fri, 30 Mar 2018 19:39:46 +0800 [thread overview]
Message-ID: <CAADRoS2h=M1wS6dS3ikCmOZbd-twJJYBVLkScDMVNWCXYEqUNw@mail.gmail.com> (raw)
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
reply other threads:[~2018-03-30 11:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAADRoS2h=M1wS6dS3ikCmOZbd-twJJYBVLkScDMVNWCXYEqUNw@mail.gmail.com' \
--to=martinbj2008@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).