Commit Graph
75293 Commits
Author SHA1 Message Date
James Coglan 6e85e24376 resolved: tests for dns_packet_is_reply_for() 2024-07-22 10:20:58 +01:00
James Coglan e7e2f01d7b resolved: tests for dns_packet_validate_{query,reply}() 2024-07-22 10:18:59 +01:00
James Coglan 59e987a0b7 resolved: tests for dns_packet_has_nsid_request() 2024-07-22 10:17:36 +01:00
James Coglan d6c13c6817 resolved: tests for dns_packet_ede_rcode() 2024-07-22 10:16:59 +01:00
James Coglan 9728540e61 resolved: tests for dns_ede_rcode_is_dnssec() 2024-07-22 10:15:22 +01:00
James Coglan eedf263bd0 resolved: tests for dns_packet_equal() 2024-07-22 10:15:15 +01:00
James Coglan e067858bb1 resolved: tests for dns_packet_extract(); parsing LOC records 2024-07-22 10:14:09 +01:00
James Coglan 2dd00dba25 resolved: tests for dns_packet_extract(); parsing TXT records 2024-07-22 10:13:03 +01:00
Mauri de Souza Meneguzzo a408d44531 shared: log error when execve fail
If there is an error with the execv call in fork_agent the
program exits without any meaningful log message. Log the
command and errno so the user gets more information about
the failure.

Fixes: #33418

Signed-off-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
2024-07-22 10:12:35 +01:00
James Coglan 6cf9767e1c resolved: tests for dns_packet_extract(); parsing OPT records
These tests identify a couple of problems with OPT pseudo-RR parsing.

First, any TTL value with the high bit set is replaced with zero before
checking the record type. For most types this is correct, since TTLs
have the range of signed int32. But for OPT records where the TTL is
repurposed to hold the extended RCODE, EDNS version and flags, it means
that the high bit cannot be used in extended RCODEs. Any RCODE with the
high bit set will be read as zero.

Second, the DNS_PACKET_RCODE() function bit-shifts the extended RCODE by
24 places instead of 20, so that it ends up forming the lower 8 bits of
a 12-bit RCODE, instead of the upper 8 bits as intended.

We intend to fix these issues in other pull requests.
2024-07-22 10:11:51 +01:00
James Coglan 99fe3607ca resolved: tests for dns_packet_extract(); parsing NAPTR records 2024-07-22 10:09:23 +01:00
James Coglan b0a0743b71 resolved: tests for dns_packet_extract(); parsing HINFO records 2024-07-22 10:08:35 +01:00
James Coglan 5e663903f3 resolved: tests for dns_packet_extract(); parsing SVCB and HTTPS records 2024-07-22 10:07:03 +01:00
Luca Boccassi e261f27ef0 Merge pull request #33432 from gregorHerburger/add_IFLA_BR_FDB_MAX_LEARNED_support
network: bridge: add support for  IFLA_BR_FDB_MAX_LEARNED
2024-07-22 10:06:16 +01:00
James Coglan c0ae07ec2b resolved: tests for dns_packet_extract(); parsing RRSIG records 2024-07-22 10:03:32 +01:00
James Coglan 02ea4cb919 resolved: tests for dns_packet_extract(); parsing SRV records 2024-07-22 10:02:46 +01:00
James Coglan 887bc36231 resolved: tests for dns_packet_extract(); handling ANY class/type in answers 2024-07-22 10:01:35 +01:00
James Coglan 3d0df33fc2 resolved: tests for dns_packet_extract(); parsing SOA records 2024-07-22 10:01:02 +01:00
James Coglan 8a5e122d95 resolved: tests for dns_packet_extract(); parsing NS records 2024-07-22 09:59:20 +01:00
James Coglan 0afc219da8 resolved: tests for dns_packet_extract(); parsing A records 2024-07-22 09:57:39 +01:00
James Coglan 326ba6a5b0 resolved: tests for dns_packet_extract(); check handling of self-referential compression pointers 2024-07-22 09:53:17 +01:00
James Coglan f97d7a6969 resolved: tests for dns_packet_extract(); checking for malformed queries 2024-07-22 09:52:16 +01:00
James Coglan 48b0b8f0cd resolved: tests for dns_packet_extract(); A and CNAME answers with domain compression 2024-07-22 09:49:01 +01:00
James Coglan e50e5cffde resolved: tests for dns_packet_extract(); parsing of queries 2024-07-22 09:47:47 +01:00
James Coglan b8112c9d68 resolved: tests for parsing DNS packet headers 2024-07-22 09:46:27 +01:00
Daan De Meyer 4ecd6c3552 mkosi: update arch commit reference
* 1d577a6268 refresh the keys
* 12383ba712 make libarchive a regular optional dependency...
* f51d5e04bf ignore rc releases in nvchecker
* 0b096a2baa add nvchecker
* 5f0ced863c upgpkg: 256.2-1: new upstream release
2024-07-22 10:28:57 +02:00
Daan De Meyer 1d8f16df90 mkosi: update fedora commit reference
* 00babccdea Simplify BFQ scheduler enablement
* ef8ddb130b Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* 5b4a5461d6 Fix changelog
* a8c5c736f6 Only apply shorter shutdown timer changes on Fedora
*   f4e284cd7a Merge #150 `Deal with systemd-timesyncd backport in EPEL`
|\
| * 9378a0733a Deal with systemd-timesyncd backport in EPEL
* | 12d1f05029 Don't claim /sbin/installkernel if building for CentOS Stream 9
|/
* 79828f2753 spec: use "positive" conditions in conditionals
* c5d3af1638 Add build dependency on rsync on CentOS Stream 9
* 8d080fb5cb Backport udma buffer access patch
* 6084453807 Add support for building from a specific branch
* cb9d631ca0 Update PR patch metadata
* 3889da947e In standalone subpackages, suggest coreutils-single
* b7800e3e66 Drop versions from Conflicts for standalone packages
2024-07-22 10:28:50 +02:00
Gregor Herburger 1aa74ad048 test: systemd-networkd-tests: add fdb learned tests
Add a test for the new bridge netlink attributes IFLA_BR_FDB_N_LEARNED and
IFLA_BR_FDB_MAX_LEARNED.

Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
2024-07-22 10:27:56 +02:00
Gregor Herburger 5a3e759bd0 networkctl: add support to display learned fdb entries
Since Linux commit ddd1ad68826d ("net: bridge: Add netlink knobs for number
/ max learned FDB entries") [1] it is possible to limit to number of
dynamically learned fdb entries per bridge.

Add support to the systemd networkctl for the netlink bridge attributes
IFLA_BR_FDB_MAX_LEARNED and IFLA_BR_FDB_N_LEARNED.

[1] https://lore.kernel.org/all/20231016-fdb_limit-v5-0-32cddff87758@avm.de/

Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
2024-07-22 10:27:56 +02:00
Gregor Herburger f379f36b11 network: bridge: add support for IFLA_BR_FDB_MAX_LEARNED
Since Linux commit ddd1ad68826d ("net: bridge: Add netlink knobs for number
/ max learned FDB entries") [1] it is possible to limit to number of
dynamically learned fdb entries per bridge.

Add support to the systemd netdev bridge for the new netlink attribute
IFLA_BR_FDB_MAX_LEARNED.

[1] https://lore.kernel.org/all/20231016-fdb_limit-v5-0-32cddff87758@avm.de/

Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
2024-07-22 10:27:56 +02:00
Daan De Meyer ebbae3d632 mkosi: Use the Fedora Rawhide spec for CentOS
These are now practically identical, with the only differences between
the two having no effect on the rpm builds we do with mkosi, so let's
cut out the middle man and just use the Fedora Rawhide spec for CentOS
as well.
2024-07-22 10:25:46 +02:00
Daan De Meyer 762b23e86a mkosi: Switch back to PKG_SUBDIR instead of symlinks
Previously I thought it would make sense to allow running the build
scripts from within the VM/container to rebuild the packages. Instead
we ended up making it possible to rerun mkosi outside of the container/VM
to rebuild the packages, so let's switch back to $PKG_SUBDIR to tell the
build scripts where to look for the packaging sources.
2024-07-22 10:22:48 +02:00
Mike Yuan 19eccb7667 core: pin notify sender through pidfd (potentially SCM_PIDFD) 2024-07-22 09:38:48 +02:00
Mike Yuan 31d76a1702 missing_socket: add SCM_PASSPIDFD and SCM_PIDFD
Preparation for later commits.
2024-07-21 22:50:58 +02:00
Mike Yuan d3d0e36156 core/service: use switch in service_notify_message_authorized() 2024-07-21 22:48:54 +02:00
Mike Yuan 7d6e1293b2 core/manager: minor refactor for manager_dispatch_notify_fd() 2024-07-21 22:48:54 +02:00
Mike Yuan 678f271cff core/manager: modernize manager_setup_notify() a bit 2024-07-21 22:48:53 +02:00
Mike Yuan 8dc303d3c8 process-util: modernize pidfd_get_pid() 2024-07-21 22:48:53 +02:00
Mike Yuan 77f709ca84 pidref: move comments that doesn't belong in pidref_copy() to pidref_dup()
Follow-up for 232e66217d
2024-07-21 22:48:53 +02:00
Mike Yuan 93df5cf8d9 core/dbus: use Manager.prefix where appropriate 2024-07-21 22:48:53 +02:00
Mike Yuan 71f2ba82cf core/dbus: make two functions return void 2024-07-21 22:48:52 +02:00
Mike Yuan 777f69006b core/device: prefix DEVICE_FOUND_MASK with '_'
In accordance to our usual style for special enum values.
2024-07-21 22:48:52 +02:00
Mike Yuan 32020b4788 core/device: minor refactors 2024-07-21 22:48:14 +02:00
Mike Yuan 52ffb3c95f Merge pull request #32612 from YHNdnzj/creds-test
core/service: imply Type=exec if credentials are used
2024-07-21 22:27:42 +02:00
Mike Yuan 757e469d26 core/service: imply Type=exec if credentials are used
When credentials are used with Type=simple + ExecStartPost=,
i.e. when multiple sd-executor instances are running in parallel
for a single service, the state of final credential dir
might be unexpected wrt path_is_mount_point() and other
steps. So, let's imply Type=exec if not explicitly specified,
and emit a warning otherwise.
2024-07-21 19:10:58 +01:00
Mike Yuan 60b218e36e test-execute: ExecStop= and friends should not get credentials
See #32583
2024-07-21 19:10:58 +01:00
Kamil Szczęk 88cf0906aa cryptsetup: handle parallel activation of volumes with another tool gracefully
This commit makes systemd-cryptsetup exit with a successful status when
the volume gets unlocked outside of the current systemd-cryptsetup
process while it was executing. This can be easily reproduced by calling
systemd-cryptsetup, and while it waits for user to input a password/PIN,
unlock the volume in a second terminal. Then after entering the password
systemd-cryptsetup will exit with a non-zero status code.
2024-07-21 19:02:59 +01:00
Luca Boccassi eab98338f8 Merge pull request #33443 from YHNdnzj/oneshot-destroy-cred
core/service: destroy runtime data when Type=oneshot services exit
2024-07-21 18:44:25 +01:00
Etienne Champetier 0a4ecc54cb udev-builtin-net_id: use firmware_node/sun for ID_NET_NAME_SLOT
pci_get_hotplug_slot() has the following limitations:
- if slots are not hotpluggable, they are not in /sys/bus/pci/slots.
- the address at /sys/bus/pci/slots/X/addr doesn't contains the function part,
  so on some system, 2 different slots with different _SUN end up with the same
  hotplug_slot, leading to naming conflicts.
- it tries all parent devices until it finds a slot number, which is incorrect,
  and what led to NAMING_BRIDGE_MULTIFUNCTION_SLOT being disabled.

The use of PCI hotplug to find the slot (ACPI _SUN) was introduced in
https://github.com/systemd/systemd/commit/0035597a30d120f70df2dd7da3d6128fb8ba6051
"udev: net_id - export PCI hotplug slot names" on 2012/11/26.
At the same time on the kernel side we got
https://github.com/torvalds/linux/commit/bb74ac23b10820d8722c3e1f4add9ef59e703f63
"ACPI: create _SUN sysfs file" on 2012/11/16.

Using PCI hotplug was the only way at the time, but now 12 years later we can use
firmware_node/sun sysfs file.
Looking at a small selection of server HW, for HPE (Gen10 DL325), the _SUN is attached
to the NIC device, whereas for Dell (R640/R6515/R6615) and Cisco (UCSC-C220-M5SX),
the _SUN is on the first parent pcieport.

We still fallback to pci_get_hotplug_slot() to handle the s390 case and
maybe some other coner cases (_SUN on grand parent device that is not a
bridge ?).
2024-07-21 18:36:37 +01:00
Luca Boccassi 7b5c38a91d test: override blocking localed policy in TEST-73-LOCALE
On Debian and derivatives writing calls to localed are blocked as other
tools are used to change settings, override that policy for the tests
2024-07-21 16:30:57 +01:00