diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-06-14 19:46:33 +0900 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-06-15 20:58:20 +0200 |
commit | 9b682672e4b21e6325b48da3dcca4b4a479378a6 (patch) | |
tree | b88da54268a123a9b58f56245782bb124cb669df /src/network/networkd-queue.h | |
parent | b428efa54bc9f8851514c595f14020a99fcf62a7 (diff) | |
download | systemd-9b682672e4b21e6325b48da3dcca4b4a479378a6.tar.gz |
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.
Diffstat (limited to 'src/network/networkd-queue.h')
-rw-r--r-- | src/network/networkd-queue.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/network/networkd-queue.h b/src/network/networkd-queue.h index c3d7f05079..1f4b15f087 100644 --- a/src/network/networkd-queue.h +++ b/src/network/networkd-queue.h @@ -4,7 +4,6 @@ #include "sd-event.h" #include "networkd-link.h" -#include "networkd-setlink.h" typedef struct Address Address; typedef struct AddressLabel AddressLabel; @@ -40,8 +39,6 @@ typedef enum RequestType { _REQUEST_TYPE_INVALID = -EINVAL, } RequestType; -assert_cc(sizeof(SetLinkOperation) <= sizeof(void*)); - typedef struct Request { Link *link; RequestType type; @@ -56,7 +53,7 @@ typedef struct Request { NextHop *nexthop; Route *route; RoutingPolicyRule *rule; - SetLinkOperation set_link_operation; + void *set_link_operation_ptr; NetDev *netdev; void *object; }; |