Commit 7b721124 authored by Florian Westphal's avatar Florian Westphal Committed by John Johansen

apparmor: remove unneeded one-line hook wrappers

Use the common function directly.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent f4a2d282
...@@ -1763,32 +1763,16 @@ static unsigned int apparmor_ip_postroute(void *priv, ...@@ -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[] = { static const struct nf_hook_ops apparmor_nf_ops[] = {
{ {
.hook = apparmor_ipv4_postroute, .hook = apparmor_ip_postroute,
.pf = NFPROTO_IPV4, .pf = NFPROTO_IPV4,
.hooknum = NF_INET_POST_ROUTING, .hooknum = NF_INET_POST_ROUTING,
.priority = NF_IP_PRI_SELINUX_FIRST, .priority = NF_IP_PRI_SELINUX_FIRST,
}, },
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
{ {
.hook = apparmor_ipv6_postroute, .hook = apparmor_ip_postroute,
.pf = NFPROTO_IPV6, .pf = NFPROTO_IPV6,
.hooknum = NF_INET_POST_ROUTING, .hooknum = NF_INET_POST_ROUTING,
.priority = NF_IP6_PRI_SELINUX_FIRST, .priority = NF_IP6_PRI_SELINUX_FIRST,
......
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