Skip to content

Commit 7b72112

Browse files
Florian Westphaljrjohansen
authored andcommitted
apparmor: remove unneeded one-line hook wrappers
Use the common function directly. Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: John Johansen <[email protected]>
1 parent f4a2d28 commit 7b72112

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

security/apparmor/lsm.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,32 +1763,16 @@ static unsigned int apparmor_ip_postroute(void *priv,
17631763

17641764
}
17651765

1766-
static unsigned int apparmor_ipv4_postroute(void *priv,
1767-
struct sk_buff *skb,
1768-
const struct nf_hook_state *state)
1769-
{
1770-
return apparmor_ip_postroute(priv, skb, state);
1771-
}
1772-
1773-
#if IS_ENABLED(CONFIG_IPV6)
1774-
static unsigned int apparmor_ipv6_postroute(void *priv,
1775-
struct sk_buff *skb,
1776-
const struct nf_hook_state *state)
1777-
{
1778-
return apparmor_ip_postroute(priv, skb, state);
1779-
}
1780-
#endif
1781-
17821766
static const struct nf_hook_ops apparmor_nf_ops[] = {
17831767
{
1784-
.hook = apparmor_ipv4_postroute,
1768+
.hook = apparmor_ip_postroute,
17851769
.pf = NFPROTO_IPV4,
17861770
.hooknum = NF_INET_POST_ROUTING,
17871771
.priority = NF_IP_PRI_SELINUX_FIRST,
17881772
},
17891773
#if IS_ENABLED(CONFIG_IPV6)
17901774
{
1791-
.hook = apparmor_ipv6_postroute,
1775+
.hook = apparmor_ip_postroute,
17921776
.pf = NFPROTO_IPV6,
17931777
.hooknum = NF_INET_POST_ROUTING,
17941778
.priority = NF_IP6_PRI_SELINUX_FIRST,

0 commit comments

Comments
 (0)