Skip to content

Commit 3bf7fcf

Browse files
ruijieli51gregkh
authored andcommitted
xfrm: provide message size for XFRM_MSG_MAPPING
commit 2846522 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 964eeb5 commit 3bf7fcf

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
@@ -3235,6 +3235,7 @@ const int xfrm_msg_min[XFRM_NR_MSGTYPES] = {
32353235
[XFRM_MSG_GETSADINFO - XFRM_MSG_BASE] = sizeof(u32),
32363236
[XFRM_MSG_NEWSPDINFO - XFRM_MSG_BASE] = sizeof(u32),
32373237
[XFRM_MSG_GETSPDINFO - XFRM_MSG_BASE] = sizeof(u32),
3238+
[XFRM_MSG_MAPPING - XFRM_MSG_BASE] = XMSGSIZE(xfrm_user_mapping),
32383239
[XFRM_MSG_SETDEFAULT - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_default),
32393240
[XFRM_MSG_GETDEFAULT - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_default),
32403241
};

0 commit comments

Comments
 (0)