]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | # SPDX-License-Identifier: LGPL-2.1-or-later |
a7df2d1e | 2 | # |
f579559b TG |
3 | # This file is part of systemd. |
4 | # | |
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. | |
9 | ||
10 | [Unit] | |
4fd3fc66 | 11 | Description=Network Configuration |
f579559b | 12 | Documentation=man:systemd-networkd.service(8) |
689d781b | 13 | ConditionCapability=CAP_NET_ADMIN |
f579559b | 14 | DefaultDependencies=no |
5f004d1e | 15 | # systemd-udevd.service can be dropped once tuntap is moved to netlink |
2c0dffe8 | 16 | After=systemd-networkd.socket systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service |
689d781b LP |
17 | Before=network.target multi-user.target shutdown.target |
18 | Conflicts=shutdown.target | |
2c0dffe8 | 19 | Wants=systemd-networkd.socket network.target |
f579559b TG |
20 | |
21 | [Service] | |
c61f302d | 22 | AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW |
e67b818c | 23 | BusName=org.freedesktop.network1 |
3ca9940c | 24 | CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW |
9af28206 | 25 | DeviceAllow=char-* rw |
059cc610 | 26 | ExecStart=!!{{ROOTLIBEXECDIR}}/systemd-networkd |
9e36b885 | 27 | ExecReload=networkctl reload |
af7a86b8 | 28 | FileDescriptorStoreMax=512 |
3ca9940c LP |
29 | LockPersonality=yes |
30 | MemoryDenyWriteExecute=yes | |
31 | NoNewPrivileges=yes | |
24da96a1 | 32 | ProtectProc=invisible |
cabc1c6d | 33 | ProtectClock=yes |
0c28d51a | 34 | ProtectControlGroups=yes |
3ca9940c | 35 | ProtectHome=yes |
6168ae58 | 36 | ProtectKernelLogs=yes |
24da96a1 | 37 | ProtectKernelModules=yes |
3ca9940c LP |
38 | ProtectSystem=strict |
39 | Restart=on-failure | |
24da96a1 | 40 | RestartKillSignal=SIGUSR2 |
3ca9940c | 41 | RestartSec=0 |
a6d4e83b | 42 | RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET |
3ca9940c LP |
43 | RestrictNamespaces=yes |
44 | RestrictRealtime=yes | |
62aa2924 | 45 | RestrictSUIDSGID=yes |
c61f302d YW |
46 | RuntimeDirectory=systemd/netif |
47 | RuntimeDirectoryPreserve=yes | |
3ca9940c LP |
48 | SystemCallArchitectures=native |
49 | SystemCallErrorNumber=EPERM | |
50 | SystemCallFilter=@system-service | |
51 | Type=notify | |
52 | User=systemd-network | |
059cc610 | 53 | {{SERVICE_WATCHDOG}} |
c4a0b20c JD |
54 | |
55 | [Install] | |
56 | WantedBy=multi-user.target | |
5544ee85 | 57 | Also=systemd-networkd.socket |
fb369a5b | 58 | Alias=dbus-org.freedesktop.network1.service |
9e496560 | 59 | |
e053f492 ZJS |
60 | # The output from this generator is used by udevd and networkd. Enable it by |
61 | # default when enabling systemd-networkd.service. | |
62 | Also=systemd-network-generator.service | |
63 | ||
9e496560 ZJS |
64 | # We want to enable systemd-networkd-wait-online.service whenever this service |
65 | # is enabled. systemd-networkd-wait-online.service has | |
66 | # WantedBy=network-online.target, so enabling it only has an effect if | |
67 | # network-online.target itself is enabled or pulled in by some other unit. | |
68 | Also=systemd-networkd-wait-online.service |