summaryrefslogtreecommitdiffstats
path: root/tools/net/ynl
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-09-21 15:07:40 +0200
committerJakub Kicinski <kuba@kernel.org>2023-10-02 21:34:21 +0200
commita6b07a51b161ba1ad3d81919955fe77b697f9d48 (patch)
tree69b5a338fb249d8f73322b1824c2e335da11af8b /tools/net/ynl
parentMerge branch 'mlxsw-annotate-structs-with-__counted_by' (diff)
downloadlinux-a6b07a51b161ba1ad3d81919955fe77b697f9d48.tar.xz
linux-a6b07a51b161ba1ad3d81919955fe77b697f9d48.zip
handshake: Fix sign of socket file descriptor fields
Socket file descriptors are signed integers. Use nla_get/put_s32 for those to avoid implicit signed conversion in the netlink protocol. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/169530165057.8905.8650469415145814828.stgit@oracle-102.nfsv4bat.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl')
-rw-r--r--tools/net/ynl/generated/handshake-user.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/net/ynl/generated/handshake-user.h b/tools/net/ynl/generated/handshake-user.h
index 47646bb91cea..f8e481fa9e09 100644
--- a/tools/net/ynl/generated/handshake-user.h
+++ b/tools/net/ynl/generated/handshake-user.h
@@ -65,7 +65,7 @@ struct handshake_accept_rsp {
__u32 peername_len;
} _present;
- __u32 sockfd;
+ __s32 sockfd;
enum handshake_msg_type message_type;
__u32 timeout;
enum handshake_auth auth_mode;
@@ -104,7 +104,7 @@ struct handshake_done_req {
} _present;
__u32 status;
- __u32 sockfd;
+ __s32 sockfd;
unsigned int n_remote_auth;
__u32 *remote_auth;
};
@@ -122,7 +122,7 @@ handshake_done_req_set_status(struct handshake_done_req *req, __u32 status)
req->status = status;
}
static inline void
-handshake_done_req_set_sockfd(struct handshake_done_req *req, __u32 sockfd)
+handshake_done_req_set_sockfd(struct handshake_done_req *req, __s32 sockfd)
{
req->_present.sockfd = 1;
req->sockfd = sockfd;