Commit graph

4488 commits

Author SHA1 Message Date
Luca Boccassi ad12e4be6d
Merge pull request #31044 from keszybz/uhttpd-alloca-print
Use macro wrapper instead of alloca in µhttp-utils
2024-01-22 22:03:08 +00:00
Matt Muggeridge d4c8de21a0 IPv6 RA: Support the Retrans Timer field (IPv6 Conformance Test: v6LC.2.1.5)
The RA's Retransmission Timer field was being ignored. This resolves the IPv6
Core Conformance test, v6LC.2.1.5 [1].

Retransmission Timer is a 32-bit unsigned integer. The time, in milliseconds,
between retransmitted Neighbor Solicitation messages. Used by the Address
Resolution and Neighbor Unreachability Detection (NUD) algorithm.

Support setting a default value for the neighbour retransmission timer value with:

    [Network]
    IPv6RetransmissionTimeSec=<int>

By default, upon receiving a Router Advertisement with the Retransmission Timer
field set to a non-zero value, it will update the kernel's retransmit timer value.
To disable this behaviour, configure the UseIPv6RetransmissionTime= under the
[IPv6AcceptRA] section.

    [IPv6AcceptRA]
    UseIPv6RetransmissionTime=<bool>

RFC4861: Neighbor Discovery in IPv6
  * Section 4.2 RA Message Format.
  * Section 6.3.4 Processing Received Router Advertisements

A Router Advertisement field (e.g., Cur Hop Limit, Reachable Time,
and Retrans Timer) may contain a value denoting that it is
unspecified. In such cases, the parameter should be ignored and the
host should continue using whatever value it is already using. In
particular, a host MUST NOT interpret the unspecified value as
meaning change back to the default value that was in use before the
first Router Advertisement was received.

The RetransTimer variable SHOULD be copied from the Retrans Timer
field, if the received value is non-zero.

References
[1] IPv6 Core Conformance Spec (PDF)
2024-01-23 03:18:01 +09:00
Adrian Vovk 720c618397 core: path: Re-enter waiting if target is deactivating
Previously, path units would remain in the running state while their
target unit is deactivating. This left a window of time where the target
unit is no longer operational (i.e. it is busy deactivating/cleaning
up/etc) but the path unit would continue to ignore inotify events. In
short: any inotify event that occurs while the target unit deactivates
would be completely lost.

With this commit, the path will go back into a waiting state when the
target unit starts deactivating. This means that any inotify event that
occurs while the target unit deactivates will queue a start job.
2024-01-21 10:34:45 +00:00
Lennart Poettering 9d2a292246 test: add integration test for Type=exec robustness
This tests for #30799, so that it does not return.
2024-01-19 16:51:55 +01:00
Yu Watanabe e8736fb6c9 test-13-NSPAWN: add more test case for passing network interfaces
- test interface renaming that conflicts with the current alternative
  network interface name,
- test passing wlan interfaces.
2024-01-19 19:06:19 +09:00
Nick Cao 4be1fc8443 network: Add L3MasterDevice= into routing policy 2024-01-19 00:17:50 +00:00
Luca Boccassi 0a9735eac2
Merge pull request #30661 from rpigott/resolved-https-record
resolved: support RFC 9460 SVCB and HTTPS records
2024-01-17 16:20:35 +00:00
Mike Yuan a37928d34c
TEST-35-LOGIN: test changes to list-sessions 2024-01-17 11:30:05 +08:00
Yu Watanabe 7155ad9532 test-network: test the default required operational state for CAN devices 2024-01-17 04:05:43 +09:00
Ronan Pigott a9766d07b8 test-resolve: add basic test for SVCB/HTTPS RRs 2024-01-16 11:26:37 -07:00
Yu Watanabe f9b5c27645 test-network: add test case for removal of nexthop that is a member of a group nexthop 2024-01-16 12:48:50 +09:00
Frantisek Sumsal fa8ff98ea4 test: cover a couple of error scenarios
To make sure we behave correctly even in error paths.
2024-01-15 18:04:31 +01:00
Yu Watanabe a663ddc04e test-network: add simple test case for DHCP relay on bridge interface
For issue #30763.
2024-01-15 10:53:07 +00:00
Yu Watanabe 6d1cea7bc6 test-network: try to flip interface state frequently 2024-01-15 15:46:33 +09:00
Luca Boccassi 0f6a6e2f2b test: create /run/sshd in TEST-74-AUX-UTILS
12264s [ 4819.948632] sshd[1365]: fatal: Missing privilege separation directory: /run/sshd
12264s [ 4819.952120] testsuite-74.sh[1362]: kex_exchange_identification: read: Connection reset by peer
12264s [ 4819.952120] testsuite-74.sh[1362]: Connection reset by /run/ssh-unix-local/socket port 0

https://autopkgtest.ubuntu.com/results/autopkgtest-jammy-upstream-systemd-ci-systemd-ci/jammy/amd64/s/systemd-upstream/20240113_093341_50fc7@/log.gz

We copy binaries manually so some setups are missing, create the directory
as needed
2024-01-15 10:28:05 +09:00
Yu Watanabe 4db8ccbb59 wireguard: verify routes configured in .netdev file
Then, scope and friends are correctly adjusted, and the behavior should
be matched when the same route is configured in .network file.
2024-01-13 10:10:32 +09:00
Nick Rosbrook fec0d508a2 test: skip TEST-43-PRIVATEUSER-UNPRIV if unprivileged userns is restricted
With newer versions of AppArmor, unprivileged user namespace creation
may be restricted by default, in which case user manager instances will
not be able to apply PrivateUsers=yes (or the settings which require it).

This can be tested with the kernel.apparmor_restrict_unprivileged_userns
sysctl.
2024-01-13 06:55:04 +09:00
Frantisek Sumsal a0b50e4d25 test: use systemd-id128 from the build dir
As distro sd-id128 might not have all the options we need.

Follow-up for: 378712c
Replaces: #30901
2024-01-12 14:34:04 +00:00
Yu Watanabe 967cd1712c
Merge pull request #30867 from dtardon/udev-conf-dropins
Allow dropins for udev.conf
2024-01-12 06:37:23 +09:00
Lennart Poettering 28795e4dca
Merge pull request #30777 from poettering/ssh-generator
ssh-generator which makes VMs and containers accessible to ssh via AF_UNIX and AF_VSOCK
2024-01-11 21:31:28 +01:00
Lennart Poettering 25f8d3856a
Merge pull request #30884 from poettering/logind-background-light
logind: add "background-light" + "manager" session classes
2024-01-11 21:20:01 +01:00
David Tardon dddf640cab test: use dropin dir 2024-01-12 05:12:44 +09:00
Frantisek Sumsal 378712c830 test: use correct type for the root partition 2024-01-12 03:48:22 +09:00
Lennart Poettering a50666e376 id128: add --no-pager, --no-legend, --json=/-j switches to systemd-id128 tool 2024-01-11 17:54:19 +01:00
Lennart Poettering 3b52ef6f00 test: add integration test for new 'background-light' session class 2024-01-11 17:47:41 +01:00
Lennart Poettering 4cb4e6cf6d pam_systemd: register systemd user service manager as class='manager'
Now that we have thew new class, start making us of it in pam_systemd.so
when running for user@.service.
2024-01-11 17:23:47 +01:00
Lennart Poettering 52d863defc test: add testcase for ssh generator 2024-01-11 16:18:26 +01:00
Frantisek Sumsal ec6c7bac5c test: fix dbus installation on Arch
Arch finally made dbus-broker the default dbus daemon [0], but unlike
Fedora they don't use Alias=dbus.service to make the dbus.symlink under
/etc, instead they create the symlink manually under /usr/lib, so let's
account for that.

[0] b24d15795a
2024-01-11 12:01:42 +00:00
Diego Viola 25cbc42d93 test-systemctl-enable: make titles more consistent 2024-01-11 14:13:40 +09:00
Luca Boccassi 3df2b718b2
Merge pull request #30716 from yuwata/network-cancel-request
network: also remove configuration on cancelling request
2024-01-10 19:33:16 +00:00
Luca Boccassi dadd7d46d9
Merge pull request #30809 from yuwata/resolve-fix-EDE-handling
resolve: fix EDE handling
2024-01-10 19:21:55 +00:00
Frantisek Sumsal f1caa5d6e7 test: introduce a dummy DNS test server
Introduce a _very_ simple DNS server using our internal DNS-related
code, that responds to queries with specifically crafted packets, to
cover scenarios that are difficult to reproduce with well-behaving DNS
servers.

Also, hide the test DNS server behind Knot using the dnsproxy module, so
we don't have to switch DNS servers during tests.
2024-01-11 02:13:29 +09:00
Lennart Poettering 9a70dc02c6
Merge pull request #30786 from yuwata/udev-net-link-property
udev/net: introduce [Link] Property= setting and friends
2024-01-10 15:56:29 +01:00
Yu Watanabe 9540f8e216 test-network: add test case for MACAddress=none in .netdev and MACAddressPolicy=none in .link
Prompted by #30813.
2024-01-10 12:07:23 +01:00
Yu Watanabe d26319be92 test: add test for [Link] Property= and friends 2024-01-10 04:33:55 +09:00
Luca Boccassi b4a85f75b0
Merge pull request #30843 from keszybz/test-relative-paths
Use relative paths in test units
2024-01-09 12:23:35 +00:00
Lennart Poettering bed41c4084
Merge pull request #30833 from poettering/hostnamed-varlink
hostnamed: add simple varlink interface
2024-01-09 12:38:58 +01:00
Zbigniew Jędrzejewski-Szmek 67953523d1 TEST-07: minor simplification 2024-01-09 11:18:11 +01:00
Zbigniew Jędrzejewski-Szmek 63403f07b0 tests: use relative paths in ExecStart= and friends
We want to retain *some* of the full paths in order to test more code paths.
But the default should be to use the command name only. This makes the tests
less visually cluttered.
2024-01-09 11:14:16 +01:00
Lennart Poettering 0a6598bb38 hostnamed: add simple Varlink API, too 2024-01-09 10:46:25 +01:00
Lennart Poettering 09c7bead29 testsuite-71: reset startlimit counter manually
The test cases will call quite a lot of "systemctl stop
systemd-hostnamed", hence let's make sure we reset the start limit
counter each time, to not make this eventually fail.

(At other places we disabled the start limit counter, but here I opted
for resetting it manually via 'systemctl reset-failed', to test another
facet of the mechanism)
2024-01-09 10:46:01 +01:00
Mike Yuan fa724cd52c
networkd/wireguard: support network.wireguard.* credentials
Closes #26702
2024-01-09 15:25:30 +08:00
Lennart Poettering a1bb30de7f varlink: add "ssh:" transport
This uses openssh 9.4's -W support for AF_UNIX. Unfortunately older versions
don't work with this, and I couldn#t figure a way that would work for
older versions too, would not be racy and where we'd still could keep
track of the forked off ssh process.

Unfortunately, on older versions -W will just hang (because it tries to
resolve the AF_UNIX path as regular host name), which sucks, but hopefully this
issue will go away sooner or later on its own, as distributions update.

Fedora is still stuck at 9.3 at the time of posting this (even on
Fedora), even though 9.4, 9.5, 9.6 have all already been released by
now.

Example:
        varlinkctl call -j ssh:root@somehost:/run/systemd/io.systemd.Credentials io.systemd.Credentials.Encrypt '{"text":"foobar"}'
2024-01-08 23:24:45 +01:00
Lennart Poettering 1a30285590 network-generator: pick up .netdev/.link/.network configuration via credentials
To me this is the last major basic functionality that couldn't be
configured via credentials: the network.

We do not invent any new format for this, but simply copy relevant creds
1:1 into /run/systemd/network/ to open up the full functionality of
networkd to VM hosts.
2024-01-08 12:59:08 +01:00
Frantisek Sumsal 5bd1122843 test: check how systemd-resolved deals with zone transfers
Even though systemd-resolved doesn't support zone transfers (AXFR/IXFR),
it should still just refuse such requests without choking on them.

See: https://github.com/systemd/systemd/pull/30809#issuecomment-1880102804
2024-01-07 22:22:52 +01:00
Frantisek Sumsal b4f17b07cf test: merge config sections 2024-01-07 22:02:48 +01:00
Frantisek Sumsal 45b2bf0efc test: zone-check with --force to fail on warnings 2024-01-07 22:02:48 +01:00
Frantisek Sumsal 7980c6316a test: sync the "foobaz" namespace as well
Otherwise we might be too fast, resulting in failed namespace check
later:

[    7.351453] testsuite-44.sh[401]: + journalctl --list-namespaces
[    7.351784] testsuite-44.sh[402]: + grep foobar
[    7.358851] testsuite-44.sh[402]: foobar
[    7.359598] testsuite-44.sh[403]: + journalctl --list-namespaces
[    7.359974] testsuite-44.sh[404]: + grep foobaz
[    7.369882] systemd[1]: testsuite-44.service: Failed with result 'exit-code'.

Follow-up for 68f66a1713.
2024-01-07 05:27:14 +09:00
Vladimir Stoiakin 9499741c0e TEST-24-CRYPTSETUP: depend on OpenSSL for testing PKCS#11 tokens 2024-01-07 05:26:54 +09:00
Frantisek Sumsal f569dc6af2 repart: don't crash when looping over dropped partitions
Properly skip over dropped partitions and make sure they don't affect
the final graphical output (for example by leaving empty "spaces" where
their definition file name would otherwise be).

Resolves: #30742
2024-01-07 05:26:38 +09:00