From: Paul Moore <paul.moore@hp.com>
To: "Manish Katiyar" <mkatiyar@gmail.com>
Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
Date: Thu, 30 Oct 2008 09:39:59 -0400 [thread overview]
Message-ID: <200810300939.59145.paul.moore@hp.com> (raw)
In-Reply-To: <ea11fea30810300633m5a99d4a1k9c0b9a2aa241ecb1@mail.gmail.com>
On Thursday 30 October 2008 9:33:55 am Manish Katiyar wrote:
> Hi Paul,
>
> Below is the updated patch.
>
> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Thanks a lot, I'll apply this and send a pull request later today.
> ---
> net/netlabel/netlabel_addrlist.c | 2 ++
> net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
> 2 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/net/netlabel/netlabel_addrlist.c
> b/net/netlabel/netlabel_addrlist.c index b0925a3..249f6b9 100644
> --- a/net/netlabel/netlabel_addrlist.c
> +++ b/net/netlabel/netlabel_addrlist.c
> @@ -315,6 +315,7 @@ struct netlbl_af6list
> *netlbl_af6list_remove(const struct in6_addr *addr,
> * Audit Helper Functions
> */
>
> +#ifdef CONFIG_AUDIT
> /**
> * netlbl_af4list_audit_addr - Audit an IPv4 address
> * @audit_buf: audit buffer
> @@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct
> audit_buffer *audit_buf,
> }
> }
> #endif /* IPv6 */
> +#endif /* CONFIG_AUDIT */
> diff --git a/net/netlabel/netlabel_addrlist.h
> b/net/netlabel/netlabel_addrlist.h index 0242bea..3212965 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, struct netlbl_af4list
> *netlbl_af4list_search_exact(__be32 addr, __be32 mask,
> struct list_head *head);
> +
> +#ifdef CONFIG_AUDIT
> void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
> int src, const char *dev,
> __be32 addr, __be32 mask);
> +#else
> +static inline void netlbl_af4list_audit_addr(struct audit_buffer
> *audit_buf, + int src, const char *dev,
> + __be32 addr, __be32 mask)
> +{
> + return;
> +}
> +#endif
>
> #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
>
> @@ -179,11 +189,23 @@ struct netlbl_af6list
> *netlbl_af6list_search(const struct in6_addr *addr,
> struct netlbl_af6list *netlbl_af6list_search_exact(const struct
> in6_addr *addr, const struct in6_addr *mask,
> struct list_head *head);
> +
> +#ifdef CONFIG_AUDIT
> void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
> int src,
> const char *dev,
> const struct in6_addr *addr,
> const struct in6_addr *mask);
> +#else
> +static inline void netlbl_af6list_audit_addr(struct audit_buffer
> *audit_buf, + int src,
> + const char *dev,
> + const struct in6_addr *addr,
> + const struct in6_addr *mask)
> +{
> + return;
> +}
> +#endif
> #endif /* IPV6 */
>
> #endif
--
paul moore
linux @ hp
prev parent reply other threads:[~2008-10-30 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 8:06 [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c Manish Katiyar
2008-10-29 13:49 ` Paul Moore
[not found] ` <ea11fea30810290818p2ae6c11eo5e38baf631867fb1@mail.gmail.com>
[not found] ` <200810291135.25056.paul.moore@hp.com>
2008-10-29 18:27 ` Manish Katiyar
[not found] ` <200810291543.49225.paul.moore@hp.com>
2008-10-30 2:10 ` Manish Katiyar
2008-10-30 12:12 ` Paul Moore
2008-10-30 13:33 ` Manish Katiyar
2008-10-30 13:39 ` Paul Moore [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200810300939.59145.paul.moore@hp.com \
--to=paul.moore@hp.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=mkatiyar@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).