Lennart Poettering
73fc0cbc87
fd-util: export get_max_fd() so that we can use it in tests
2021-10-27 17:56:36 +02:00
Lennart Poettering
ab27b2fe56
exec-util: use close_all_fds_without_malloc() from freeze()
2021-10-27 17:56:36 +02:00
Lennart Poettering
5cfa0798ba
fd-util: split out close_all_fds() special case handling and call it from close_all_fds_without_malloc(), too
...
The optimization is useful there too.
2021-10-27 17:56:36 +02:00
Lennart Poettering
1f6639eac7
fd-util: close_all() check d_type
...
Tiny optimization: check dirent's d_type before trying to parse
/proc/self/fd/ filenames, given we have that anyway.
2021-10-27 17:56:36 +02:00
Lennart Poettering
c844f0a924
fd-util: always return 0 on success in close_all_fds()
...
We never make use of the return value, and in case of close_range() we
don't even know how many fds got closed, hence don't pretend we knew.
2021-10-27 17:56:36 +02:00
Lennart Poettering
f498720a34
fd-util: special case invocation of close_all_fds() with single exception fd
...
Add special case optimization for a single exception fd. It's a
pretty common case in our codebase, and the optimization is simple
and means we don't need to copy/sort the exception array, so do it.
2021-10-27 17:56:36 +02:00
Lennart Poettering
11966552a8
fd-util: split out inner fallback loop of close_all_fds() as close_all_fds_without_malloc()
2021-10-27 17:56:36 +02:00
Lennart Poettering
c85cb3bc7f
Revert "basic/fd-util: sort the 'except' array in place"
...
This reverts commit 9c46228b7d .
2021-10-27 17:56:36 +02:00
Lennart Poettering
e7e7c07c50
Revert "Add variant of close_all_fds() that does not allocate and use it in freeze()"
...
This reverts commit cbcf371abc .
2021-10-27 17:56:36 +02:00
Yu Watanabe
eef5ebec97
Merge pull request #21143 from yuwata/sd-radv-router-lifetime
...
sd-radv: several cleanups for router lifetime
2021-10-27 22:14:35 +09:00
Lennart Poettering
6663b509d8
bootctl: refuse parsing unknown special '@' entry ids
...
Let's make sure '@' is never written as entry ID into any EFI variable,
as we want the ability to add new ids like this later on, with them
resulting in a clear error on older implementations.
2021-10-27 22:12:07 +09:00
Zbigniew Jędrzejewski-Szmek
3c15860e9e
Merge pull request #21147 from DaanDeMeyer/hacking-docs
...
docs: Clean up HACKING.md
2021-10-27 14:09:46 +02:00
Daan De Meyer
b2c9da052a
docs: Specify code block language for mkosi boot instructions
2021-10-27 12:27:16 +01:00
Daan De Meyer
4c71f971c1
docs: Make mkosi install instructions generic
2021-10-27 12:27:16 +01:00
Daan De Meyer
b43ed972e0
docs: Extend builddep instructions to include more distros
2021-10-27 12:27:14 +01:00
Yu Watanabe
1ad83d9500
Merge pull request #21144 from yuwata/sd-radv-trivial-cleanups
...
sd-radv: trivial cleanups
2021-10-27 19:52:57 +09:00
Yu Watanabe
8524db5021
conf-parse: make config_parse_many() optionally save 'struct stat' for each file
...
Fixes #21113 .
2021-10-27 19:49:55 +09:00
Luca Boccassi
f3f1172cf6
docs/COREDUMP_PACKAGE_METADATA: ELF section should be allocated and 0-padded
2021-10-27 12:29:31 +02:00
Yu Watanabe
4f1ac4a38d
network: radv: refuse invalid router lifetime in conf parser
2021-10-27 19:29:05 +09:00
Yu Watanabe
804775577d
sd-radv: update how to calculate interval of sending advertisements
2021-10-27 19:27:23 +09:00
Yu Watanabe
0945767012
sd-radv: router lifetime must be 0 or between 4 seconds and 9000 seconds
...
See RFC 4861 section 6.2.1.
2021-10-27 19:27:07 +09:00
Daan De Meyer
390a307665
docs: Remove mkosi symlink instruction from HACKING
...
mkosi automatically builds for the host distro which seems a much
better default to encourage since dnf won't be installed on any host
system that's not Fedora anyway.
2021-10-27 11:10:52 +01:00
Daan De Meyer
ff7c07fb08
docs: Simplify git instructions in HACKING slightly
2021-10-27 11:10:52 +01:00
Daan De Meyer
540804827a
docs: Clean up links in HACKING.md
2021-10-27 11:10:50 +01:00
Yu Watanabe
72db0a714b
sd-radv: introduce RADV_DEFAULT_ROUTER_LIFETIME_USEC
2021-10-27 19:05:55 +09:00
Yu Watanabe
e786c2e50f
sd-radv: add several notes about constants
2021-10-27 19:03:58 +09:00
Yu Watanabe
03ec10fdf4
sd-radv: make several constants not exposed
2021-10-27 19:03:35 +09:00
Yu Watanabe
d6fc0d674f
sd-radv: drop SD_ prefix for unexposed constants
2021-10-27 19:03:31 +09:00
Lennart Poettering
3f9335e8e3
Merge pull request #21130 from systemd/wip/hadess/webcams
...
Tag IR cameras and allow media* access
2021-10-27 12:03:30 +02:00
Yu Watanabe
68cbac5bd4
sd-radv: use IPv6 specific functions
2021-10-27 16:41:04 +09:00
Yu Watanabe
acbb5500e2
sd-radv: use assert_return()
2021-10-27 16:41:04 +09:00
Yu Watanabe
7003b11487
sd-radv: make sd_radv_set_router_lifetime() take usec_t (uint64_t)
2021-10-27 16:13:09 +09:00
Greg Zuro
cfee6b9551
change indicator used for later versions of VirtualBox ( #21127 )
...
Detection of VirtualBox is accomplished in the existing code by *either* `innotek GmbH`
or `Oracle Corporation` existing in any of:
- /sys/class/dmi/id/product_name
- /sys/class/dmi/id/sys_vendor
- /sys/class/dmi/id/board_vendor
- /sys/class/dmi/id/bios_vendor
With Oracle's physical servers, both `/sys/class/dmi/id/sys_vendor` and
`/sys/class/dmi/id/board_vendor` contain `Oracle Corporation`, so those
servers are detected as `oracle` (VirtualBox).
VirtualBox has the following values in the latest versions:
- /sys/class/dmi/id/product_name: `VirtualBox`
- /sys/class/dmi/id/sys_vendor: `innotek GmbH`
- /sys/class/dmi/id/board_vendor: `Oracle Corporation`
- /sys/class/dmi/id/bios_vendor: `innotek GmbH`
Presumably the existing check for `innotek GmbH` is meant to detect
older versions of VirtualBox, while changing the second checked value
from `Oracle Corporation` to `VirtualBox` will reliably detect later and future
versions.
2021-10-27 13:02:37 +09:00
Yu Watanabe
b81070ff13
Merge pull request #21129 from yuwata/network-dhcp6-pd-vs-ndisc
...
network: several follow-ups for DHCPv6-PD
2021-10-27 12:15:18 +09:00
Bastien Nocera
e78e11d8c5
hwdb: Tag IR cameras as such
...
So that front-ends can ignore them if they wish to.
See https://gitlab.gnome.org/GNOME/cheese/-/merge_requests/4
2021-10-27 00:14:41 +02:00
Lennart Poettering
8f1daefce6
json: do something remotely reasonable when we see NaN/infinity
...
JSON doesn't have NaN/infinity/-infinity concepts in the spec.
Implementations vary what they do with it. JSON5 + Python simply
generate special words "NAN" and "Inifinity" from it. Others generate
"null" for it.
At this point we never actually want to output this, so let's be
conservative and generate RFC compliant JSON, i.e. convert to null.
One day should JSON5 actually become a thing we can revisit this, but in
that case we should implement things via a flag, and only optinally
process nan/infinity/-infinity.
This patch is extremely simple: whenever accepting a
nan/infinity/-infinity from outside it converts it to NULL. I.e. we
convert on input, not output.
2021-10-26 22:26:27 +02:00
Frantisek Sumsal
cd37793d28
test: add a missing udevadm settle to the multipath test case
...
8a088877ab uncovered a missing `udevadm
settle` in the multipath test case, causing the test to occasionally
fail with:
```
[ 41.718617] testsuite-64.sh[806]: + for i in {0..63}
[ 41.727917] systemd-udevd[1120]: sdhf: /usr/lib/udev/rules.d/60-persistent-storage.rules:66 Importing properties from results of 'scsi_id --export --whitelisted -d /dev/sdhf'
[ 41.728668] testsuite-64.sh[2341]: ++ printf %.4d 1
[ 41.733851] systemd-udevd[1415]: sdhc: Adding watch on '/dev/sdhc'
[ 41.734477] testsuite-64.sh[806]: + wwid=deaddeadbeef0001
[ 41.734477] testsuite-64.sh[806]: + path=/dev/disk/by-id/wwn-0xdeaddeadbeef0001
[ 41.746174] systemd-udevd[1409]: sdhb: 'scsi_id --export --whitelisted -d /dev/sdhb'(out) 'ID_MODEL_ENC=QEMU\x20HARDDISK\x20\x20\x20'
[ 41.747058] testsuite-64.sh[2342]: ++ readlink -f /dev/disk/by-id/wwn-0xdeaddeadbeef0001
[ 41.755512] testsuite-64.sh[806]: + dmpath=/dev/sdi
[ 41.755512] testsuite-64.sh[806]: + lsblk /dev/disk/by-id/wwn-0xdeaddeadbeef0001
[ 41.766884] systemd-udevd[1402]: sdhd: 'scsi_id --export --whitelisted -d /dev/sdhd'(out) 'ID_VENDOR=QEMU'
[ 41.767532] testsuite-64.sh[2343]: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
[ 41.767532] testsuite-64.sh[2343]: sdi 8:128 0 512B 0 disk
[ 41.779219] systemd-udevd[1400]: dm-33: 'kpartx_id 254 33 mpath-3deaddeadbeef0051'(out) 'DM_WWN=0xdeaddeadbeef0051'
[ 41.779902] testsuite-64.sh[806]: + multipath -C /dev/sdi
[ 41.785296] systemd-udevd[1414]: dm-31: Device processed (SEQNUM=4839, ACTION=change)
[ 41.785925] testsuite-64.sh[2344]: 37.658168 | /dev/sdi is not a dm device
```
2021-10-27 02:23:55 +09:00
Yu Watanabe
149cda85bf
man: adjust the explanations related to the DHCPv6 client starting mode
2021-10-27 00:33:44 +09:00
Yu Watanabe
0e45721e3d
network: dhcp6: make UplinkInterface=:self imply WithoutRA=solicit
2021-10-27 00:33:44 +09:00
Yu Watanabe
fac19a21cf
network: do not restart DHCPv6 client when WithoutRA= is set
...
Previously, even if WithoutRA= is specified, the DHCPv6 client may be
restarted in undesired mode when a RA is received.
2021-10-27 00:33:44 +09:00
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