summaryrefslogtreecommitdiffstats
path: root/src/network (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-07-30network: ndisc - Honour CurHopLimitSusant Sahani6-0/+20
RFC4861 Neighbor Discovery – Sections 4.2 and 6.3.4 From section 4.2. Router Advertisement Message Format: Cur Hop Limit 8-bit unsigned integer. The default value that should be placed in the Hop Count field of the IP header for outgoing IP packets. A value of zero means unspecified (by this router).
2023-07-30network/address: merge address_needs_to_set_broadcast() with ↵Yu Watanabe2-20/+38
address_get_broadcast() No functional change, preparation for later commits.
2023-07-30network/neighbor: drop IPv6 settings when the kernel does not support IPv6Yu Watanabe1-0/+7
2023-07-30network: rename sd_netlink_message* req -> mYu Watanabe2-27/+17
This also merges neighbor_configure_message() with neighbor_configure().
2023-07-30meson: use kwargs to declare efi binariesYu Watanabe1-29/+18
No functional change, just refactoring.
2023-07-30analyze: fix pcrs verb output without TPM supportFrantisek Sumsal1-1/+1
If we don't have TPM support then `alg` is NULL and passing this to table_new() means we'd get a table with only two columns instead of three, leading up to a very confusing output: $ build/systemd-analyze pcrs System lacks full TPM2 support, not showing PCR state. NR NAME 0 platform-code - 1 platform-config - 2 external-code - 3 external-config - 4 boot-loader-code - 5 boot-loader-config - 6 - - 7 ... Let's name the header in this case with a simple dash, as it's going to be hidden anyway, to make the table nice again: $ build/systemd-analyze pcrs System lacks full TPM2 support, not showing PCR state. NR NAME 0 platform-code 1 platform-config 2 external-code 3 external-config 4 boot-loader-code 5 boot-loader-config 6 - 7 secure-boot-policy ...
2023-07-29tree-wide: fix typoYu Watanabe2-2/+2
2023-07-29network/queue: detach request from queue when netlink reply receivedYu Watanabe2-4/+22
Then, we can find and use the Request object after sending netlink message. Preparation for later commits.
2023-07-29network/queue: free assigned userdata only when a new request is queuedYu Watanabe2-3/+6
2023-07-29network/address: split-out address_match_null()Yu Watanabe1-11/+22
No functional change, preparation for later commits.
2023-07-29network: drop unnecessary conditionsYu Watanabe4-5/+5
When link_get_by_index() succeeds, the result is always non-NULL.
2023-07-29network: use address_remove_and_drop()Yu Watanabe3-9/+3
2023-07-29network/address: free Address object by caller that passed to ↵Yu Watanabe9-19/+13
link_request_address() Follow-up for 9684a8ded083dd427f843b0c40aa0292e6c7ae06. Now, the input Address object is always copied, hence it is not necessary to free it in link_request_address().
2023-07-29labeller: add build-system labelZbigniew Jędrzejewski-Szmek1-0/+5
2023-07-29configure: update meson invocationZbigniew Jędrzejewski-Szmek1-1/+1
New meson says: WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. Inspired by https://github.com/systemd/systemd/issues/28482.
2023-07-29gpt-auto: don't mount ESP if there's an fstab entry for itMike Yuan1-12/+9
Follow-up for #28511 Fixes #28550
2023-07-29fstab-util: add fstab_has_nodeMike Yuan2-9/+13
2023-07-29test-ukify: add tests for an empty argumentYu Watanabe1-0/+5
2023-07-29serialize: add serialize_bool_elide() helperLuca Boccassi2-3/+10
In many case we serialize into objects that have been zero-initialized. To save some time and resources when there are a lot of booleans, add a helper that serializes only when the boolean is true.
2023-07-29socket-util: add send/receive helpers for FD arrayLuca Boccassi3-0/+213
2023-07-29mkosi: set CONFIG_AUTOFS_FS rather than CONFIG_AUTOFS4_FSSven Joachim1-1/+1
Since Linux 4.18 CONFIG_AUTOFS4_FS just enables CONFIG_AUTOFS_FS, its description in fs/autofs/Kconfig reads: This name exists for people to just automatically pick up the new name of the autofs Kconfig option. All it does is select the new option name. It will go away in a release or two as people have transitioned to just plain AUTOFS_FS.
2023-07-29NEWS: mention about the removal of duid-only optionYu Watanabe1-1/+8
2023-07-29network,dhcp: drop support of ClientIdentifier=duid-onlyYu Watanabe5-67/+20
The setting has not been never worked, not tested, and should not been used. As the option is RFC incompliant. Let's drop it. Closes #25562.
2023-07-29ukify: check option lengthYu Watanabe1-1/+1
Follow-up for df4a46733a609f1673de0bebb38e89fffd70c16c.
2023-07-29NEWS: open for v255 businessLuca Boccassi1-0/+33
2023-07-29docs: note that Github Pages configuration has to be updated after a releaseLuca Boccassi1-0/+1
2023-07-28test-execute: count and log the number of individual tests actually executedLuca Boccassi1-1/+6
2023-07-28Drop split-usr and unmerged-usr supportLuca Boccassi128-719/+443
As previously announced, execute order 66: https://lists.freedesktop.org/archives/systemd-devel/2022-September/048352.html The meson options split-usr, rootlibdir and rootprefix become no-ops that print a warning if they are set to anything other than the default values. We can remove them in a future release.
2023-07-28test-execute: measure and log time elapsed while running testsLuca Boccassi1-0/+12
In order to get a good approximation of latencies when starting services, timestamp before/after running the test cases and print the difference. This allows to measure while ignoring the setup/shutdown time for the test harness.
2023-07-28nspawn,shared: cleanup use of ERRNO_IS_SECCOMP_FATAL()Dmitry V. Levin3-48/+64
Given that ERRNO_IS_SECCOMP_FATAL() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the arguments passed to ERRNO_IS_SECCOMP_FATAL() are the values returned by external libseccomp function seccomp_load() which is not expected to return any positive values, but let's be consistent anyway and move ERRNO_IS_SECCOMP_FATAL() invocations to the branches where the return values are known to be negative.
2023-07-28homework: cleanup use of ERRNO_IS_DEVICE_ABSENT()Dmitry V. Levin1-8/+10
Given that ERRNO_IS_DEVICE_ABSENT() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the arguments passed to ERRNO_IS_DEVICE_ABSENT() are the values returned by external cryptsetup functions sym_crypt_init_by_name() and sym_crypt_deactivate_by_name() which are not expected to return any positive values, but let's be consistent anyway and move ERRNO_IS_DEVICE_ABSENT() invocations to the branches where the return values are known to be negative.
2023-07-28test: cleanup use of ERRNO_IS_PRIVILEGE()Dmitry V. Levin1-2/+2
Given that ERRNO_IS_PRIVILEGE() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the arguments passed to ERRNO_IS_PRIVILEGE() are the values returned by procfs_get_pid_max() and procfs_get_threads_max() which are not expected to return any positive values, but let's be consistent anyway and move ERRNO_IS_PRIVILEGE() invocations to the branches where the return values are known to be negative.
2023-07-28userdb: cleanup use of ERRNO_IS_PRIVILEGE()Dmitry V. Levin1-14/+16
Given that ERRNO_IS_PRIVILEGE() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the argument passed to ERRNO_IS_PRIVILEGE() is the value returned by json_parse_file() which is not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_PRIVILEGE() invocation to the branch where the return value is known to be negative.
2023-07-28coredumpctl: cleanup use of ERRNO_IS_PRIVILEGE()Dmitry V. Levin1-7/+8
Given that ERRNO_IS_PRIVILEGE() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the argument passed to ERRNO_IS_PRIVILEGE() is the value returned by access_fd() which is not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_PRIVILEGE() invocation to the branch where the return value is known to be negative.
2023-07-28execute: cleanup use of ERRNO_IS_PRIVILEGE()Dmitry V. Levin1-9/+13
Given that ERRNO_IS_PRIVILEGE() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the arguments passed to ERRNO_IS_PRIVILEGE() are the values returned by set_oom_score_adjust() and set_coredump_filter() which are not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_PRIVILEGE() invocations to the branches where the return values are known to be negative.
2023-07-28btrfs-util,tmpfiles: cleanup use of ERRNO_IS_NOT_SUPPORTED()Dmitry V. Levin2-8/+10
Given that ERRNO_IS_NOT_SUPPORTED() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the arguments passed to ERRNO_IS_NOT_SUPPORTED() are the values returned by btrfs_subvol_make_fd() which is not expected to return any positive values, but let's be consistent anyway and move ERRNO_IS_NOT_SUPPORTED() invocations to the branches where the return values are known to be negative.
2023-07-28repart: cleanup use of ERRNO_IS_NOT_SUPPORTED()Dmitry V. Levin1-6/+8
Given that ERRNO_IS_NOT_SUPPORTED() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the arguments passed to ERRNO_IS_NOT_SUPPORTED() are the values returned by efi_get_variable_string() and efi_set_variable() which are not expected to return any positive values, but let's be consistent anyway and move ERRNO_IS_NOT_SUPPORTED() invocations to the branches where the return values are known to be negative.
2023-07-28nspawn: cleanup use of ERRNO_IS_NOT_SUPPORTED()Dmitry V. Levin1-13/+14
Given that ERRNO_IS_NOT_SUPPORTED() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the argument passed to ERRNO_IS_NOT_SUPPORTED() is the value returned by remount_idmap() which is not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_NOT_SUPPORTED() invocation to the branch where the return value is known to be negative.
2023-07-28logind: cleanup use of ERRNO_IS_NOT_SUPPORTED()Dmitry V. Levin1-6/+7
Given that ERRNO_IS_NOT_SUPPORTED() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the argument passed to ERRNO_IS_NOT_SUPPORTED() is the value returned by efi_loader_get_entries() which is not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_NOT_SUPPORTED() invocation to the branch where the return value is known to be negative.
2023-07-28homework: cleanup use of ERRNO_IS_NOT_SUPPORTED()Dmitry V. Levin1-3/+4
Given that ERRNO_IS_NOT_SUPPORTED() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the argument passed to ERRNO_IS_NOT_SUPPORTED() is the value returned by home_update_quota_auto() which is not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_NOT_SUPPORTED() invocation to the branch where the return value is known to be negative.
2023-07-28cryptsetup: cleanup use of ERRNO_IS_NOT_SUPPORTED()Dmitry V. Levin1-3/+4
Given that ERRNO_IS_NOT_SUPPORTED() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the argument passed to ERRNO_IS_NOT_SUPPORTED() is the value returned by find_tpm2_auto_data() which is not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_NOT_SUPPORTED() invocation to the branch where the return value is known to be negative.
2023-07-28bootctl: cleanup use of ERRNO_IS_NOT_SUPPORTED()Dmitry V. Levin1-5/+6
Given that ERRNO_IS_NOT_SUPPORTED() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the argument passed to ERRNO_IS_NOT_SUPPORTED() is the value returned by efi_loader_get_entries() which is not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_NOT_SUPPORTED() invocation to the branch where the return value is known to be negative.
2023-07-28varlink: cleanup use of ERRNO_IS_DISCONNECT()Dmitry V. Levin1-5/+6
Given that ERRNO_IS_DISCONNECT() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the argument passed to ERRNO_IS_DISCONNECT() is the value returned by varlink_connect_address() which is not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_DISCONNECT() invocation to the branch where the return value is known to be negative.
2023-07-28resolved: cleanup use of ERRNO_IS_DISCONNECT()Dmitry V. Levin1-1/+1
Given that ERRNO_IS_DISCONNECT() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the argument passed to ERRNO_IS_DISCONNECT() is the value returned by dns_transaction_emit_tcp() and dns_transaction_emit_udp() which are not expected to return any positive values, but let's be consistent anyway and move the ERRNO_IS_DISCONNECT() invocation to the branch where the return value is known to be negative.
2023-07-28socket: cleanup use of ERRNO_IS_DISCONNECT()Dmitry V. Levin1-13/+16
Given that ERRNO_IS_DISCONNECT() also matches positive values, make sure this macro is not called with arguments that do not have errno semantics. In this case the arguments passed to ERRNO_IS_DISCONNECT() are the values returned by instance_from_socket(), socket_load_service_unit(), and service_set_socket_fd() which are not expected to return any positive values, but let's be consistent anyway and move ERRNO_IS_DISCONNECT() invocations to the branches where the return values are known to be negative.
2023-07-28core: free the strings in the set as well during unit cleanupFrantisek Sumsal2-5/+5
Spotted while fuzzing #27890. ================================================================= ==908098==ERROR: LeakSanitizer: detected memory leaks Direct leak of 64 byte(s) in 1 object(s) allocated from: #0 0x7f4efe6d81f5 in __interceptor_realloc.part.0 (/lib64/libasan.so.8+0xd81f5) (BuildId: dc689b05ca2577037af24700212bb5cce1f91c8a) #1 0x7f4efb8e3ace in greedy_realloc ../src/basic/alloc-util.c:70 #2 0x7f4efb93b713 in extract_first_word ../src/basic/extract-word.c:62 #3 0x7f4efb970d50 in set_put_strsplit ../src/basic/hashmap.c:1902 #4 0x7f4efd76c27e in exec_context_deserialize ../src/core/execute-serialize.c:3341 #5 0x7f4efd778dcb in exec_deserialize ../src/core/execute-serialize.c:4122 #6 0x4032c0 in LLVMFuzzerTestOneInput ../src/core/fuzz-execute-serialize.c:60 #7 0x403c58 in main ../src/fuzz/fuzz-main.c:50 #8 0x7f4efecccb49 in __libc_start_call_main (/lib64/libc.so.6+0x27b49) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9) #9 0x7f4efecccc0a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c0a) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9) #10 0x402344 in _start (/home/mrc0mmand/repos/@systemd/systemd/build-san/fuzz-execute-serialize+0x402344) (BuildId: 195f382cf1e39b9ba48d6dcf5a90f786d72837a8) SUMMARY: AddressSanitizer: 64 byte(s) leaked in 1 allocation(s). Aborted (core dumped) ==911550==ERROR: LeakSanitizer: detected memory leaks Direct leak of 17 byte(s) in 1 object(s) allocated from: #0 0x4df281 in strdup (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x4df281) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6) #1 0x7fe4ae2b38fc in _set_put_strndup_full /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/basic/hashmap.c:1868:21 #2 0x7fe4b0bad897 in exec_context_deserialize /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/core/execute-serialize.c:3914:29 #3 0x7fe4b0b80592 in exec_deserialize /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/core/execute-serialize.c:4109:13 #4 0x531d0f in LLVMFuzzerTestOneInput /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/core/fuzz-execute-serialize.c:59:16 #5 0x440594 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x440594) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6) #6 0x43f9b9 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x43f9b9) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6) #7 0x440fd5 in fuzzer::Fuzzer::MutateAndTestOne() (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x440fd5) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6) #8 0x441955 in fuzzer::Fuzzer::Loop(std::vector<fuzzer::SizedFile, std::allocator<fuzzer::SizedFile>>&) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x441955) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6) #9 0x42e151 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x42e151) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6) #10 0x45a916 in main (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x45a916) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6) #11 0x7fe4ac449b49 in __libc_start_call_main (/lib64/libc.so.6+0x27b49) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9) #12 0x7fe4ac449c0a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x27c0a) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9) #13 0x422b74 in _start (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x422b74) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6) SUMMARY: AddressSanitizer: 17 byte(s) leaked in 1 allocation(s).
2023-07-28CI: network - Add test for rp_filterSusant Sahani2-0/+2
2023-07-28networkd: allow setting rp_filter for an interfaceSusant Sahani6-0/+60
2023-07-28NEWS: finalize for v254v254Luca Boccassi1-2/+2
A release is never late, nor is it early, it arrives precisely when it means to.
2023-07-28NEWS: mention that fsck will be ran for systemd.mount-extra=Luca Boccassi1-3/+5