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, ^~~~~~~~~~~~~~~~~~~~~~~
Unified · Split
| @@ -1598,12 +1598,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv, · 1597 unmodified lines | ||
| 1598 | 1598 | return apparmor_ip_postroute(priv, skb, state); |
| 1599 | 1599 | } |
| 1600 | 1600 | |
| 1601 | +#if IS_ENABLED(CONFIG_IPV6) | |
| 1601 | 1602 | static unsigned int apparmor_ipv6_postroute(void *priv, |
| 1602 | 1603 | struct sk_buff *skb, |
| 1603 | 1604 | const struct nf_hook_state *state) |
| 1604 | 1605 | { |
| 1605 | 1606 | return apparmor_ip_postroute(priv, skb, state); |
| 1606 | 1607 | } |
| 1608 | +#endif | |
| 1607 | 1609 | |
| 1608 | 1610 | static const struct nf_hook_ops apparmor_nf_ops[] = { |
| 1609 | 1611 | { |