Commit 43aa09fe authored by Petr Vorel's avatar Petr Vorel Committed by John Johansen

apparmor: Fix warning about unused function apparmor_ipv6_postroute

when compiled without CONFIG_IPV6:
security/apparmor/lsm.c:1601:21: warning: ‘apparmor_ipv6_postroute’ defined but not used [-Wunused-function]
 static unsigned int apparmor_ipv6_postroute(void *priv,
                     ^~~~~~~~~~~~~~~~~~~~~~~
Reported-by: default avatarJordan Glover <Golden_Miller83@protonmail.ch>
Tested-by: default avatarJordan Glover <Golden_Miller83@protonmail.ch>
Signed-off-by: default avatarPetr Vorel <pvorel@suse.cz>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 5f215853
...@@ -1598,12 +1598,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv, ...@@ -1598,12 +1598,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv,
return apparmor_ip_postroute(priv, skb, state); return apparmor_ip_postroute(priv, skb, state);
} }
#if IS_ENABLED(CONFIG_IPV6)
static unsigned int apparmor_ipv6_postroute(void *priv, static unsigned int apparmor_ipv6_postroute(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state) const struct nf_hook_state *state)
{ {
return apparmor_ip_postroute(priv, skb, 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[] = {
{ {
......
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