Problem running Samba with IPv4 only network

Amitay Isaacs amitay at gmail.com
Thu Jun 5 22:17:39 MDT 2014


On Fri, Jun 6, 2014 at 8:24 AM, Jeremy Allison <jra at samba.org> wrote:

> On Thu, Jun 05, 2014 at 11:40:38PM +0300, Alexander Bokovoy wrote:
>
> > The patch looks fine; however, we would fail as well in smbd when IPv6
> > disabled in the Linux kernel as we would try to force IPV6_IPV6ONLY in
> > source3/lib/util_sock.c:open_socket_in() -- HAVE_IPV6 is there but
> > the stack is not enabled. There are some corporate security guides which
> > mandate disabling IPv6 stack if it is not in use (i.e. ipv6.disable=1
> > instead of ipv6.disable_ipv6=1 on Linux kernel cmdline).
>
> Ok, how about the following updated version.
>
> Adds the same logic to smbd. So now we just try
> and open sockets on both :: and 0.0.0.0 if HAVE_IPV6
> is there. But if the IPv6 stack is present but
> disabled we'll still start if we get a working
> socket on just IPv4 for all services.
>
> Note this logic is *not* done if bind interfaces only
> is set - in that case we expect to be able to bind
> explicitly to the listed interfaces and will fail
> if we can't bind to any one of them.
>
> Let me know if this works !
>
> Cheers,
>
>         Jeremy.
>

Thanks Jeremy.  Patch works as far as AD functionality is concerned.  (I am
using the AD as authentication source for clustered samba.  Only things I
use from Samba server are domain authentication and DNS.)

However I still see following errors during start up.

  /usr/sbin/smbd: smbd version 4.1.8 started.
  /usr/sbin/smbd: Copyright Andrew Tridgell and the Samba Team 1992-2013
  Terminating connection - 'wbsrv: wbsrv_call_loop:
tstream_read_pdu_blob_recv() - NT_STATUS_CONNECTION_DISCONNECTED'
  single_terminate: reason[wbsrv: wbsrv_call_loop:
tstream_read_pdu_blob_recv() - NT_STATUS_CONNECTION_DISCONNECTED]
  /usr/sbin/smbd: STATUS=daemon 'smbd' finished starting up and ready to
serve connectionsopen_socket_in(): socket() call failed: Address family not
supported by protocol
  /usr/sbin/smbd: smbd_open_once_socket: open_socket_in: Address family not
supported by protocol
  /usr/sbin/smbd: open_socket_in(): socket() call failed: Address family
not supported by protocol
  /usr/sbin/smbd: smbd_open_once_socket: open_socket_in: Address family not
supported by protocol


Do we need to worry about wbsrv failures?


Amitay.


More information about the samba-technical mailing list