diff options
author | Dmitry Safonov <dima@arista.com> | 2020-09-21 15:36:56 +0100 |
---|---|---|
committer | Alistair Delva <adelva@google.com> | 2020-11-02 16:37:31 +0000 |
commit | 05de67ed2af314b5d1c5083b66c8b077628aaf52 (patch) | |
tree | f9b16f770aa63efad5bf02bbfd7bb85d3a1076b2 /include/net/xfrm.h | |
parent | f0fee529f3b89d49e01e883c7c78e112ac8943b1 (diff) |
BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr
Provide compat_xfrm_userpolicy_info translation for xfrm setsocketopt().
Reallocate buffer and put the missing padding for 64-bit message.
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 96392ee5a13b992563cfe07d23ee30d333b89126)
[adelva: Edited around removed compat check in Android kernels]
Bug: 163141236
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I32a6495cd92fa13c956fca88aa5d80716155b8ae
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r-- | include/net/xfrm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index b75b69b255f5..0f9cdfb77f91 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1837,6 +1837,9 @@ struct xfrm_translator { struct nlmsghdr *(*rcv_msg_compat)(const struct nlmsghdr *nlh, int maxtype, const struct nla_policy *policy); + /* Translate 32-bit user_policy from sockptr */ + int (*xlate_user_policy_sockptr)(u8 **pdata32, int optlen); + struct module *owner; }; |