[Samba] Problem with SO_REUSEPORT in samba v4.16 No problem in v4.14

Berto Furth bertofurth at sent.com
Thu Aug 18 01:34:52 UTC 2022

Hi Samba folks,

I have having a problem running samba v4.16.4 on my very old Linux system running kernel v2.6.35. I had no problems with version samba v4.14.6. I am getting the following error messages in my logs 

../../source3/lib/util_sock.c:294(open_socket_in)  open_socket_in: setsockopt(SO_REUSEPORT) failed: Protocol not available
../../source3/smbd/server.c:1097(smbd_open_one_socket)  smbd_open_one_socket: open_socket_in failed: Protocol not available
../../source3/smbd/server.c:1264(open_sockets_smbd)  open_sockets_smbd: No sockets available to bind to.
INTERNAL ERROR: open_sockets_smbd() failed in pid 12523 (4.16.3)

The issue appears to be that in earlier versions of smbd, if the SO_REUSEPORT socket option could not be set then a debug message was printed but the code would continue on. My system runs Linux v2.6.35 which does not support SO_REUSEPORT (introduced in Linux v3.3)

I believe the behavior was changed in the following commit 

lib: Properly return errno from open_socket_in()" (Commit : 72540222c2290dc041fb01018de7febe44a4ac0d )

After this commit if setting SO_REUSEPORT fails then the socket would not be setup.

If I were to raise a bug asking for the old behavior back do you think it would be fixed?

Thanks so much,


More information about the samba mailing list