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:
Родитель
6830c25b7d
Коммит
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)
|
||||
{
|
||||
return *(__be64 *) nla_data(nla);
|
||||
__be64 tmp;
|
||||
|
||||
nla_memcpy(&tmp, nla, sizeof(tmp));
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче