From: Paul Sladen (vserver_at_paul.sladen.org)
Date: Fri 03 Jan 2003 - 22:38:45 GMT
On Wed, 1 Jan 2003, Jesper FA wrote:
Hi Jesper,
> when bind is called inside a vserver the IP's are limited [...] This all
> works find if you call create socket, bind, listen as most programs do.
Many thanks for finding this (and fixing it!). I hope Jacques picks this up.
> Is there any good reason to handle 1 IP and 2 or more IP's as separate cases?
The code to handle the bind(0.0.0.0) case is unfortunately based on some
linear searches (and might even be as bad as O(N^2)) so the idea was to cut
down on the searching and optimise for the common case of only allowing one
IP and localhost per context.
> my first ever published kernel patch and I (yet) don't understand everything
Only difference is that when you screw up you get a Oops instead of a segv!
-Paul ;-)
-- Nottingham, GB