You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Bernie Kirby <be...@ecr.mu.oz.au> on 1997/08/19 08:20:02 UTC

os-solaris/1012: make_sock does a bind before the setsockopt's

>Number:         1012
>Category:       os-solaris
>Synopsis:       make_sock does a bind before the setsockopt's
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Aug 18 23:20:01 1997
>Originator:     bernie@ecr.mu.oz.au
>Organization:
apache
>Release:        1.3a1
>Environment:
Sparc, Solaris 2.5.1, SUN's compilers.
>Description:
If you are using a SOLARIS2 OS, then the code in make_sock (file http_main.c)
calls  sock_bind (s, server);, then proceeds with some setsockopt calls.
The SO_REUSEADDR setsockopt doesn't have any effect on an already bind'd
socket. The problem was not present in 1.2.1.

>How-To-Repeat:

You can easily replicate the problem by starting the server, then quickly killing
it, then attempting to restart it. You get an error about not being able to
bind to port 80. Of course, you do this on a Solaris system...
>Fix:
Go back to what was in the 1.2.1 release and do the setsockopt's before calling
bind. This is what I've done, and I've not noticed any problems (thus far :-%2
>Audit-Trail:
>Unformatted: