1
0
Fork 0

selinux: constify nf_hook_ops

nf_hook_ops are not supposed to change at runtime. nf_register_net_hooks
and nf_unregister_net_hooks are working with const nf_hook_ops.
So mark the non-const nf_hook_ops structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
hifive-unleashed-5.1
Arvind Yadav 2017-08-26 16:17:35 +05:30 committed by Paul Moore
parent 901ef845fa
commit 0c3014f22d
1 changed files with 1 additions and 1 deletions

View File

@ -6550,7 +6550,7 @@ security_initcall(selinux_init);
#if defined(CONFIG_NETFILTER)
static struct nf_hook_ops selinux_nf_ops[] = {
static const struct nf_hook_ops selinux_nf_ops[] = {
{
.hook = selinux_ipv4_postroute,
.pf = NFPROTO_IPV4,