kern/64738: SO_REUSEADDR doesn't seem to work with AF_UNIX
David Muir Sharnoff
muir at idiom.com
Thu Mar 25 23:00:32 PST 2004
>Synopsis: SO_REUSEADDR doesn't seem to work with AF_UNIX
>Arrival-Date: Thu Mar 25 23:00:31 PST 2004
>Originator: David Muir Sharnoff
>Release: FreeBSD 4.9-RELEASE i386
System: FreeBSD idiom.com 4.9-RELEASE FreeBSD 4.9-RELEASE #23: Wed Nov 19 23:17:38 PST 2003 muir at staid.idiom.com:/build/obj/build/src/sys/IDIOM i386
I was working with milter (using perl Sendmail::Milter) and
ran into trouble: my milter would not start up because it
could not bind: Address In Use.
This was highly repeatable.
I look at the source (/usr/src/contrib/sendmail/libmilter/listener.c)
and it clearly sets SO_REUSEADDR regardless of socket type.
Eventually I gave up and switched to a AF_INET socket. That
fixed the problem immediately. I would have preferred to
keep with an AF_UNIX socket because it's easier to secure.
More information about the freebsd-bugs