Skip to content

Commit a1a0206

Browse files
pevikjrjohansen
authored andcommitted
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>
1 parent f17b5f0 commit a1a0206

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

security/apparmor/lsm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,12 +1599,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv,
15991599
return apparmor_ip_postroute(priv, skb, state);
16001600
}
16011601

1602+
#if IS_ENABLED(CONFIG_IPV6)
16021603
static unsigned int apparmor_ipv6_postroute(void *priv,
16031604
struct sk_buff *skb,
16041605
const struct nf_hook_state *state)
16051606
{
16061607
return apparmor_ip_postroute(priv, skb, state);
16071608
}
1609+
#endif
16081610

16091611
static const struct nf_hook_ops apparmor_nf_ops[] = {
16101612
{

0 commit comments

Comments
 (0)