]> Git Repo - linux.git/commitdiff
apparmor: Fix warning about unused function apparmor_ipv6_postroute
authorPetr Vorel <[email protected]>
Mon, 12 Nov 2018 10:59:12 +0000 (11:59 +0100)
committerJohn Johansen <[email protected]>
Wed, 14 Nov 2018 19:42:18 +0000 (11:42 -0800)
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: Jordan Glover <[email protected]>
Tested-by: Jordan Glover <[email protected]>
Signed-off-by: Petr Vorel <[email protected]>
Signed-off-by: John Johansen <[email protected]>
security/apparmor/lsm.c

index 42446a216f3bcfccfe2b0f099f4fa044c1efe6da..7d1eeb0849687e236faf3eec29c009cc065bc2d9 100644 (file)
@@ -1598,12 +1598,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv,
        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[] = {
        {
This page took 0.059798 seconds and 4 git commands to generate.