]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: order networkd resolve hook After=network-pre.target
authorNick Rosbrook <enr0n@ubuntu.com>
Fri, 24 Apr 2026 13:38:42 +0000 (09:38 -0400)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 24 Apr 2026 16:59:54 +0000 (17:59 +0100)
Without this, the socket is available well before systemd-networkd.service
is able to start, because of its own After=network-pre.target ordering.
Then, if resolved handles queries before network-pre.target, it will
hang waiting for networkd to reply to hook queries.

This is currently happening in the wild with cloud-init.

units/systemd-networkd-resolve-hook.socket

index 3c11b8e8de1c207cc0862080589d23c4701b0ab7..8a724bbc0c0d44054fd36b36b56c3aba8d0bc66d 100644 (file)
@@ -12,6 +12,7 @@ Description=Network Management Resolve Hook Socket
 Documentation=man:systemd-networkd.service(8)
 ConditionCapability=CAP_NET_ADMIN
 DefaultDependencies=no
+After=network-pre.target
 Before=sockets.target shutdown.target
 Conflicts=shutdown.target