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 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html