Skip to content

Commit eb6c59b

Browse files
Anastasia Belovaklassert
authored andcommitted
xfrm: compat: change expression for switch in xfrm_xlate64
Compare XFRM_MSG_NEWSPDINFO (value from netlink configuration messages enum) with nlh_src->nlmsg_type instead of nlh_src->nlmsg_type - XFRM_MSG_BASE. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 4e95050 ("net/xfrm/compat: Copy xfrm_spdattr_type_t atributes") Signed-off-by: Anastasia Belova <[email protected]> Acked-by: Dmitry Safonov <[email protected]> Tested-by: Dmitry Safonov <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent b0355db commit eb6c59b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/xfrm/xfrm_compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static int xfrm_xlate64(struct sk_buff *dst, const struct nlmsghdr *nlh_src)
302302
nla_for_each_attr(nla, attrs, len, remaining) {
303303
int err;
304304

305-
switch (type) {
305+
switch (nlh_src->nlmsg_type) {
306306
case XFRM_MSG_NEWSPDINFO:
307307
err = xfrm_nla_cpy(dst, nla, nla_len(nla));
308308
break;

0 commit comments

Comments
 (0)