For smb, if the smb.conf contains explicit bindings to the network interfaces, the service must wait till network interfaces are up, otherwise the service won't be operational. The 0e571054a61e commit and the BZ 13184 have fixed this for nmb and samba, so do exactly the same here, for smb.
Submission: https://lists.samba.org/archive/samba-technical/2018-August/129509.html
Created attachment 14396 [details] patch for 4.9
Created attachment 14397 [details] patch for 4.8
Comment on attachment 14397 [details] patch for 4.8 LGTM
Comment on attachment 14396 [details] patch for 4.9 LGTM
Karolin, please add the patches to the relevant branches. Thanks!
(In reply to Andreas Schneider from comment #6) Pushed to autobuild-v4-{9,8}-test.
(In reply to Karolin Seeger from comment #7) Pushed to both branches. Closing out bug report. Thanks!
adding the network-online.target is not enough. For example the case where IPv6 addresses are auto-generated through RAs will come up after network-online.target was reached. I think this should be solved by using IP_FREEBIND socket option or IP_BINDANY or IP_NONLOCALOK on *BSD systems. This will allow binding to addresses that are not (yet) configured locally. We could use those socket options by default in case that "bind interfaces only" is enabled.
see also https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ : "If you write a server: if you want to listen on other, explicitly configured addresses, consider using the IP_FREEBIND sockopt functionality of the Linux kernel. This allows your code to bind to an address even if it is not actually (yet or ever) configured locally. This also makes your code robust towards network configuration changes."
*** Bug 7060 has been marked as a duplicate of this bug. ***