diff options
| author | Petr Vorel <pvorel@suse.cz> | 2018-11-12 05:59:12 -0500 |
|---|---|---|
| committer | John Johansen <john.johansen@canonical.com> | 2019-02-01 07:12:57 -0500 |
| commit | a1a02062ad466052a34a8c4323143ccf9726eb52 (patch) | |
| tree | 415a53e262e76721ce6e0e5077fa310ea2252a40 | |
| parent | f17b5f06cb92ef2250513a1e154c47b78df07d40 (diff) | |
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>
| -rw-r--r-- | security/apparmor/lsm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 2c010874329f..8db1731d046a 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c | |||
| @@ -1599,12 +1599,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv, | |||
| 1599 | return apparmor_ip_postroute(priv, skb, state); | 1599 | return apparmor_ip_postroute(priv, skb, state); |
| 1600 | } | 1600 | } |
| 1601 | 1601 | ||
| 1602 | #if IS_ENABLED(CONFIG_IPV6) | ||
| 1602 | static unsigned int apparmor_ipv6_postroute(void *priv, | 1603 | static unsigned int apparmor_ipv6_postroute(void *priv, |
| 1603 | struct sk_buff *skb, | 1604 | struct sk_buff *skb, |
| 1604 | const struct nf_hook_state *state) | 1605 | const struct nf_hook_state *state) |
| 1605 | { | 1606 | { |
| 1606 | return apparmor_ip_postroute(priv, skb, state); | 1607 | return apparmor_ip_postroute(priv, skb, state); |
| 1607 | } | 1608 | } |
| 1609 | #endif | ||
| 1608 | 1610 | ||
| 1609 | static const struct nf_hook_ops apparmor_nf_ops[] = { | 1611 | static const struct nf_hook_ops apparmor_nf_ops[] = { |
| 1610 | { | 1612 | { |
