[Pkg-samba-maint] Bug#873073: Bug#873073: Other ways to disable IPv6 ?

Dark Penguin darkpenguin at yandex.com
Sun Jul 21 20:45:21 BST 2019


I tried this just now. The result is, basically, nothing: my kernel does
not have IPv6 support anyway, so restricting IPv6 out on the systemd
level does not change anything. There are still error messages about
being unable to bind to IPv6 upon restarting smbd, however with this,
restarting it also takes a few seconds instead of happening almost
instantly.

I guess the "proper" solution would be the same: if there are no IPv6
interfaces in the system, smbd should not try to bind to them. If it was
specifically instructed to bind to a certain interface and it is
unavailable, then output an error message "This interface is requested
but unavailable", instead of "open_socket_in(): socket() call failed:
Address family not supported by protocol". This error message is not
even decipherable without Google's help.


On 15/07/19 16:51, Mathieu Parent wrote:
> Le dim. 14 juil. 2019 à 15:09, Dark Penguin <darkpenguin at yandex.com> a écrit :
>>
>> This particular case could be less of a problem (at least to me) if
>> adding "bind interfaces only = yes" was not the only way to disable IPv6
>> in samba.
>>
>> Would it make sense to change the priority of an error message on
>> startup about missing IPv6 support? If samba sees that IPv6 is not
>> supported on this system, shouldn't it deduce that it is therefore not
>> required, and output an "info" message like "Not binding to IPv6 -
>> protocol not supported" instead of an error?
> 
> Have you tried overriding with:
> 
> cat /etc/systemd/system/smbd.service
> [Service]
> RestrictAddressFamilies=AF_UNIX AF_INET
> 
> (then systemctl daemon-reload and systemctl restart smbd)
> 
> (Not tested...)
> 
> Regards
> 

-- 
darkpenguin



More information about the Pkg-samba-maint mailing list