| Summary: | Use IP_FREEBIND if available for sshd listening socket | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Jakub Jelen <jjelen> | ||||
| Component: | sshd | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED WONTFIX | ||||||
| Severity: | enhancement | CC: | djm | ||||
| Priority: | P5 | Keywords: | patch | ||||
| Version: | 7.1p1 | ||||||
| Hardware: | Other | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
|
Description
Jakub Jelen
2015-12-09 01:04:36 AEDT
Why can't systemd start sshd after the interfaces have been brought up? The thing is that systemd provides network-online.target [1] and network.target [2], but the specification what does it mean is quite vague and it does not tell (for example) which network interface is ready on systems with more network interfaces. So far you can take this more like an idea to discuss and track, than intention to apply the patch in this form. We are still investigating this behaviour and currently I incline more to have this as config option or environment variable, rather than turning it on everywhere. [1] http://www.freedesktop.org/software/systemd/man/systemd.special.html#network-online.target [2] http://www.freedesktop.org/software/systemd/man/systemd.special.html#network.target [3] http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ (In reply to Damien Miller from comment #1) > Why can't systemd start sshd after the interfaces have been brought > up? It is the default behaviour to depend on network.target, which waits before interface is up. But bringing device up is not bringing device online and setting the correct IP, especially when there is DHCP (if I understand it well). This works fine on fast DHCP or static setups. You can set the dependency on network-online.target, but it brings other dependencies in the boot sequence and slows down the boot. Having the possibility to use IP_FREEBIND as a configuration option (ListenAddressFreeBind or some prefix (-) in front of address itself?) would give us fast boot itself and possibility to tune the network addresses behaviour if needed. (In reply to Jakub Jelen from comment #3) > You can set the dependency on network-online.target, but it brings > other dependencies in the boot sequence and slows down the boot. Doesn't this only affect users who change ListenAddress from the wildcard default? If so, can't they simply choose between wildcard+early or bound+depends-on-network-online? (In reply to Damien Miller from comment #4) > (In reply to Jakub Jelen from comment #3) > > > You can set the dependency on network-online.target, but it brings > > other dependencies in the boot sequence and slows down the boot. > > Doesn't this only affect users who change ListenAddress from the > wildcard default? If so, can't they simply choose between > wildcard+early or bound+depends-on-network-online? Yes, you are right. Default wildcard works fine. On machines with more network interfaces you are more liable to start fiddling with ListenAddress. Using IP_FREEBIND sounds like a reasonable alternative to the second one. I don't think we want this ahead of any other systems supporting it. closing resolved bugs as of 8.6p1 release |