diff options
author | Florian Westphal <fw@strlen.de> | 2021-10-11 16:38:54 +0200 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2021-11-03 23:57:47 +0100 |
commit | 7b7211243afa1058b0f10bae7bd14d562f9767ca (patch) | |
tree | 98e3834b84bf86276fdd3c88ca5bbdc370fb3cf6 /security | |
parent | apparmor: Use struct_size() helper in kzalloc() (diff) | |
download | linux-7b7211243afa1058b0f10bae7bd14d562f9767ca.tar.xz linux-7b7211243afa1058b0f10bae7bd14d562f9767ca.zip |
apparmor: remove unneeded one-line hook wrappers
Use the common function directly.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/lsm.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 64d6020ffd50..13c2f76bd1f7 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -1763,32 +1763,16 @@ static unsigned int apparmor_ip_postroute(void *priv, } -static unsigned int apparmor_ipv4_postroute(void *priv, - struct sk_buff *skb, - const struct nf_hook_state *state) -{ - return apparmor_ip_postroute(priv, skb, state); -} - -#if IS_ENABLED(CONFIG_IPV6) -static unsigned int apparmor_ipv6_postroute(void *priv, - struct sk_buff *skb, - const struct nf_hook_state *state) -{ - return apparmor_ip_postroute(priv, skb, state); -} -#endif - static const struct nf_hook_ops apparmor_nf_ops[] = { { - .hook = apparmor_ipv4_postroute, + .hook = apparmor_ip_postroute, .pf = NFPROTO_IPV4, .hooknum = NF_INET_POST_ROUTING, .priority = NF_IP_PRI_SELINUX_FIRST, }, #if IS_ENABLED(CONFIG_IPV6) { - .hook = apparmor_ipv6_postroute, + .hook = apparmor_ip_postroute, .pf = NFPROTO_IPV6, .hooknum = NF_INET_POST_ROUTING, .priority = NF_IP6_PRI_SELINUX_FIRST, |