diff options
author | Casey Schaufler <casey@schaufler-ca.com> | 2022-02-28 15:45:32 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-15 14:14:54 +0200 |
commit | ef18110ca04d4b617502fae210f5a23bfe256840 (patch) | |
tree | edfd6b4cb3f41203a218bef295e1e775aa9b94c0 /security | |
parent | cff604b40ffa02076c0733247287fd24cba6d101 (diff) | |
download | linux-stable-ef18110ca04d4b617502fae210f5a23bfe256840.tar.gz linux-stable-ef18110ca04d4b617502fae210f5a23bfe256840.tar.bz2 linux-stable-ef18110ca04d4b617502fae210f5a23bfe256840.zip |
Fix incorrect type in assignment of ipv6 port for audit
[ Upstream commit a5cd1ab7ab679d252a6d2f483eee7d45ebf2040c ]
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>
Diffstat (limited to 'security')
-rw-r--r-- | security/smack/smack_lsm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 221de4c755c3..4f65d953fe31 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -2586,7 +2586,7 @@ static int smk_ipv6_check(struct smack_known *subject, #ifdef CONFIG_AUDIT smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); 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) ad.a.u.net->v6info.saddr = address->sin6_addr; else |