mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
Fix incorrect type in assignment of ipv6 port for audit
[ Upstream commit a5cd1ab7ab ]
Remove inappropriate use of ntohs() and assign the
port value directly.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
012c572007
commit
f038185b6a
@@ -2506,7 +2506,7 @@ static int smk_ipv6_check(struct smack_known *subject,
|
|||||||
#ifdef CONFIG_AUDIT
|
#ifdef CONFIG_AUDIT
|
||||||
smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net);
|
smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net);
|
||||||
ad.a.u.net->family = PF_INET6;
|
ad.a.u.net->family = PF_INET6;
|
||||||
ad.a.u.net->dport = ntohs(address->sin6_port);
|
ad.a.u.net->dport = address->sin6_port;
|
||||||
if (act == SMK_RECEIVING)
|
if (act == SMK_RECEIVING)
|
||||||
ad.a.u.net->v6info.saddr = address->sin6_addr;
|
ad.a.u.net->v6info.saddr = address->sin6_addr;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user