summaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18150 from poettering/strextend-tweakLennart Poettering2021-01-0623-63/+61
|\ | | | | tree-wide: beef up strextend() a bit
| * string-util: use GREEDY_ALLOC_ROUND_UP() in strextend()Lennart Poettering2021-01-061-1/+1
| | | | | | | | | | | | | | This uses GREEDY_ALLOC_ROUND_UP() to grow the allocation size exponentially. This should speed allocation loops up a bit, given that we often call strextend() repeatedly in a loop on the same buffer.
| * string-util: imply NULL termination of strextend() argument listLennart Poettering2021-01-0623-63/+61
| | | | | | | | | | The trailing NULL in the argument list is now implied (similar to what we already have in place in strjoin()).
* | systemctl: have is-enabled return success for aliases when calling into pid1 tooLuca Boccassi2021-01-061-1/+1
|/ | | | | | | | | commit 15d7ab87c4e5917f5788f1f8dce327a1e272bea3 introduced the change to add an 'alias' state, but it was wired to systemctl only when running in 'client-side' mode. Return success as expected and documented also when running in 'server-mode'. Fixes https://github.com/systemd/systemd/issues/18134
* cryptsetup: use crypt_token_max if availableLuca Boccassi2021-01-058-11/+23
| | | | | | New API added upstream: https://gitlab.com/cryptsetup/cryptsetup/-/commit/8a12f6dc2c75f8fd0c4969fbdc421895eb418072
* network: Allow to set device's receive queues and transmit queuesSusant Sahani2021-01-054-0/+98
|
* Merge pull request #18109 from ↵Luca Boccassi2020-12-301-50/+85
|\ | | | | | | | | yuwata/network-routing-policy-rule-family-both-fixes network: fixes related to Family=both in [RoutingPolicyRule]
| * network: drop fib rules configured with Family=bothYu Watanabe2020-12-291-4/+30
| |
| * network: set RoutingPolicyRule::family based on Family= settingYu Watanabe2020-12-291-2/+7
| |
| * network: always re-configure rules even if already existYu Watanabe2020-12-291-34/+40
| | | | | | | | | | routing_policy_rule_get() in link_set_routing_policy_rules() does not work when [RoutingPolicyRule] section does not have From= or To=.
| * network: drop unnecessary checksYu Watanabe2020-12-291-4/+2
| | | | | | | | By the previous commit, the checks are not necessary any more.
| * network: fix possible memory leakYu Watanabe2020-12-291-2/+2
| | | | | | | | | | When set_put() returns 0, then already stored rule will be unref()ed from Manager.
| * network: constify several argumentsYu Watanabe2020-12-291-9/+9
| |
* | Merge pull request #18105 from yuwata/fuzz-fix-timeoutYu Watanabe2020-12-3010-55/+103
|\ \ | | | | | | Fuzz fix timeout
| * | resolve: slightly optimize dns_answer_add()Yu Watanabe2020-12-294-27/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, dns_answer_add() was O(n^2). With this change dns_packet_extract() becomes ~15 times faster for some extremal case. Before: ``` $ time ./fuzz-dns-packet ~/downloads/clusterfuzz-testcase-minimized-fuzz-dns-packet-5631106733047808 /home/watanabe/downloads/clusterfuzz-testcase-minimized-fuzz-dns-packet-5631106733047808... ok real 0m15.453s user 0m15.430s sys 0m0.007s ``` After: ``` $ time ./fuzz-dns-packet ~/downloads/clusterfuzz-testcase-minimized-fuzz-dns-packet-5631106733047808 /home/watanabe/downloads/clusterfuzz-testcase-minimized-fuzz-dns-packet-5631106733047808... ok real 0m0.831s user 0m0.824s sys 0m0.006s ``` Hopefully fixes oss-fuzz#19227. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19227
| * | resolve: field size in dns resource record may be zeroYu Watanabe2020-12-291-10/+10
| | |
| * | siphash: introduce siphash24_compress_safe()Yu Watanabe2020-12-291-4/+8
| | |
| * | resolve: do not compare key twiceYu Watanabe2020-12-291-1/+1
| | |
| * | resolve: slightly shorten dns_resource_key_compare_func()Yu Watanabe2020-12-291-12/+8
| | |
| * | resolve: fix typoYu Watanabe2020-12-291-1/+1
| | |
| * | fuzzers: set maximum length for several fuzzersYu Watanabe2020-12-294-0/+8
| |/ | | | | | | | | | | | | Hopefully fixes oss-fuzz#19081, oss-fuzz#21731, oss-fuzz#21755. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19081 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21731 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21755
* / A typo fix in bootctl.c (#18106)Endre Szabo2020-12-301-1/+1
|/
* network: do not serialize/deserialize routing policy rulesYu Watanabe2020-12-296-476/+0
| | | | | | We already handle foreign routing policy rules correctly by the previous commit. So, the serialization/deserialization of rules are not necessary anymore.
* network: drop unnecessary routing policy rulesYu Watanabe2020-12-293-19/+68
| | | | | | | | | | | | networkd already drop foreign address, routes, and nexthops on startup, except those created by kernel. However, previously, routing policy rules were not. The logic of serialization/deserialization of rules only works for rules created by previous invocation of networkd, and does not work for one created by other tools like `ip rule`. This makes networkd drop foreign routing policy rules except created by kernel on startup. Also, remove rules created by networkd when the corresponding links are dropped or networkd is stopping.
* network: treat rule which has l3mdev flag as created by kernelYu Watanabe2020-12-292-0/+18
|
* network: adjust protocol of rules sent from kernel when kernel does not ↵Yu Watanabe2020-12-291-1/+30
| | | | | | support FRA_PROTOCOL Otherwise, each configured rule is treated as foreign.
* network: set FRA_PROTOCOL to RTPROT_STATIC by defaultYu Watanabe2020-12-292-10/+29
|
* shared/dns: fix dlopen_idn return code checkLuca Boccassi2020-12-281-1/+1
| | | | Fixes https://github.com/systemd/systemd/issues/18078
* sd-dhcp-client: avoid "maybe-uninitialized" warning in client_timeout_resend()Thomas Haller2020-12-261-0/+3
| | | | | | | | | When compiling with CFLAGS='-Werror=maybe-uninitialized -Og' we get a warning about uninitialized "next_timeout" variable. Avoid the warning by adding an (unreachable) "default" label. Fixes: c24288d21ee9 ("sd-dhcp-client: correct dhcpv4 renew/rebind retransmit timeouts")
* network: introduce RouterAllowList= and RouterDenyList= in [IPv6AcceptRA]Yu Watanabe2020-12-244-8/+32
|
* networkd: add support for prefix allow-list and route allow-listSusant Sahani2020-12-245-19/+38
|
* network: rename DenyList= -> PrefixDenyList=Yu Watanabe2020-12-241-2/+3
|
* network: make RouteDenyList= filter route prefix rather than gateway addressYu Watanabe2020-12-241-10/+11
| | | | | | | DenyList= filters provided prefixes, not router address. So, RouteDenyLisy= should so for consistency. Fixes 16c89e649d248b0fc7c1dc7ad9f3323be4eac0f4.
* network: fix condition for checking the provided gateway is assigned to linkYu Watanabe2020-12-241-1/+1
| | | | Fix bug introduced by 221019166f315252304b3459902ead613b905de5.
* sd-ndisc: fix indentationYu Watanabe2020-12-241-2/+1
|
* network: drop redundant TAKE_PTR()Yu Watanabe2020-12-241-2/+0
| | | | Follow-up for 16c89e649d248b0fc7c1dc7ad9f3323be4eac0f4.
* Improve instructions for debugging failing serviceSebastiaan van Stijn2020-12-241-4/+6
| | | | | | | | | | | | | | | In situations where a service fails to start, systemd suggests the user to use "journalctl -xe" to get details about the failure. While running this command does provide some additional details, most of the information is similar to what was already printed when the service fails. often the actual reason for the failure can be found in the logs of the service that fails to start. This patch updates the wording to suggest using "-u" to view the service logs instead. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* network: fix IPv6PrivacyExtensions=kernel handlingFlorian Klink2020-12-241-0/+4
| | | | | | | | | | When set to "kernel", systemd is not supposed to touch that sysctl. 5e0534f1c13cd50ec2b143a8b18156cd37e502f7, part of https://github.com/systemd/systemd/pull/17240 forgot to handle that case. Fixes https://github.com/systemd/systemd/issues/18003
* network: fix typoFlorian Klink2020-12-231-1/+1
| | | | IPv6 privacy extensions are plural, not singular.
* cryptsetup: add support for workqueue optionsJonathan G. Underwood2020-12-232-0/+20
| | | | | | | | This commit adds support for disabling the read and write workqueues with the new crypttab options no-read-workqueue and no-write-workqueue. These correspond to the cryptsetup options --perf-no_read_workqueue and --perf-no_write_workqueue respectively.
* udev: Updates for cdrom_id helperpali2020-12-221-28/+312
| | | | | | | | cdrom_id udev helper does not parse all MMC profiles. Following change fixes this issue and parse all 34 profiles from all MMC standard versions. Also it replaces magic constants by macros provided by linux/cdrom.h and fixes cd_profiles_old_mmc() to issue READ_DISC_INFO command in two steps, like it is doing kernel and also mkudffs.
* basic: add make_mount_point_inode helperLuca Boccassi2020-12-215-28/+91
| | | | | Creates a file or a directory depending on the source path, useful for creating mount points.
* udev: fix memleakYu Watanabe2020-12-211-1/+2
| | | | Fixes #18039.
* journal-importer: ignore invalid field at one more placeYu Watanabe2020-12-211-0/+10
| | | | | Fixes oss-fuzz#28817. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28817
* cryptenroll: drop an unused variableFrantisek Sumsal2020-12-201-1/+1
| | | | | | | | Fixes following warning/error w/ clang: ../src/cryptenroll/cryptenroll-tpm2.c:64:64: error: unused variable 'a' [-Werror,-Wunused-variable] _cleanup_(json_variant_unrefp) JsonVariant *v = NULL, *a = NULL; ^ 1 error generated.
* tmpfiles: fix typoYu Watanabe2020-12-181-1/+1
| | | | Follow-up for 94566540e3863032df3a8a89f948b94d764ca2b4.
* Merge pull request #18019 from yuwata/hostname-drop-libudevYu Watanabe2020-12-181-1/+0
|\ | | | | hostname: fix build failure
| * hostname: fix build failureYu Watanabe2020-12-181-1/+0
| | | | | | | | | | | | Follow-up for b9d8069832425b34211a6812e06537e0c50d46b6. libudev.h was dropped from most of our binaries.
* | memory-id: fix never hit conditionYu Watanabe2020-12-181-2/+5
|/ | | | As sizeof(int64_t) is always 8.
* Merge pull request #15531 from felipeborges/add-device-model-field-to-hostnamedLennart Poettering2020-12-182-0/+64
|\ | | | | hostnamed: Add "Model" field