[BUG] UDP : bind() checks are not complete

2007-06-05 Thread Eric Dumazet
David I discovered one big problem with UDP binding in 2.6.22-rc4 : Consider you have eth0 with addr 192.168.0.1 Consider one UDP socket was bound to 192.168.0.1:32769. It will be stored on a slot != 1 Another UDP socket is created and binded to (0.0.0.0:0) __udp_lib_get_port() is called

Re: [BUG] UDP : bind() checks are not complete

2007-06-05 Thread David Miller
From: Eric Dumazet [EMAIL PROTECTED] 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. We really should check no socket is bound to XXX.XXX.XXX.XXX:32769. With current

Re: [BUG] UDP : bind() checks are not complete

2007-06-05 Thread David Miller
From: Eric Dumazet [EMAIL PROTECTED] Date: Tue, 05 Jun 2007 22:22:36 +0200 David Miller a écrit : 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

Re: [BUG] UDP : bind() checks are not complete

2007-06-05 Thread David Miller
From: David Miller [EMAIL PROTECTED] Date: Tue, 05 Jun 2007 13:37:17 -0700 (PDT) From: Eric Dumazet [EMAIL PROTECTED] Date: Tue, 05 Jun 2007 22:22:36 +0200 David Miller a écrit : Does checking for INADDR_ANY sockets really require a full scan? It should just need two hash probes as