Reserved network ports
Posted Feb 25, 2010 12:36 UTC (Thu) by
hppnq (guest, #14462)
In reply to:
Reserved network ports by nix
Parent article:
Reserved network ports
Hmm... You mean because NFS components can take any port number and advertise it through the portmapper? Recent Linux implementations have an option to use reserved ports only -- I guess that's the hack you refer to. ;-)
I think this patch would not solve that particular problem. It does not aim to solve the problem that two separate processes might try to grab the same reserved port through bind(reserved_port): it is that of accidental use of a reserved port through bind(whatever_port).
Besides, isn't this trivially solved in userspace, for instance by simply grabbing the desired port -- more complicated solutions that do this can be devised -- and complaining loudly if this fails? Of course there is a small race window, but unless you can tell the kernel that port X should be reserved for process Y, you won't be able to completely rule that out anyway.
(Ironically, that portmapper is not such a bad idea. ;-)
(
Log in to post comments)