Red Hat Bugzilla – Bug 984243
smaba must not start with ipv6 sockets on non-ipv6 machines
Last modified: 2013-07-16 08:51:54 EDT
why does samba claim to listen on non existing ipv6 sockets?
ifconfig doe snot show any interface with a ipv6 address
[root@srv-rhsoft:~]$ netstat -l | grep smb
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 17788/smbd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 17788/smbd
tcp6 0 0 :::139 :::* LISTEN 17788/smbd
tcp6 0 0 :::445 :::* LISTEN 17788/smbd
[root@srv-rhsoft:~]$ cat /etc/sysctl.conf | grep ipv6
From man ipv6(7):
IPv4 connections can be handled with the v6 API by using the v4-mapped-on-v6 address type; thus a program only needs to support this API type to support both protocols. This is handled transparently by the address handling functions in the C library.
IPv4 and IPv6 share the local port space. When you get an IPv4 connection or packet to a IPv6 socket, its source address will be mapped to v6 and it will be mapped to v6.
Samba internally creates sockets using IPv6 format as this is recommended way to handle both types of connections. The same is done by many of network applications nowadays.