From a6b07a51b161ba1ad3d81919955fe77b697f9d48 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Thu, 21 Sep 2023 09:07:40 -0400 Subject: 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 Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/169530165057.8905.8650469415145814828.stgit@oracle-102.nfsv4bat.org Signed-off-by: Jakub Kicinski --- tools/net/ynl/generated/handshake-user.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/net/ynl/generated') 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; -- cgit v1.2.3-58-ga151