Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2002 22:57:26 +0200
From:      =?iso-8859-1?Q?David_Sieb=F6rger?= <drs-stable@rucus.ru.ac.za>
To:        freebsd-stable@freebsd.org
Subject:   Re: Multicast bind problem
Message-ID:  <20020213225726.A79566@rucus.ru.ac.za>
In-Reply-To: <3C6ABEA4.427E23F3@a1.org.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Bap <bap@a1.org.uk> wrote:
> I am trying to start 2 processes on my box 4.5-RC FreeBSD 4.5-RC #3: Thu
> Jan 24 19:18:28 GMT 2002
> 
> The 1st one starts no problem, then the 2nd one exits with a bind
> exception (Address already in use)
> 
> The processes are both trying to bind to a multicast socket (actually
> SUNs JINI Reggie and LookupBrowser)

If two sockets are to bind the same local port, they need to have the
SO_REUSEADDR or SO_REUSEPORT socket options set.  For example,

  int one=1;
  setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &one, sizeof (one));

See getsockopt(2) for further details.

I'm afraid I know nothing about the specific JINI programs you
mention, but I'd guess that they aren't setting those socket options.


-- 
David Siebörger
drs-stable@rucus.ru.ac.za

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020213225726.A79566>