By Jonathan Corbet
February 24, 2010
It is not all that uncommon to have a network application which needs to be
able to bind to a specific port. Often, such requirements result from a
firewall configuration allowing incoming connections only to a specific
port, but there can be other reasons as well. When running such an
application, it can be unpleasant to discover that somebody else's
long-running ssh connection happened to stumble onto the required port. It
would be nice to be able to avoid this kind of conflict if at all possible.
This patch set from Octavian
Purdila aims to make it possible. It adds a new sysctl knob (called
ip_local_reserved_ports) under /proc/sys/net/ipv4.
Should the system administrator write a comma-separated list of ports (or
ranges of ports denoted by a hyphen) to this parameter, the networking
layer will avoid those
ports whenever it picks a port number for a new socket. Reserving ports in
this manner will not interfere with any application which binds to those
ports explicitly.
This patch has been through a surprising number of revisions; chances seem
good that it will show up in the mainline once the 2.6.34 merge window
opens.
(
Log in to post comments)