]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-queue.c
network: use void* to correctly store SetLinkOperation in Request
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Jun 2021 10:46:33 +0000 (19:46 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 15 Jun 2021 18:58:20 +0000 (20:58 +0200)
commit9b682672e4b21e6325b48da3dcca4b4a479378a6
treeb88da54268a123a9b58f56245782bb124cb669df
parentb428efa54bc9f8851514c595f14020a99fcf62a7
network: use void* to correctly store SetLinkOperation in Request

Previously, when `link_request_queue()` is called in link_request_set_link(),
`SetLinkOperation` is casted with INT_TO_PTR(), and the value is assigned to
`void *object`. However the value was read directly through the member
`SetLinkOperation set_link_operation` of the union which `object`
beloging to. Thus, read value was always 0 on big-endian systems.

Fixes configuring link issue on s390x systems.
src/network/netdev/netdev.c
src/network/networkd-queue.c
src/network/networkd-queue.h
src/network/networkd-setlink.c
src/network/networkd-setlink.h