Skip to contentSkip to conversation

xfrm: provide message size for XFRM_MSG_MAPPING

PATCH Applied Ren Wei 2 participants 2 messages Apr 28 – Apr 30 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Ren Wei

author
#1 lore raw

PATCH 1/1 xfrm: provide message size for XFRM_MSG_MAPPING

From: Ruijie Li <[email protected]>

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 5461fc0c8d9f ("xfrm/compat: Add 64=>32-bit messages translator")
---
 net/xfrm/xfrm_user.c | 1 +
 1 file changed, 1 insertion(+)
net/xfrm/xfrm_user.c +1 -0
index d56450f61669..38a90e5ee3d9 100644
@@ -3323,6 +3323,7 @@ const int xfrm_msg_min[XFRM_NR_MSGTYPES] = {
 	[XFRM_MSG_GETSADINFO  - XFRM_MSG_BASE] = sizeof(u32),
 	[XFRM_MSG_NEWSPDINFO  - XFRM_MSG_BASE] = sizeof(u32),
 	[XFRM_MSG_GETSPDINFO  - XFRM_MSG_BASE] = sizeof(u32),
+	[XFRM_MSG_MAPPING     - XFRM_MSG_BASE] = XMSGSIZE(xfrm_user_mapping),
 	[XFRM_MSG_SETDEFAULT  - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_default),
 	[XFRM_MSG_GETDEFAULT  - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_default),
 };
Signature · 1 line
2.34.1
maintainer Applied
#2 lore raw
Quoted 9 lines · Ren Wei

From: Ruijie Li <[email protected]>

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.

Quoted 8 lines
Fixes 5461fc0c8d9f ("xfrm/compat: Add 64=>32-bit messages translator")

Applied, thanks a lot!