When I configure a service file in systemd for my /usr/sbin/sshd file, I write a dependency statement such as After=network-online.target. ... [Unit] Description=OpenSSH server daemon Documentation=man:sshd(8) man:sshd_config(5) After=network-online.target sshd-keygen.target Wants=sshd-keygen.target ... However, when I configured some special IPv6 addresses for my network adapter, I restarted the machine and found that the bind function of sshd failed to bind such IP addresses. The reason is that when the bind function is called, the IPv6 address is not in the neighbor discovery state and does not take effect completely. Therefore, I wonder whether the bind function policy in sshd can be modified accordingly. For example, the network address status can be detected first.
Enforcing the external preconditions are met is the job of systemd and/or NetworkManager, not sshd. I think they already offer a knob that allows this, e.g. this bug report from a similar situation https://bugzilla.redhat.com/show_bug.cgi?id=1713478#c11
close bugs that were resolved in OpenSSH 8.5 release cycle