mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 17:06:26 +07:00
xfrm: fix XFRMA_MARK extraction in xfrm_mark_get
Determine the size of the xfrm_mark struct, not of its pointer. Signed-off-by: Andreas Steffen <andreas.steffen@strongswan.org> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d3ead2413c
commit
4efd7e8335
@ -1586,7 +1586,7 @@ static inline struct xfrm_state *xfrm_input_state(struct sk_buff *skb)
|
||||
static inline int xfrm_mark_get(struct nlattr **attrs, struct xfrm_mark *m)
|
||||
{
|
||||
if (attrs[XFRMA_MARK])
|
||||
memcpy(m, nla_data(attrs[XFRMA_MARK]), sizeof(m));
|
||||
memcpy(m, nla_data(attrs[XFRMA_MARK]), sizeof(struct xfrm_mark));
|
||||
else
|
||||
m->v = m->m = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user