ephemeral ports and port re-use for socket_wrapper emulated TCP bind()

Volker Lendecke vl at samba.org
Thu Oct 20 04:07:20 UTC 2016

Andrew Bartlett <abartlet at samba.org> writes:

> I wanted to change Samba from listening only on 1024 to listening on
> many ports for ncacn_ip_tcp so that I could multi-thread our netlogon
> server.  

You want to do WHAT???

That's steep. I've been in threads lately knee-deep and even code as
limited in scope as the pthreadpool, tevent and messages_dgm it is hell
to get right. In particular run-down of structures is almost impossibly
difficult, at least for me. Just look at e84521d. I looked at the code
for hours, Linux only complained in the _parent and _child code. It took
the _prepare error message from FreeBSD for me to find it. In hindsight
it is of course an obvious error, but finding it was really difficult.

So -- really multi-thread it? Can't you go with multiple processes? If
the overhead is too large, we need to work on the footprint in other
ways, and I'll be happy to help there, really :-)


More information about the samba-technical mailing list