Skip to content

Commit 2846522

Browse files
ruijieli51klassert
authored andcommitted
xfrm: provide message size for XFRM_MSG_MAPPING
The compat 64=>32 translation path handles XFRM_MSG_MAPPING, but xfrm_msg_min[] does not provide the native payload size for this message type. Add the missing XFRM_MSG_MAPPING entry so compat translation can size and translate mapping notifications correctly. Fixes: 5461fc0 ("xfrm/compat: Add 64=>32-bit messages translator") Cc: stable@kernel.org Reported-by: Yuan Tan <yuantan098@gmail.com> Reported-by: Yifan Wu <yifanwucs@gmail.com> Reported-by: Juefei Pu <tomapufckgml@gmail.com> Reported-by: Xin Liu <bird@lzu.edu.cn> Signed-off-by: Ruijie Li <ruijieli51@gmail.com> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
1 parent fa90a31 commit 2846522

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/xfrm/xfrm_user.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3323,6 +3323,7 @@ const int xfrm_msg_min[XFRM_NR_MSGTYPES] = {
33233323
[XFRM_MSG_GETSADINFO - XFRM_MSG_BASE] = sizeof(u32),
33243324
[XFRM_MSG_NEWSPDINFO - XFRM_MSG_BASE] = sizeof(u32),
33253325
[XFRM_MSG_GETSPDINFO - XFRM_MSG_BASE] = sizeof(u32),
3326+
[XFRM_MSG_MAPPING - XFRM_MSG_BASE] = XMSGSIZE(xfrm_user_mapping),
33263327
[XFRM_MSG_SETDEFAULT - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_default),
33273328
[XFRM_MSG_GETDEFAULT - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_default),
33283329
};

0 commit comments

Comments
 (0)