diff options
author | Manish Katiyar <mkatiyar@gmail.com> | 2008-10-30 10:44:48 -0400 |
---|---|---|
committer | Paul Moore <paul.moore@hp.com> | 2008-10-30 10:44:48 -0400 |
commit | 47b676c0e03dcfd88de91f6f24a06653cfdf32af (patch) | |
tree | 30c7400d784109845af731891ff22fc10461c9bb /net/netlabel/netlabel_addrlist.h | |
parent | f8a024796b2bbec3d1a4ad5aae6173cfb18226b4 (diff) |
netlabel: Fix compilation warnings in net/netlabel/netlabel_addrlist.c
Enable netlabel auditing functions only when CONFIG_AUDIT is set
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: Paul Moore <paul.moore@hp.com>
Diffstat (limited to 'net/netlabel/netlabel_addrlist.h')
-rw-r--r-- | net/netlabel/netlabel_addrlist.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h index 0242bead405f..07ae7fd82be1 100644 --- a/net/netlabel/netlabel_addrlist.h +++ b/net/netlabel/netlabel_addrlist.h | |||
@@ -120,9 +120,19 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr, | |||
120 | struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr, | 120 | struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr, |
121 | __be32 mask, | 121 | __be32 mask, |
122 | struct list_head *head); | 122 | struct list_head *head); |
123 | |||
124 | #ifdef CONFIG_AUDIT | ||
123 | void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, | 125 | void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, |
124 | int src, const char *dev, | 126 | int src, const char *dev, |
125 | __be32 addr, __be32 mask); | 127 | __be32 addr, __be32 mask); |
128 | #else | ||
129 | static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, | ||
130 | int src, const char *dev, | ||
131 | __be32 addr, __be32 mask) | ||
132 | { | ||
133 | return; | ||
134 | } | ||
135 | #endif | ||
126 | 136 | ||
127 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 137 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
128 | 138 | ||
@@ -179,11 +189,23 @@ struct netlbl_af6list *netlbl_af6list_search(const struct in6_addr *addr, | |||
179 | struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr, | 189 | struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr, |
180 | const struct in6_addr *mask, | 190 | const struct in6_addr *mask, |
181 | struct list_head *head); | 191 | struct list_head *head); |
192 | |||
193 | #ifdef CONFIG_AUDIT | ||
182 | void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf, | 194 | void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf, |
183 | int src, | 195 | int src, |
184 | const char *dev, | 196 | const char *dev, |
185 | const struct in6_addr *addr, | 197 | const struct in6_addr *addr, |
186 | const struct in6_addr *mask); | 198 | const struct in6_addr *mask); |
199 | #else | ||
200 | static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf, | ||
201 | int src, | ||
202 | const char *dev, | ||
203 | const struct in6_addr *addr, | ||
204 | const struct in6_addr *mask) | ||
205 | { | ||
206 | return; | ||
207 | } | ||
208 | #endif | ||
187 | #endif /* IPV6 */ | 209 | #endif /* IPV6 */ |
188 | 210 | ||
189 | #endif | 211 | #endif |