From: Eric Dumazet <dada1@cosmosbay.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [BUG] UDP : bind() checks are not complete
Date: Tue, 05 Jun 2007 22:22:36 +0200 [thread overview]
Message-ID: <4665C60C.1000406@cosmosbay.com> (raw)
In-Reply-To: <20070605.130219.35356925.davem@davemloft.net>
David Miller a écrit :
> From: Eric Dumazet <dada1@cosmosbay.com>
> Date: Tue, 5 Jun 2007 19:15:36 +0200
>
>> I discovered one big problem with UDP binding in 2.6.22-rc4 :
>
> Thanks for finding this problem, the crux of the issue is
> INADDR_ANY.
Well, I feel guilty as I was initial patch submiter :(
>
>> We really should check no socket is bound to XXX.XXX.XXX.XXX:32769. With current hashing,
>> it means checking all slots in udptable[] :(
>>
>> Our choices are :
>>
>> 1) Drop all thoses patches and re-think them for 2.6.23 eventually
>> 2) Add the extra check for ANY_ADDR sockets and perform a full scan
>>
>> What do you think ?
>
> Does checking for INADDR_ANY sockets really require a full scan?
> It should just need two hash probes as far as I can tell to see
> if there is "0.0.0.0:PORT" bound already.
Well, we might have 1000 ip addresses on the machine (or not :) ), and
192.168.0.1:PORT ... 192.168.0.254:PORT already bound.
next prev parent reply other threads:[~2007-06-05 20:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-05 17:15 [BUG] UDP : bind() checks are not complete Eric Dumazet
2007-06-05 20:02 ` David Miller
2007-06-05 20:22 ` Eric Dumazet [this message]
2007-06-05 20:37 ` David Miller
2007-06-05 23:00 ` David Miller
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=4665C60C.1000406@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--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).