Commit 0c3014f2 authored by Arvind Yadav's avatar Arvind Yadav Committed by Paul Moore

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 901ef845
...@@ -6550,7 +6550,7 @@ security_initcall(selinux_init); ...@@ -6550,7 +6550,7 @@ security_initcall(selinux_init);
#if defined(CONFIG_NETFILTER) #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, .hook = selinux_ipv4_postroute,
.pf = NFPROTO_IPV4, .pf = NFPROTO_IPV4,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment