1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-27 03:21:32 +03:00
Commit Graph

53916 Commits

Author SHA1 Message Date
Yu Watanabe
483566e5ba network: deprecate ForceDHCPv6PDOtherInformation= setting
The setting is completely meaningless, as WithoutRA= and UseDelegatedPrefix=
in [DHCPv6] section, and DHCPv6Client= in [IPv6AcceptRA] section control
the behavior.
2021-10-27 00:33:44 +09:00
Yu Watanabe
f107df6cdb
Merge pull request #21000 from yuwata/network-dhcp6-pd-introduce-uplink
network: dhcp6: introduce UplinkInterface= for prefix delegation
2021-10-27 00:32:50 +09:00
Zbigniew Jędrzejewski-Szmek
d6d31d9f41
Merge pull request #21126 from bluca/meta_arch
docs/COREDUMP_PACKAGE_METADATA: add architecture field
2021-10-26 16:24:22 +02:00
Lennart Poettering
bb5464ad20 update TODO 2021-10-26 15:40:25 +02:00
Luca Boccassi
98acae1f21 docs/COREDUMP_PACKAGE_METADATA: ELF section should be read-only and 4-bytes-aligned 2021-10-26 12:49:39 +01:00
Yu Watanabe
caad88a22b test-network: add test cases for DHCPv6 prefix delegation 2021-10-26 20:43:10 +09:00
Yu Watanabe
dc5cae6c9d network: dhcp6: introduce UplinkInterface= for DHCP6 prefix delegation 2021-10-26 20:43:10 +09:00
Yu Watanabe
2cba2146ac network: move config_parse_uplink() to networkd-dhcp-common.[ch] 2021-10-26 20:43:10 +09:00
Yu Watanabe
47e9c655b4 network: dhcp6pd: do not trigger prefix reassignment for all downstreams when a new downstream appears
It is not necessary to reconfigure other interfaces.
2021-10-26 20:43:08 +09:00
Yu Watanabe
079f94edfa network: dhcp6: do not reconfigure/restart DHCPv6 clients when a new downstream appears
Previously, when a downstream appears which requests delegated prefix to
be assigned, then possibly restart all DHCPv6 clients for another
interfaces.

This makes networkd always honor the UseDelegatedPrefix= setting, and
not restart DHCPv6 clients.
2021-10-26 20:40:20 +09:00
Yu Watanabe
0f5ef9b62a network: dhcp6: introduce UseDelegatedPrefix= setting and enable by default
Previously, the prefix delegation is enabled when at least one
downstream interfaces request it. But, when the DHCPv6 client on the
upstream interface is configured, some downstream interfaces may not
exist yet, nor have .network file assigned.

Also, if a system has thousands of interfaces, then the previous logic
introduce O(n^2) search.

This makes the prefix delegation is always enabled, except when it is
explicitly disabled. Hopefully, that should not break anything, as the
DHCPv6 server should ignore the prefix delegation request if the server
do not have any prefix to delegate.
2021-10-26 20:29:08 +09:00
gregzuro
48538c19e5 change req meson version
since `meson compile` first appears in 0.54.0
2021-10-26 09:29:14 +01:00
Yu Watanabe
adef6d089b
Merge pull request #21122 from yuwata/network-optimize-reload
network: slightly optimize "networkctl reload"
2021-10-26 15:55:01 +09:00
Yu Watanabe
5b47f35d0e test-network: reconfigure interface instead of restarting networkd 2021-10-26 08:20:29 +09:00
Yu Watanabe
b4564f4e8f network: delay dropping addresses or so on reloading .network files
When a .network file is updated but its change is not so big, it is not
necessary to first drop all configs and then reassign later again.
This slightly optimize such situation. First foreignize all configs, and
then drop later when it is not requested by the updated .network file.
2021-10-26 08:20:22 +09:00
Lennart Poettering
1845ba368e homework: replace homegrown "dir-is-empty" check with dir_is_empty_at() 2021-10-26 08:13:15 +09:00
Yu Watanabe
b1ccd7d737
Merge pull request #21097 from poettering/dir-is-empty-fix
dir_is_empty_at() tweaks
2021-10-26 08:12:50 +09:00
Yu Watanabe
8a088877ab test: enable debug logging of systemd-udevd
Otherwise, it is hard to debug when the test fails.
2021-10-26 08:12:10 +09:00
Yu Watanabe
0f96a82311 network: dhcp6pd: do not assign downstream prefix when RADV is requested but not configured yet 2021-10-26 08:11:44 +09:00
Yu Watanabe
928112a487 network: ndisc: fix behavior when DHCPv6Client=always
The man page says that when 'always' is set, the DHCPv6 client always
starts in managed mode, and that means we need to ignore the RA flags.
2021-10-26 08:11:19 +09:00
Yu Watanabe
e817f5b0f9
Merge pull request #21119 from yuwata/network-dhcp6-pd-cleanups
network: dhcp6pd: several cleanups
2021-10-26 08:10:56 +09:00
Yu Watanabe
a84171ce6f libsystemd-network: do not warn when log_dhcp_client() or friends with NULL 2021-10-26 08:09:40 +09:00
Luca Boccassi
2f13844e73 docs/COREDUMP_PACKAGE_METADATA: add architecture field 2021-10-25 23:09:43 +01:00
Lennart Poettering
0dbce03c37 tree-wide: explicitly unpoison getdents64() memory
Apparently memory sanitizer doesn't grok getdents64() properly. Let's
address that by explicitly marken memory initialized by getdents64() as
unpoisoned.
2021-10-25 21:51:37 +02:00
Lennart Poettering
bfc569b060 test: add test for dir_is_empty_at() 2021-10-25 21:51:37 +02:00
Lennart Poettering
d96f21eec2 stat-util: make sure dir_is_empty_at() does something useful in all cases 2021-10-25 21:51:37 +02:00
Lennart Poettering
a068aceafb stat-util: optimize dir_is_empty_at() a bit, by using getdents64()
That way we have a single syscall only for it, instead of the multiple
readdir() and friends do. And we can operate entirely on the stack, no
malloc() implicit.
2021-10-25 21:51:37 +02:00
Lennart Poettering
a4e70ef7ba dirent-util: add FOREACH macro for iterating through getdents64() buffers
We already have a similar loop twice, let's make it easier to read via
an iteration macro.

(The new macro is a bit more careful even, as it verifies the full
dirent fits into the remaining buffer when returning it)
2021-10-25 21:51:37 +02:00
Lennart Poettering
ca664db258 dirent-util: move getdents64() related definitions to common header
We want to reuse getdents64() wherever necessary, let's hence move
definitions useful for that into public code.
2021-10-25 21:50:20 +02:00
Lennart Poettering
b9d0652263 stat-util: specify O_DIRECTORY when reopening dir in dir_is_empty_at()
That way we can fail earlier if the specified fd is not actually a
directory.

(Also, it's not exactly according to standards to open things without
either O_RDONLY/O_RDWR...)
2021-10-25 21:39:05 +02:00
Yu Watanabe
6681eb021a udev: do not try to rename interface if it is already up
See dev_change_name() in kernel's net/core/dev.c.

Fixes #21105.
2021-10-25 20:18:53 +01:00
Yu Watanabe
756f1f5fd0 network: rename function 2021-10-26 02:27:26 +09:00
Yu Watanabe
df8bf72631 network: dhcp6: rename variables 2021-10-26 00:35:22 +09:00
Yu Watanabe
78e50edfd4 network: dhcp6pd: move logic of acquiring subnet prefix into dhcp6_pd_assign_prefix()
Preparation for later commits.
2021-10-26 00:35:22 +09:00
Yu Watanabe
56bbe0ef02 network: dhcp6pd: introduce a simplified and unified method to calculate subnet prefix 2021-10-26 00:35:22 +09:00
Yu Watanabe
f595b2e9b4
Merge pull request #21116 from poettering/test-cleaner
make tests a bit cleaner in regards to oomd handling
2021-10-25 23:16:14 +09:00
Yu Watanabe
1dfdf96716
Merge pull request #21117 from mrc0mmand/last-coverage-related-tweaks
Last batch of coverage-related tweaks
2021-10-25 23:15:47 +09:00
Yu Watanabe
f8aa82e43f
Merge pull request #21077 from poettering/mount-setattr
optimize remounting with mount_setattr() syscall
2021-10-25 23:15:10 +09:00
Yu Watanabe
2db32618fe nspawn: fix build when SECCOMP is disabled
Follow-up for 20e458ae3c.
2021-10-25 19:23:55 +09:00
Frantisek Sumsal
35382a9da3 test: merge coverage reports from previous test runs
Relevant mainly for tests which utilize both QEMU and nspawn.
2021-10-25 11:35:47 +02:00
Frantisek Sumsal
e70103e2d4 test: tweak TriggerLimitIntervalSec= when built with coverage
Collecting coverage causes a significant slowdown in general, but since
this test requires certain timing, we need to tweak the defaults to make
it reliably pass.
2021-10-25 11:02:22 +02:00
Lennart Poettering
1d1ba68816 varlink: don't try to talk to oomd from unit tests
Talking to external daemons we ourselves maintain is a job for the
integration tests, not the unit tests. This communication is likely to
fail hence don#t even bother.

This makes our tests a bit cleaner.
2021-10-25 10:45:22 +02:00
Lennart Poettering
fc594dee98 cgroup: handle gracefully if we can't read oom_kill cgroup attribute 2021-10-25 10:45:22 +02:00
Lennart Poettering
0289948eb4 mount-util: move opening of /proc/self/mountinfo into bind_remount_one_with_mountinfo()
Let's move things around a bit, and open /proc/self/mountinfo if needed
inside of bind_remount_one_with_mountinfo(). That way bind_remount_one()
can become a superthin inline wrapper around
bind_remount_one_with_mountinfo(). Main benefit is that we don't even
have to open /p/s/mi in case mount_setattr() actually worked for us.
2021-10-25 10:41:26 +02:00
Lennart Poettering
874052c501 mount-util: port over bind_remount_recursive_with_mountinfo() to mount_setattr() 2021-10-25 10:41:26 +02:00
Lennart Poettering
4f5644dba6 mount-util: use modern mount_setattr() syscall for bind_remount_one_with_mountinfo()
New kernels have a nice syscall for changing bind mount flags. Let's use
it. This makes the complex libmount based iteration logic unnecessary.
2021-10-25 10:41:26 +02:00
Luca Boccassi
6dbfbc4667 TODO: add note about chase_symlink flag 2021-10-24 17:00:49 +01:00
Yu Watanabe
8e4de611eb
Merge pull request #21108 from mrc0mmand/here-comes-the-coverage
A couple more coverage-related tweaks
2021-10-24 22:54:23 +09:00
Frantisek Sumsal
d2a39812fd test: rename the global service override file for coverage runs
Otherwise we break TEST-15-DROPIN, since it uses
/usr/lib/systemd/system/service.d/override.conf in some of its
sub-tests.
2021-10-23 22:10:24 +02:00
Frantisek Sumsal
8d5b38e568 README: fix CentOS CI badge 2021-10-23 21:46:53 +02:00