Yu Watanabe
1e65eb8f9b
nss-systemd: fix required buffer size calculation
...
This also fixes the pointer assigned to the gr_mem element of struct group.
Fixes a bug introduced by 47fd7fa6c6 .
Fixes #21935 .
2021-12-31 03:12:09 +09:00
Yu Watanabe
b78d7f2468
sysusers: use filename if /proc is not mounted
...
During system install, /proc may not be mounted yet.
Fixes RHBZ#2036217 (https://bugzilla.redhat.com/show_bug.cgi?id=2036217 ).
2021-12-31 03:11:43 +09:00
Yu Watanabe
14b451f20a
test-network: add testcase for invalid AllowedIPs=
2021-12-31 02:31:12 +09:00
Yu Watanabe
af670fc635
network: wireguard: warn about invalid allowed IP addresses
...
But handle them gracefully. Otherwise, when the route to the address is
being configured, kernel refuse the route.
Note that kernel's wireguard module handle e.g. 192.168.10.3/24 as
192.168.10.0/24.
Fixes #21929 .
2021-12-31 02:31:09 +09:00
Yu Watanabe
9c1b17c3dc
manager: always close idle pipe when sending ready notification
...
This fixes a bug introduced by 6d93265955 .
The commit makes several functions skipped if the manager is already
in finished state, as
> In manager_check_finished(), more steps are skipped if MANAGER_IS_FINISHED().
> Those steps are idempotent, but no need to waste cycles trying to do them
> more than once.
However, the idle pipe may be re-opened after manager is finished:
manager_dispatch_run_queue() -> manager_watch_idle_pipe().
So, the closing the pipe is not idempotent here.
Fixes #21889 .
2021-12-29 12:35:48 +00:00
Yu Watanabe
80bfc3b901
network: ndisc: ignore route prefix to ::/0
...
Fixes #21912 .
2021-12-28 21:00:49 +00:00
Yu Watanabe
cf6562e456
test: add testcases of symlinked drop-in directories
2021-12-29 01:29:21 +09:00
Yu Watanabe
7f304b8561
unti-file: fix symlinked drop-in directory handling
...
This fixes a bug introduced by 95ef0eaf0d .
Fixes #21920 .
2021-12-29 01:29:17 +09:00
Yu Watanabe
1bd0cc452c
meson: obtain dbus directories from pkg-config
2021-12-28 23:00:58 +09:00
Yu Watanabe
7e560e79eb
meson: show dbus interfaces directory in summary
2021-12-28 22:52:24 +09:00
Yu Watanabe
320848a6ba
meson: move dbus-interfaces-dir
2021-12-28 22:52:24 +09:00
Yu Watanabe
3e7bf8535f
tree-wide: fix typo
2021-12-25 18:32:22 +09:00
Yu Watanabe
61d99ab9fb
Merge pull request #21774 from keszybz/make-libcore-shared-and-add-lib-tag-option
...
Make libcore shared and add private shared lib tag option
2021-12-25 18:02:54 +09:00
Yu Watanabe
1de6d117ef
Merge pull request #21765 from yuwata/udev-warn-truncation
...
udev: warn string truncation
2021-12-25 18:02:32 +09:00
Yu Watanabe
254a7d66c6
shared/linux: update linux headers from v5.16-rc6
2021-12-25 15:34:02 +09:00
Yu Watanabe
d25cc8321c
basic/linux: update linux headers from v5.16-rc6
2021-12-25 15:34:02 +09:00
Yu Watanabe
49ad8da779
test-network: add testcase for vxlan local address auto selection
2021-12-25 15:32:06 +09:00
Yu Watanabe
b886649c95
network: vxlan: support to select an address assigned on underlying interface as local address
2021-12-25 15:32:06 +09:00
Yu Watanabe
8585b7ca65
Merge pull request #20833 from pdmorrow/onfailure_env
...
service: pass exiting service state to triggered On{Failure,Success}= dependencies
2021-12-25 15:29:42 +09:00
Yu Watanabe
b0c01c9846
test: add test for truncation of program result invoked by udev
2021-12-25 15:13:19 +09:00
Yu Watanabe
567c19a62c
udev: refuse to process line when invalid program output is obtained
2021-12-25 15:13:19 +09:00
Yu Watanabe
6b6e471a32
udev: do not import property value from truncated line of program result
2021-12-25 15:13:19 +09:00
Yu Watanabe
7056adbf16
udev: warn about truncation of program result
...
Closes #21078 .
2021-12-25 15:13:19 +09:00
Yu Watanabe
f6caab8995
udev: warn when result of string substitution is truncated
2021-12-25 15:13:17 +09:00
Yu Watanabe
648a799fc9
test: add tests for strnpcpy_full() and friends
2021-12-25 15:12:46 +09:00
Yu Watanabe
e70151c94d
util: introduce strnpcpy_full() and friends to provide whether result is truncated or not
2021-12-25 15:12:45 +09:00
Yu Watanabe
2588920059
Merge pull request #21868 from lucab/ups/factory-locale-conf
...
factory: populate /etc/locale.conf with systemd build-time setting
2021-12-25 15:09:35 +09:00
Yu Watanabe
37057fe93e
Merge pull request #21762 from yuwata/udev-ctrl-do-not-kill
...
udev: do not kill "udevadm control" processes in the same cgroup
2021-12-25 15:08:13 +09:00
Yu Watanabe
402b81ffd8
Merge pull request #21737 from yuwata/network-wait-dsa-master-up
...
network: wait for DSA master up
2021-12-25 15:05:36 +09:00
Yu Watanabe
7726526cc6
Merge pull request #21648 from yuwata/network-tunnel-local-automatic-address-selection
...
network: tunnel: automatic local address selection
2021-12-25 15:05:13 +09:00
Yu Watanabe
d3d6b38f46
Merge pull request #21871 from keszybz/meson-sbat-report
...
Report sbat settings in meson summary
2021-12-25 15:03:50 +09:00
Yu Watanabe
61cdbd8d76
Merge pull request #21888 from mrc0mmand/ci-more-build-coverage
...
ci: test build with supported cryptolibs to some degree
2021-12-25 15:03:08 +09:00
Yu Watanabe
cbf8fc90d5
list: drop unnecessary line continuation
...
Fixes #21886 .
2021-12-25 00:47:37 +09:00
Yu Watanabe
9bcf483b11
meson: fix build with -Dcryptolib=openssl -Ddns-over-tls=false
...
Previously, when -Ddns-over-tls=false, libopenssl was missing in the
dependency of resolved.
Also, this drops libgpg_error when it is not necessary.
Replaces #21878 .
2021-12-24 15:23:39 +00:00
Yu Watanabe
34b5684846
man: also add anotations for methods
...
Fixes #21882 .
2021-12-24 10:18:11 +00:00
Yu Watanabe
0764e3a327
missing-syscall: define all MOUNT_ATTR_* if missing
...
Fixes #21876 .
2021-12-24 10:12:25 +00:00
Yu Watanabe
558ad6bd38
analyze: fix segfault when malloc() fails ( #21874 )
...
Fixes #21872 .
log_syntax_callback sets 's', a.k.a. '*userdata', to POINTER_MAX to signal allocation failure.
If the error does not cause immediate failure of the program, and log_syntax_callback is called
again, it would try to use 's' as a pointer to a set and fail badly.
2021-12-23 21:03:16 +01:00
Yu Watanabe
39dfc0de05
sd-journal: fix segfault when match_new() fails
...
Fixes #21867 .
2021-12-23 21:45:32 +09:00
Yu Watanabe
418cce628c
sd-journal: free incomplete match on failure
2021-12-23 21:35:29 +09:00
Yu Watanabe
6e6dc09544
NEWS: update contributors list and release date
2021-12-23 19:54:07 +09:00
Yu Watanabe
4b6b9d3060
hwdb: update hwdb for v250-final
...
Generated by `meson compile -C build update-hwdb update-hwdb-autosuspend`.
2021-12-23 19:53:59 +09:00
Yu Watanabe
add469f5a9
man: reindent and rebreak systemd.network
...
Also fixes the following:
- IPServiceType= is moved to [DHCPv4] section,
- drop an incorrect sentence in RouteMTUBytes= in [DHCPv4] section.
- drop unnecessary word 'unsigned'.
2021-12-23 11:26:18 +01:00
Yu Watanabe
8f7a0fcbec
meson: fix typo
2021-12-23 17:01:55 +09:00
Yu Watanabe
de27f4c8b8
test: wait for user inactive
...
The user may be busy when auto-rebalancing the user's home device.
Workaround for #21589 .
---
Dec 01 15:03:15 H systemd-homework[1078]: Provided password unlocks user record.
Dec 01 15:03:15 H systemd-homework[1078]: Image file '/home/test-user.home' already locked, can't use.
Dec 01 15:03:15 H systemd-homed[240]: Worker reported error code EADDRINUSE.
Dec 01 15:03:15 H systemd-homed[240]: Activation failed: Address already in use
---
2021-12-22 17:30:10 +09:00
Yu Watanabe
a75a4148a8
test: remove test-user2
...
Otherwise, we cannot run the test multiple times.
2021-12-22 17:30:03 +09:00
Yu Watanabe
367649ee66
home: update log message
...
The ratelimit hits even when the all previous attempts are successfull.
2021-12-22 17:29:30 +09:00
Yu Watanabe
a9cab9f5cf
Merge pull request #21848 from yuwata/errno-name-drop-aliases
...
errno-name: drop aliases defined for specific arch
2021-12-22 17:27:12 +09:00
Yu Watanabe
5bdeedb342
test: add test for errno-list.[ch]
2021-12-22 15:29:55 +09:00
Yu Watanabe
95d88436ea
errno-name: drop aliases defined for specific arch
...
In kernel's arch/parisc/include/uapi/asm/errno.h, ECANCELLED and
EREFUSED are defined as aliases of ECANCELED and ECONNREFUSED,
respectively. Let's drop them.
Fixes #21844 .
2021-12-22 15:29:55 +09:00
Yu Watanabe
c99d5efc2d
Merge pull request #21857 from loongarch64/dev-pr1
...
LoongArch: dmi, virt detection and testcase
2021-12-22 15:20:20 +09:00
Yu Watanabe
3112d756a3
meson: fix cross compiling
2021-12-21 14:19:00 +00:00
Yu Watanabe
a2482eb290
Merge pull request #21839 from yuwata/repart-issue-reproducer-21817
...
test: add test case for #21817
2021-12-21 02:30:53 +09:00
Yu Watanabe
71bb604807
test: add a test case for issue #21817
2021-12-21 00:28:39 +09:00
Yu Watanabe
92ecc87512
test: install losetup by default
...
Preparation for the next commit.
2021-12-20 23:34:27 +09:00
Yu Watanabe
30df858f43
journal-remote: use MHD_HTTP_CONTENT_TOO_LARGE as MHD_HTTP_PAYLOAD_TOO_LARGE is deprecated since 0.9.74
2021-12-20 14:30:24 +01:00
Yu Watanabe
b9f27a0567
sd-radv: do not use goto for non-error-handling cases
...
Follow-up for 059d7b6eae .
The comment https://github.com/systemd/systemd/pull/21814#discussion_r771842132
suggests to introduce new helper, but it is used only one place.
Let's not add such, but simply replace the goto with a flag.
2021-12-19 12:23:14 +00:00
Yu Watanabe
ecb0be874d
Merge pull request #21814 from yuwata/network-dhcp-pd-fixes
...
network: several fixes for DHCP prefix delegation
2021-12-19 08:52:08 +09:00
Yu Watanabe
ccadf9ac0d
udev: do not kill "udevadm control" process in the same cgroup
...
Fixes #16867 .
2021-12-18 20:05:26 +09:00
Yu Watanabe
f9da11ef1e
udev-ctrl: make udev_ctrl_send() accept integer and string through a single argument
2021-12-18 19:41:14 +09:00
Yu Watanabe
6a936c9c9a
test-network: add tests for renewing/rebinding lease
2021-12-18 10:09:07 +09:00
Yu Watanabe
2616b5285f
test-network: introduce dump_dnsmasq_log_file()
2021-12-18 10:09:07 +09:00
Yu Watanabe
4862fb693d
test-network: use dnsmasq for testing DHCP4-6RD
2021-12-18 10:09:07 +09:00
Yu Watanabe
f56af3b4c8
test-network: use --bind-interfaces option for dnsmasq
...
Also make the interface name and router address configurable.
2021-12-18 10:09:07 +09:00
Yu Watanabe
897f720602
sd-dhcp-client: add log message when a message is received
2021-12-18 10:09:07 +09:00
Yu Watanabe
fe87807eaa
network: dhcp-pd: do not stack 6rd sit tunnel
2021-12-18 10:09:07 +09:00
Yu Watanabe
42e7ce69e4
network: route: update expiration timer in link_request_route()
2021-12-18 10:09:07 +09:00
Yu Watanabe
d0f17cfda6
network: route: do not drop unreachable route on reconfiguring downstream interface
...
Previously, when a downstream is reconfigured, the unreachable route
was removed as there is no corresponding static config in .network
files.
2021-12-18 10:09:07 +09:00
Yu Watanabe
277521a1ac
network: dhcp-pd: fix condition in dhcp_pd_prefix_lost()
2021-12-18 10:09:07 +09:00
Yu Watanabe
059d7b6eae
sd-radv: send RA when prefix is updated
2021-12-18 10:09:07 +09:00
Yu Watanabe
14dd873b88
network: dhcp4: pass IPServiceType=none to dhcp client
...
Follow-up for b55093ce88 .
2021-12-18 08:35:42 +09:00
Yu Watanabe
a00fd2a553
Merge pull request #21800 from keszybz/net-id-debugging
...
Add more debugging info to udev builtin net_id
2021-12-18 08:35:08 +09:00
Yu Watanabe
21feba0a5c
network: dhcp: logs received 6rd option
...
Addresses https://github.com/systemd/systemd/pull/21625#issuecomment-996109051 .
2021-12-17 09:47:11 +00:00
Yu Watanabe
b0b1edc29b
NEWS: fix typo
2021-12-17 04:12:14 +09:00
Yu Watanabe
616f51c16d
boot: fix typo
2021-12-17 04:11:41 +09:00
Yu Watanabe
d9338387d9
Merge pull request #21786 from keszybz/dirent-work
...
Make FOREACH_DIRENT and FOREACH_DIRENT_ALL declare the iterator variables
2021-12-17 04:07:35 +09:00
Yu Watanabe
75e1378c0d
Merge pull request #21736 from yuwata/network-cleanups-for-drop-foreign-configs
...
network: cleanups for dropping foreign configs
2021-12-17 04:07:00 +09:00
Yu Watanabe
b1d9c504d3
network: wait until the DSA master interface becomes up
...
This is for the DSA subsystem, which have several stacked interfaces
on the master interface. To bring up a stacked interface, it is necessary
that the master is already up. See
https://github.com/systemd/systemd/issues/7478#issuecomment-348508263 .
Note this is not necessary for newer kernels which includes
https://github.com/torvalds/linux/commit/9d5ef190e5615a7b63af89f88c4106a5bc127974 .
Fixes #7478 .
2021-12-17 02:00:25 +09:00
Yu Watanabe
2347b6b94e
test-network: wait for veth99 being configured
...
As the address, which should be kept, may not be just removed yet.
Let's check that the address is actually kept.
2021-12-17 00:14:30 +09:00
Yu Watanabe
8a20a8438f
network: route: link_drop_foreign_routes() must be called only for managed interfaces
2021-12-17 00:14:30 +09:00
Yu Watanabe
f974f17ae7
networkd: check the existence of the route
2021-12-17 00:13:42 +09:00
Yu Watanabe
a71c5c44f7
network: address: minor optimization for link_drop_foreign_addresses()
...
link_address_is_dynamic() is costful in general. Call it only when
KeepConfiguration= is set.
Note, it is not necessary to check link->network in the loop, as we have
the assertion for that in the beginning of the function.
2021-12-16 22:43:18 +09:00
Yu Watanabe
9e86dba94b
network: drop IPv6LL addresses manually configured in .network file
2021-12-16 22:43:18 +09:00
Yu Watanabe
2b3a8e2830
network: route: update comment
2021-12-15 20:07:17 +00:00
Yu Watanabe
bd47f33f16
NEWS: update networkd related entries
2021-12-16 02:12:03 +09:00
Yu Watanabe
79463de533
test: add testcases for net.ifname-policy= kernel command line argument
2021-12-16 01:55:37 +09:00
Yu Watanabe
a4c9bf2e51
network-generator: support to set NamePolicy= through kernel command line argument
...
Closes #16296 .
2021-12-16 01:55:37 +09:00
Yu Watanabe
ff516b4341
udev: move NamePolicy to netif-naming-scheme.[ch]
2021-12-16 01:55:37 +09:00
Yu Watanabe
eb3e86ae2c
network-generator: support MAC address longer or shorter than ETH_ALEN
2021-12-16 01:55:37 +09:00
Yu Watanabe
987dd89c77
meson: build network-generator unconditionally
...
The service also generates .link files for udevd.
2021-12-16 01:55:20 +09:00
Yu Watanabe
85e8650827
unit: run network-generator before starting udevd
...
Otherwise, .link files generated by the service may not be loaded by
udevd.
2021-12-16 01:44:17 +09:00
Yu Watanabe
18f0eaafd7
fstab-generator: do not remount /sys when running in a container
...
Closes #21744 .
2021-12-15 06:30:42 +09:00
Yu Watanabe
3a90bef55a
udevadm: also show write-only attributes
2021-12-14 21:50:02 +09:00
Yu Watanabe
ab218d0bdb
sd-device: make FOREACH_DEVICE_SYSATTR() also list write-only attributes
...
Closes #10102 .
2021-12-14 21:49:56 +09:00
Yu Watanabe
2ff457720b
home: fix heap-use-after-free
...
`bus_home_emit_remove()` may be called from manager_free() -> home_free().
In that case, manager->bus is already unref()ed.
Fixes #21767 .
2021-12-14 20:00:56 +09:00
Yu Watanabe
76fc157702
home: clear Manager::bus, ::event, ::homes_by_xxx and so on
...
`home_free()` may try to call some dbus or event related functions.
To prevent that, set those variables NULL.
2021-12-14 20:00:24 +09:00
Yu Watanabe
3c2f847227
polkit: make bus_verify_polkit_async_registry_free() return Hashmap* with NULL
2021-12-14 19:39:39 +09:00
Yu Watanabe
372e8592c6
wait-online: also use address state even when operational state is below degraded
...
Closes #21706 .
2021-12-14 10:32:56 +01:00
Yu Watanabe
da7d684825
test-network: add testcase for automatic tunnel local address selection
2021-12-12 14:11:38 +09:00
Yu Watanabe
2be25d7557
network: tunnel: support to set an address assigned on underlying interface as local address
...
Closes #18732 .
2021-12-12 13:42:45 +09:00
Yu Watanabe
6d1b59cec4
network/netdev: introduce link_get_local_address()
...
It will be used in later commits.
2021-12-12 13:41:48 +09:00