This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem with bindresvport assigning ports in range 600-1023





I am trying to get status of a suggested patch for the subject problem.
Following is an exchange of emails:


------------Start of Mail-----------------------
Rajasekhar Inguva wrote:

> The glibc routine bindresvport(), in it's current implementation,
randomly
> tries to a bind to a port number in the range 600-1023.

Ulrich>>And this is the right implementation.  If it's causing problems
your
Ulrich>> setup is wrong.

>I didnt quite get the justification of grabbing a port which is 'well
known'
by way of establishing itself in /etc/services.
>            If rule 1 is "All well known services wanting to bind to ports
in range
0-1023 should do so as per listings in /etc/services"
>            then rule 2 should be "If i need a random reserved port, I
better skip
the ports which are legally assigned to well known services"

> Am i missing something or am i confused ? Please clear me up on this.

Ulrich> xinetd reserved the port for you.  The /etc/services file has no
job in
Ulrich> allocation or preventing allocation whatsoever.  Never has, never
will.
---------------End of Mail------------------------------------------------

My question is, if the assertion that bindresvport can randomly grab a port
in the range 600-1023 is true, then why does the Internet Assigned Numbers
Authority (IANA) bother to assign port numbers in this range? Once a
service has such an assigned port number, the service expects to be able to
bind to it so its clients can find it at that port number. The problem we
saw is that another program grabbed the assigned port first by calling
bindresvport.

What am I missing?

thanks

Mike

-------------------------------------------------------------
Michael A. Schmidt
IBM
Poughkeepsie Unix Development Laboratory
Dept. XXWA / MS P963
(845) 433-8012      (tie) 293-8012
FAX   433-8363
mmaass@us.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]