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.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
b428efa54b
commit
9b682672e4
@@ -26,6 +26,7 @@
|
||||
#include "netlink-util.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "networkd-queue.h"
|
||||
#include "networkd-setlink.h"
|
||||
#include "nlmon.h"
|
||||
#include "path-lookup.h"
|
||||
#include "siphash24.h"
|
||||
@@ -550,7 +551,7 @@ static bool netdev_is_ready_to_create(NetDev *netdev, Link *link) {
|
||||
req = (Request) {
|
||||
.link = link,
|
||||
.type = REQUEST_TYPE_SET_LINK,
|
||||
.set_link_operation = SET_LINK_MTU,
|
||||
.set_link_operation_ptr = INT_TO_PTR(SET_LINK_MTU),
|
||||
};
|
||||
|
||||
if (ordered_set_contains(link->manager->request_queue, &req))
|
||||
|
||||
Reference in New Issue
Block a user