1 # SPDX-License-Identifier: LGPL-2.1+
3 # This file is part of systemd.
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
11 Description=Network Service
12 Documentation=man:systemd-networkd.service(8)
13 ConditionCapability=CAP_NET_ADMIN
14 DefaultDependencies=no
15 # systemd-udevd.service can be dropped once tuntap is moved to netlink
16 After=systemd-udevd.service network-pre.target systemd-sysctl.service
17 Before=network.target multi-user.target shutdown.target
18 Conflicts=shutdown.target
25 ExecStart=!!@rootlibexecdir@/systemd-networkd
29 CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
30 AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
32 ProtectControlGroups=yes
33 ProtectKernelModules=yes
34 MemoryDenyWriteExecute=yes
36 RestrictNamespaces=yes
37 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
38 SystemCallFilter=@system-service
39 SystemCallErrorNumber=EPERM
40 SystemCallArchitectures=native
42 RuntimeDirectory=systemd/netif
43 RuntimeDirectoryPreserve=yes
46 WantedBy=multi-user.target
47 Also=systemd-networkd.socket
48 Alias=dbus-org.freedesktop.network1.service
50 # We want to enable systemd-networkd-wait-online.service whenever this service
51 # is enabled. systemd-networkd-wait-online.service has
52 # WantedBy=network-online.target, so enabling it only has an effect if
53 # network-online.target itself is enabled or pulled in by some other unit.
54 Also=systemd-networkd-wait-online.service