mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 23:24:11 +08:00
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>
This commit is contained in:
parent
5f21585384
commit
43aa09fee2
@ -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[] = {
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user