netlink: fix unaligned access in nla_get_be64()
This patch fixes a unaligned access in nla_get_be64() that was
introduced by myself in a17c859849
.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6830c25b7d
commit
f5d410f2ea
@@ -945,7 +945,11 @@ static inline u64 nla_get_u64(const struct nlattr *nla)
|
|||||||
*/
|
*/
|
||||||
static inline __be64 nla_get_be64(const struct nlattr *nla)
|
static inline __be64 nla_get_be64(const struct nlattr *nla)
|
||||||
{
|
{
|
||||||
return *(__be64 *) nla_data(nla);
|
__be64 tmp;
|
||||||
|
|
||||||
|
nla_memcpy(&tmp, nla, sizeof(tmp));
|
||||||
|
|
||||||
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user