SnaiX wrote:
So it would run 1-4. but it reports EADDRINUSE after bind.

Why?

The stack assumes that SO_REUSEADDR is never cleared on a socket after it gets set.

 How to resolve it? Should I dup() the fd?
Did you close the affected socket in (5) ?

Presumably you are still trying to use the same port; is it a non-ephemeral port? You might want to consider SO_REUSEPORT although I believe FreeBSD doesn't fully support it for non-multicast.

BMS
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to