aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vorel <pvorel@suse.cz>2018-11-12 05:59:12 -0500
committerJohn Johansen <john.johansen@canonical.com>2018-11-14 14:42:18 -0500
commit43aa09fee2f08c8d90a4f35d4c8c711362afcaee (patch)
treef375cb7b3f62f3dca92dc5c43ff1814d97f5c35a
parent5f21585384a4a69b8bfdd2cae7e3648ae805f57d (diff)
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: Jordan Glover <Golden_Miller83@protonmail.ch> Tested-by: Jordan Glover <Golden_Miller83@protonmail.ch> Signed-off-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: John Johansen <john.johansen@canonical.com>
-rw-r--r--security/apparmor/lsm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 42446a216f3b..7d1eeb084968 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -1598,12 +1598,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv,
1598 return apparmor_ip_postroute(priv, skb, state); 1598 return apparmor_ip_postroute(priv, skb, state);
1599} 1599}
1600 1600
1601#if IS_ENABLED(CONFIG_IPV6)
1601static unsigned int apparmor_ipv6_postroute(void *priv, 1602static unsigned int apparmor_ipv6_postroute(void *priv,
1602 struct sk_buff *skb, 1603 struct sk_buff *skb,
1603 const struct nf_hook_state *state) 1604 const struct nf_hook_state *state)
1604{ 1605{
1605 return apparmor_ip_postroute(priv, skb, state); 1606 return apparmor_ip_postroute(priv, skb, state);
1606} 1607}
1608#endif
1607 1609
1608static const struct nf_hook_ops apparmor_nf_ops[] = { 1610static const struct nf_hook_ops apparmor_nf_ops[] = {
1609 { 1611 {