Skip to content

Commit

Permalink
apparmor: Fix warning about unused function apparmor_ipv6_postroute
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Petr Vorel authored and John Johansen committed Feb 1, 2019
1 parent f17b5f0 commit a1a0206
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions security/apparmor/lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1599,12 +1599,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[] = {
{
Expand Down

0 comments on commit a1a0206

Please sign in to comment.