[apparmor] [PATCH 1/1] apparmor: Fix warning about unused function apparmor_ipv6_postroute
John Johansen
john.johansen at canonical.com
Wed Nov 14 18:04:54 UTC 2018
On 11/12/18 2:59 AM, Petr Vorel wrote:
> 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,
> ^~~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Petr Vorel <pvorel at suse.cz>
thanks Petr, and Jordan, I have pulled this into apparmor-next and will push it up
> ---
> security/apparmor/lsm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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,
> 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[] = {
> {
>
More information about the AppArmor
mailing list