1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

56517 Commits

Author SHA1 Message Date
Yu Watanabe
3d24b0ddd8 network: netdev: drop unused creation type NETDEV_CREATE_AFTER_CONFIGURED 2022-02-27 09:36:48 +09:00
Yu Watanabe
0c91c7a241 network: l2tp: change create type to independent
L2TP tunnel does not have underlying interface. Let's change its type to
independent.
2022-02-27 09:36:48 +09:00
Yu Watanabe
8b49ee2dcd network: l2tp: make Local= optionally take interface name 2022-02-27 09:36:48 +09:00
Yu Watanabe
8b7615f9b9 network: introduce {manager,link}_address_is_reachable() 2022-02-27 09:36:48 +09:00
Yu Watanabe
c45cbc2394 network: merge gateway_is_ready() and link_address_is_reachable()
As link_address_is_reachable() is used only by gateway_is_ready().
2022-02-27 09:36:48 +09:00
Yu Watanabe
77e9be1ee4 network: address: introduce manager_get_address()
And make manager_has_address() return true only when the link which has
the address is ready.
2022-02-27 09:36:48 +09:00
Yu Watanabe
04386f56b5
Merge pull request #22626 from yuwata/network-assorted-cleanups
network: assorted cleanups
2022-02-26 23:57:08 +09:00
Luca Boccassi
a50c5845f5
Merge pull request #22625 from yuwata/network-tc-cleanups
network: cleanups for traffic control
2022-02-26 10:39:18 +00:00
Yu Watanabe
7098414877 network: adjust assertions 2022-02-26 15:01:50 +09:00
Yu Watanabe
97b2bc3506 network: netdev: drop NETDEV_CREATE_MASTER
As there is no deference between NETDEV_CREATE_MASTER and
NETDEV_CREATE_INDEPENDENT.
2022-02-26 15:01:50 +09:00
Yu Watanabe
eae0d010f7 network: netdev: use netdev_is_stacked() at one more place 2022-02-26 15:01:50 +09:00
Yu Watanabe
490c00a369 network: netdev: make link_get_local_address() refuse non-ready links and addresses 2022-02-26 14:59:56 +09:00
Yu Watanabe
8c14846e87 network: traffic control: drop detailed log messages
This also renames `req` -> `m`.

Follow-up for a79a8d16d5 and #22014.
2022-02-26 14:58:01 +09:00
Yu Watanabe
3a67b8bb0d network: traffic control: drop meta from QDisc and TClass
Since #22248, it is not necessary to manage QDisc and TClass in same Set
or Hashmap. Let's manage them independently.
2022-02-26 14:58:01 +09:00
Yu Watanabe
a23e4f60d5
Merge pull request #22619 from yuwata/network-netdev-cleanups
network: several netdev cleanups
2022-02-26 08:13:38 +09:00
Yu Watanabe
b93ce59e51 network: drop unused flag and counter 2022-02-26 05:49:52 +09:00
Yu Watanabe
b4d6ae63ba network: split netdev_create() into two 2022-02-26 05:49:52 +09:00
Yu Watanabe
9aa2585e2f network: assign corresponding NetDev object to Link 2022-02-26 05:49:52 +09:00
Yu Watanabe
c2b19b8f70 network/netdev: drop unused argument 2022-02-26 05:49:52 +09:00
Yu Watanabe
fef805b9fa network/netdev: do not assign value on failure 2022-02-26 05:49:52 +09:00
Frantisek Sumsal
d490188b8f test: accept both unpadded and padded partition sizes
Since util-linux/util-linux@921c7da55e
libfdisk aligns the last partition (on GPT) for optimal I/O. Let's
account for that.

Fixes: #22606
2022-02-25 18:25:04 +00:00
Daan De Meyer
24a0df5c3c mkosi: Add centos_epel config
Now that mkosi has centos-stream 9 support, let's add a config in
the repo so that the mkosi CI tests that configuration as well.

Centos doesn't support btrfs so we use xfs instead. For some reason,
building --hostonly-initrd centos images breaks the qemu boot so I
disabled that option for centos.

We update the mkosi commit hash to 0dd39c20a4
which adds the PowerTools repo to CentOS Stream 8 which is required
to make all the necessary packages required to build systemd on
CentOS Stream 8 available.
2022-02-25 16:17:29 +00:00
Daan De Meyer
6b2ab8fc5c mkosi: Remove Arch nspawn workaround
This has been fixed so the workaround can be removed.
2022-02-25 14:54:03 +00:00
Zbigniew Jędrzejewski-Szmek
fb70f1de69
Merge pull request #22620 from yuwata/network-drop-detailed-log-messages
network: drop detailed log messages
2022-02-25 10:31:50 +01:00
Yu Watanabe
745f0620ed network: dhcp-server: add two more log messages 2022-02-25 11:01:51 +09:00
Yu Watanabe
2971e2adf1 network: bridge mdb: add missing assertion 2022-02-25 11:01:50 +09:00
Yu Watanabe
e1e4cd1eed network: move more functions
No functional change. Preparation for later commits.
2022-02-25 11:01:50 +09:00
Yu Watanabe
8bed7c55bf network: move functions
No functional change. Preparation for later commits.
2022-02-25 11:01:50 +09:00
Yu Watanabe
d3aff22f19 network: address: drop unnecessary call of address_get()
As here `req->address` and the result `existing` are always equivalent.
2022-02-25 11:01:50 +09:00
Yu Watanabe
a79a8d16d5 network: drop detailed log messages
This also renames netlink message `req` -> `m` for preparation of later
commits.

Follow-ups for #22014.
2022-02-25 11:01:50 +09:00
Yu Watanabe
cae162a79c network: make link_down() independent of link_up_or_down()
And rename it to link_down_now() to emphasize it does not use request
queue.
2022-02-25 11:01:50 +09:00
Luca Boccassi
82a03e8a85
Merge pull request #22389 from poettering/resolved-sysinit
units: move resolved to sysinit.target (from basic.target)
2022-02-24 23:00:27 +00:00
Luca Boccassi
6b3211c15e
Merge pull request #22611 from yuwata/network-activation-policy-stacked-netdevs
network: make activation policy also work for stacked netdevs
2022-02-24 22:57:35 +00:00
Luca Boccassi
224f21e64f
Merge pull request #22615 from yuwata/network-dhcp-server-support-pxe-boot-systems
network: dhcp server: support pxe boot systems
2022-02-24 22:52:56 +00:00
Daan De Meyer
baec7d782b meson: Drop required libfdisk version to 2.32
We initially pinned this to 2.33 in
e71f5585b9 because libfdisk 2.32 in
CentOS 8 didn't have
2f35c1ead6
backported.

If we check now, we can see it has been backported
(https://git.centos.org/rpms/util-linux/blob/c8s/f/SOURCES/0048-libfdisk-count-gaps-to-possible-size-when-resize.patch)
which means we can drop the required version to 2.32 instead of 2.33.
2022-02-24 20:06:55 +00:00
Yu Watanabe
369ac19243 network: add NextServer= and Filename= setting to [DHCPServer] section
Closes #4403.
2022-02-25 02:45:47 +09:00
Yu Watanabe
d5e5cd5c34 sd-dhcp-server: add support to send next server and filename option for PXE boot systems 2022-02-25 02:32:58 +09:00
Lennart Poettering
047c2c14c5 units: drop After=systemd-resolved.service from systemd-nspawn@.service
resolved is now started as part of early boot hence we need no explicit
ordering anymore.
2022-02-24 10:37:11 +01:00
Lennart Poettering
29a8fbf49a units: move resolved to sysinit.target (from basic.target)
79a67f3ca4 pulled systemd-resolved.service
in from basic.target instead of multi-user.target, i.e. the idea is to
make it an early boot service, instead of a regular service.

However, early boot services are supposed to be in sysinit.target, not
basic.target (the latter is just one that combines the early boot
services in sysinit.target, the sockets in sockets.targt, the mounts in
local-fs.target and so on into one big target).

Also, the comit actually didn't add a synchronization point, i.e. not
Before=, so that the whole thing was racy.

Let's fix all that.

Follow-up for 79a67f3ca4
2022-02-24 10:36:47 +01:00
Zbigniew Jędrzejewski-Szmek
c00e68c7bd
Merge pull request #22607 from yuwata/network-address-hash-func
network: compare addresses more strictly
2022-02-24 10:28:30 +01:00
Yu Watanabe
ee9918ae46 test-network: add test case for activation policy for stacked netdevs
For issue #22593.
2022-02-24 16:25:05 +09:00
Yu Watanabe
459c35d4c5 test-network: check existence before calling networkctl or ip command 2022-02-24 16:25:05 +09:00
Yu Watanabe
3c39b9cf37 test-network: remove unused configs 2022-02-24 08:37:30 +09:00
Yu Watanabe
047b9991a4 network: create stacked netdevs after the underlying link is activated
Otherwise, the activation policy for the netdevs are ignored.

Fixes #22593.
2022-02-24 08:37:26 +09:00
Yu Watanabe
6dcc087cb6 test-network: add testcases for address property change
This adds a testcase for issue #22515.
2022-02-24 07:37:50 +09:00
Yu Watanabe
390247d2f9 network: also hash address label and broadcast address
Otherwise, even if the address label and/or broadcast address are changed
in a .network file, the change will not be applied on reconfigure.
2022-02-24 07:28:04 +09:00
Yu Watanabe
9472be2614 network: use address_set_broadcast() at one more place 2022-02-24 07:13:31 +09:00
Yu Watanabe
e680486d6f network: set broadcast address on request
Previously, the broadcast address was set to a Address object in
address_section_verify() (or address_acquire()). But, for wireguard
interfaces, we do not use the broadcast address. The .network file may
be assigned to multiple interfaces, hence, we cannot determine if we
should set the broadcast address in address_section_verify().

This makes the broadcast address set in link_request_address().
Then, we set the broadcast address only when we need it.
2022-02-24 07:07:04 +09:00
Yu Watanabe
5d0030310c network: compare addresses more strictly
This re-introduce the full hash and compre functions for Address,
which was reverted 1d30fc5cb6 (#17851).

The issue #17831, which is fixed by #17851, is handled in a different way;
simply ignore to configure the conflicted DHCPv6 address. Previously, we
warn about the conflict, but continue to configure the address anyway, and
the kernel ignores the request. So, it is not necessary to request the
conflicted address in networkd side.

This fixes the following issues:
- when a link has an address, and corresponding .network file has the
  address with different prefix length, then the prefix length specified
  in the .network file will not be applied,
- we cannot specify multiple IPv4 addresses with different prefix
  length, e.g.
  ----
  Address=10.10.10.10/24
  Address=10.10.10.10/16
  ----
  This is spurious setup, but the kernel allows it.

Fixes #22515.
2022-02-24 06:30:37 +09:00
Daan De Meyer
0802f62efc systemctl: Show how long a service ran for after it exited in status output 2022-02-23 20:09:50 +00:00