From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 3/7] netfilter: ctnetlink: cleanup message building and size calculation
Date: Tue, 02 Jun 2009 16:49:05 +0200 [thread overview]
Message-ID: <4A253BE1.9090006@netfilter.org> (raw)
In-Reply-To: <4A252506.9050604@trash.net>
Patrick McHardy wrote:
> Pablo Neira Ayuso wrote:
>> This patch is a cleanup. It removes unneeded verbose information
>> about the size calculation and it also replaces the old macros
>> to build Netlink messages with the new nlmsg_*() helper functions.
>
> This one is really hard to review because of the mixed renames
> and code movals. Please split this into two patches.
OK, I'm splitting them now.
>> diff --git a/include/net/netfilter/nf_conntrack.h
>> b/include/net/netfilter/nf_conntrack.h
>> index 6c3f964..9aafe70 100644
>> --- a/include/net/netfilter/nf_conntrack.h
>> +++ b/include/net/netfilter/nf_conntrack.h
>> @@ -144,6 +144,12 @@ static inline u_int8_t nf_ct_protonum(const
>> struct nf_conn *ct)
>> return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum;
>> }
>>
>> +static inline const struct nf_conntrack_tuple *
>> +nf_ct_tuple(const struct nf_conn *ct, enum ip_conntrack_dir dir)
>> +{
>> + return &ct->tuplehash[dir].tuple;
>> +}
>
> This is a useful helper for other situations as well, so I think
> it shouldn't be const.
I get:
net/netfilter/nf_conntrack_netlink.c:370: warning: passing argument 1 of
'nf_ct_tuple' discards qualifiers from pointer target type
net/netfilter/nf_conntrack_netlink.c:377: warning: passing argument 1 of
'nf_ct_tuple' discards qualifiers from pointer target type
So I have to remove the 'const' from the last parameter of
ctnetlink_fill_info().
Or do some ugly casting in the nf_ct_tuple() calls to avoid the warning,
in that case I would prefer to leave that macro there.
Please, let me know what you prefer.
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2009-06-02 14:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 11:51 [PATCH 0/7] Netfilter updates for nf-next tree (2.6.31) Pablo Neira Ayuso
2009-06-02 11:51 ` [PATCH 1/7] netfilter: nfnetlink: cleanup for nfnetlink_rcv_msg() function Pablo Neira Ayuso
2009-06-02 11:52 ` [PATCH 2/7] netfilter: ctnetlink: remove nowait parameter from *fill_info() Pablo Neira Ayuso
2009-06-02 11:52 ` [PATCH 3/7] netfilter: ctnetlink: cleanup message building and size calculation Pablo Neira Ayuso
2009-06-02 13:11 ` Patrick McHardy
2009-06-02 14:49 ` Pablo Neira Ayuso [this message]
2009-06-02 14:52 ` Patrick McHardy
2009-06-02 11:52 ` [PATCH 4/7] netfilter: conntrack: don't report events on module removal Pablo Neira Ayuso
2009-06-02 11:53 ` [PATCH 5/7] netfilter: conntrack: remove events flags from userspace exposed file Pablo Neira Ayuso
2009-06-02 11:53 ` [PATCH 6/7] netfilter: conntrack: simplify event caching system Pablo Neira Ayuso
2009-06-02 11:54 ` [PATCH 7/7] netfilter: conntrack: replace notify chain by function pointer Pablo Neira Ayuso
2009-06-02 12:54 ` [PATCH 0/7] Netfilter updates for nf-next tree (2.6.31) Patrick McHardy
2009-06-02 14:43 ` Pablo Neira Ayuso
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=4A253BE1.9090006@netfilter.org \
--to=pablo@netfilter.org \
--cc=kaber@trash.net \
--cc=netfilter-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.