Yu Watanabe
a46abf2e34
fuzz-dhcp-server: add static leases
2022-02-01 11:56:22 +09:00
Yu Watanabe
6796c5a9c4
test-dhcp-server: add tests for static lease
2022-02-01 11:56:22 +09:00
Yu Watanabe
7b5445e74e
test-dhcp-server: add tests for setting static DHCP lease
2022-02-01 11:56:22 +09:00
Yu Watanabe
99e65b7df3
test-dhcp-server: add usual headers
2022-02-01 11:56:22 +09:00
Yu Watanabe
4f3cb2465a
test-dhcp-server: run a test earlier which does not require privilege
2022-02-01 11:56:22 +09:00
Yu Watanabe
4e2319afe4
test-dhcp-server: move sd-event allocation
2022-02-01 11:56:22 +09:00
Yu Watanabe
7e0a8bf1ce
test-dhcp-server: use log_tests_skipped_errno()
2022-02-01 11:56:22 +09:00
Yu Watanabe
8b572f7ab2
sd-dhcp-server: split out logic to ACK request
2022-02-01 11:56:22 +09:00
Yu Watanabe
bd1a3eb65b
sd-dhcp-server: do not assign address reserved for static leases to non-matching clients
...
This fix the root cause of the issue #22253 .
2022-02-01 11:56:22 +09:00
Yu Watanabe
7e98fe05a0
sd-dhcp-server: explicitly refuse when conflicting address is requested
2022-02-01 11:56:22 +09:00
Yu Watanabe
e2ba408084
sd-dhcp-server: do not assign an address from pool when a static lease for the client ID exists
2022-02-01 11:56:22 +09:00
Yu Watanabe
5cc8be890d
sd-dhcp-server: rename get_pool_offset() -> address_is_in_pool()
...
As, the value of pool_offset is not used.
2022-02-01 11:56:22 +09:00
Yu Watanabe
eb5bff9c9d
sd-dhcp-server: rename server_send_nak() -> server_send_nak_or_ignore()
...
And logs error in the function.
2022-02-01 11:56:01 +09:00
Yu Watanabe
8a7d048d1d
sd-dhcp-server: set DHCPLease::server before hashmap_put()
...
Otherwise, if the second push is failed, then the first hashmap contains
dirty entry.
Also, this makes hashmap_remove_value() used when removing leases to
make not wrong lease is removed from the hashmap.
Note, this just hide the root cause of the issue #22253 , which will be
fixed in later commit.
Fixes #22253 .
2022-02-01 11:45:51 +09:00
Yu Watanabe
37e219800f
sd-dhcp-server: fix indentation
2022-02-01 11:45:51 +09:00
Yu Watanabe
48be485b71
sd-dhcp-server: rename argument and add one missing assertion
2022-02-01 11:45:51 +09:00
Yu Watanabe
6277e48fa9
sd-dhcp-server: do not use implicit cast to boolean from integer
2022-02-01 11:45:51 +09:00
Yu Watanabe
a2a801926d
sd-dhcp-server: refuse zero length client ID
2022-02-01 11:45:51 +09:00
Yu Watanabe
0a195d4186
sd-dhcp-server: do not log "STOPPED" when already stopped
2022-02-01 11:45:51 +09:00
Luca Boccassi
9d67fb0e33
Merge pull request #22175 from keszybz/kernel-install-mkosi-initrd
...
kernel-install: add support for KERNEL_INSTALL_INITRD_GENERATOR and KERNEL_INSTALL_STAGING_AREA
2022-01-31 23:09:46 +00:00
Frantisek Sumsal
e3d1ffcc48
network: s/confiured/configured/
...
A quick typo fix I noticed whilst debugging.
2022-01-31 23:07:41 +00:00
Lennart Poettering
69339ae9f7
tree-wide: some additional checks to avoid CVE-2021-4034 style weaknesses
2022-01-31 23:07:19 +00:00
Lennart Poettering
e5b90b30c2
random-seed: add missing %m in error message
2022-01-31 21:07:13 +00:00
Frantisek Sumsal
caeaca1b8f
Merge pull request #22323 from mrc0mmand/fix-TEST-69-on-C8S
...
test: use ~/.bashrc instead of /etc/bash.bashrc
2022-01-31 19:04:02 +00:00
Lennart Poettering
594f64f466
update TODO
2022-01-31 18:14:34 +01:00
Frantisek Sumsal
6f73ef8b30
test: copy portable profiles into the image if they don't exist there
...
If we're built with `-Dportable=false`, the portable profiles won't get
installed into the image. Since we need only the profile files and
nothing else, let's copy them into the image explicitly in such case.
2022-01-31 17:09:30 +00:00
Frantisek Sumsal
1f450a680f
test: use ~/.bashrc instead of /etc/bash.bashrc
...
/etc/bash.bashrc appears to be Debian-specific[0] (or specific to bash
versions compiled with -DSYS_BASHRC), which doesn't seem to be the case
for C8S. Let's use ~/.bashrc instead to make the CIs happy again.
[0] https://sources.debian.org/src/bash/5.1-6/debian/README/#L50-L56
2022-01-31 17:47:01 +01:00
Frantisek Sumsal
db357e9a89
test: make the code less error-prone
2022-01-31 16:49:09 +01:00
Luca Boccassi
187df3dd91
Merge pull request #22316 from yuwata/network-mac-address-length
...
network: several cleanups related to MAC address length
2022-01-31 14:21:28 +00:00
Luca Boccassi
0ec3af43f2
Merge pull request #22300 from yuwata/bus-fix-error-handling
...
tree-wide: fix bus method error handling
2022-01-31 14:03:00 +00:00
Daan De Meyer
17e2e8073f
boot: Don't require a machine ID to be available
...
Regression introduced in https://github.com/systemd/systemd/pull/21807 .
Fixes #22224
2022-01-31 13:58:06 +00:00
Luca Boccassi
06d4d83fa7
Merge pull request #22274 from yuwata/resolve-comment
...
resolve: cleanups for on_stream_io()
2022-01-31 13:56:04 +00:00
Luca Boccassi
9d6d4c305a
core: don't fail on EEXIST when creating mount point
...
systemd[1016]: Failed to mount /tmp/app1 (type n/a) on /run/systemd/unit-extensions/1 (MS_BIND ): No such file or directory
systemd[1016]: Failed to create destination mount point node '/run/systemd/unit-extensions/1': File exists
2022-01-31 13:53:47 +01:00
Frantisek Sumsal
61b9769bda
core: check argc/argv uncoditionally
...
as `assert()` might be dropped with `-DNDEBUG`.
Follow-up to cf3095a and 1637e75 .
2022-01-31 20:00:40 +09:00
Yu Watanabe
256ce2e889
Merge pull request #21838 from lnussel/logind-refactor
...
Logind shutdown refactor
2022-01-31 19:45:33 +09:00
James Hilliard
e3759ac43a
meson: use bpftool based strip when available
...
This should be useable in bpftool v5.13 or newer based on:
https://github.com/torvalds/linux/commit/d80b2fcbe0a023619e0fc73112f2a02c2662f6ab
2022-01-31 16:42:07 +09:00
James Hilliard
408832e603
meson: set minimum clang/llvm versions for bpf support
...
The minimum clang/llvm-strip version needed for building libbpf based
programs is 10.0.0, this is documented here:
https://github.com/libbpf/libbpf/tree/v0.6.1#bpf-co-re-compile-once--run-everywhere
Using an older version such as 9.0.0 will generate objects that
bpftool will not be able to generate skeletons for.
2022-01-31 14:27:11 +09:00
Yu Watanabe
c565b65553
network: currently IPv4ACD requires MAC address whose length is ETH_ALEN
2022-01-31 13:10:28 +09:00
Yu Watanabe
218a850268
network: currently RADV requires MAC address whose length is ETH_ALEN
2022-01-31 13:10:28 +09:00
Yu Watanabe
f4ef1c196c
network: disable NDisc for CAN interfaces
...
We already disabled DHCP clients for CAN interfaces.
2022-01-31 13:10:28 +09:00
Yu Watanabe
ba4c7184b3
network: configure NDisc after MAC address is assigned
2022-01-31 13:10:28 +09:00
Yu Watanabe
f42d41cc5f
network: configure DHCP clients after MAC address is assigned
...
Prompted by #20090 .
2022-01-31 13:10:28 +09:00
Frantisek Sumsal
bbe5371345
basic: update CIFS magic
...
Kernel commit dea2903719283c156b53741126228c4a1b40440f exposed (and
renamed) CIFS_MAGIC_NUMBER as CIFS_SUPER_MAGIC along with
SMB2_SUPER_MAGIC.
This fixes the following build fail on current Fedora Rawhide:
```
../src/basic/meson.build:389:8: ERROR: Problem encountered: found unknown filesystem(s) defined in kernel headers:
Filesystem found in kernel header but not in filesystems-gperf.gperf: CIFS_SUPER_MAGIC
Filesystem found in kernel header but not in filesystems-gperf.gperf: SMB2_SUPER_MAGIC
```
2022-01-31 11:50:15 +09:00
Dorian Clay
156d01b9ca
hwdb: add support for Surface Laptop 2 & 3 ( #22303 )
2022-01-31 04:50:09 +09:00
Davide Cavalca
7d75376e1f
hwdb: add new database file for PDA devices
...
Add a new database for handhelds (PDAs, calculators, etc.) that should be
accessible the seat owner.
The database is initially populated with Texas Instruments calculators
and linking cables, which removes the need to installing dedicated udev
rules for them.
2022-01-31 04:46:38 +09:00
Donald Chan
a718364e9d
basic: mac_[selinux,smack]_apply_fd does not work when applying labels
...
Commit a7fdc6c introduced a regression where file descriptors are opened
using O_PATH option. mac_smack_apply_fd() calls fsetxattr() and would fail
with a -EBADF (Bad file descriptor) error.
Use FORMAT_PROC_FD_PATH(fd) to convert the fd back into a full path and
call setxattr() or setfilecon() instead.
Signed-off-by: Donald Chan <hoiho@amazon.com >
2022-01-31 04:43:56 +09:00
Daan De Meyer
5b2d0f9efd
shared: Handle filesystems that don't support hole punching in COPY_HOLES
2022-01-31 04:43:23 +09:00
Yu Watanabe
34905ff7a9
Merge pull request #22294 from evverx/fuzz-dhcp-client
...
tests: fuzz client_handle_offer
2022-01-31 04:41:07 +09:00
Frantisek Sumsal
15391a2245
Merge pull request #22302 from evverx/merge-oss-fuzz-corpora
...
ci: merge seed corpora with public OSS-Fuzz corpora on CFLite
2022-01-30 18:35:28 +00:00
Yu Watanabe
cf3095ac2b
core: check if argc > 0 and argv[0] is set
...
Follow-up for 1637e75707 .
2022-01-30 13:07:51 +00:00