From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: 02/13 [NETFILTER]: Use unsigned types for hooknum and pf vars
Date: Mon, 14 Jul 2008 15:26:16 +0200 [thread overview]
Message-ID: <487B53F8.5080006@trash.net> (raw)
In-Reply-To: <alpine.LNX.1.10.0807101524070.27323@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
> commit ffffffffffffffffffffffffffffffffffffffff
> Author: Jan Engelhardt <jengelh@medozas.de>
> Date: Sat Apr 12 08:24:12 2008 +0200
>
> [NETFILTER]: Use unsigned types for hooknum and pf vars
>
> and (try to) consistently use u_int8_t for the L3 family.
>
> +extern struct xt_match *xt_find_match(u_int8_t af, const char *name,
> + u8 revision);
It would have been cleaner to at least consistently use u_int8_t/u8
within one function. Alternatively I'd prefer the u8 type since
people usually use that in new patches, so over time we'd get rid
of the type inconsistencies.
> diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h
> index a6874ba..55dd1c2 100644
> --- a/include/net/netfilter/nf_conntrack_tuple.h
> +++ b/include/net/netfilter/nf_conntrack_tuple.h
> @@ -37,7 +37,12 @@ union nf_conntrack_man_proto
> __be16 port;
> } udp;
> struct {
> - __be16 id;
> + union {
> + __be16 id;
> + struct {
> + __u8 type, code;
This is not exposed to userspace, so there's no need to
use the __ types.
> /* These are the parts of the tuple which are fixed. */
> struct {
> union nf_inet_addr u3;
> - union {
> - /* Add other protocols here. */
> - __be16 all;
> -
> - struct {
> - __be16 port;
> - } tcp;
> - struct {
> - __be16 port;
> - } udp;
> - struct {
> - u_int8_t type, code;
> - } icmp;
> - struct {
> - __be16 port;
> - } dccp;
> - struct {
> - __be16 port;
> - } sctp;
> - struct {
> - __be16 key;
> - } gre;
> - } u;
> + union nf_conntrack_man_proto u;
This is an unrelated change that doesn't belong in this patch.
Not that I'm opposed to the change, but the "man" part in the
name stands for manipulable, which doesn't fit here.
next prev parent reply other threads:[~2008-07-14 13:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 13:24 [NETFILTER 01/13]: Collapse tcpmss_reverse_mtu{4,6} into one function Jan Engelhardt
2008-07-10 13:24 ` 02/13 [NETFILTER]: Use unsigned types for hooknum and pf vars Jan Engelhardt
2008-07-14 13:26 ` Patrick McHardy [this message]
2008-07-15 8:17 ` Jan Engelhardt
2008-07-15 9:55 ` Patrick McHardy
2008-07-10 13:24 ` 03/13 [NETFILTER]: Rename ipt_recent to xt_recent Jan Engelhardt
2008-07-10 13:25 ` 04/14 [NETFILTER]: xt_recent: IPv6 support Jan Engelhardt
2008-07-14 13:28 ` Patrick McHardy
2008-07-10 13:25 ` 05/13 [NETFILTER]: xt_recent: make old proc interface configurable Jan Engelhardt
2008-07-14 13:30 ` Patrick McHardy
2008-07-10 13:26 ` 06/13 [NETFILTER]: xt_length match, revision 1 Jan Engelhardt
2008-07-10 13:26 ` 07/13 [NETFILTER]: Introduce NFPROTO_* constants Jan Engelhardt
2008-07-14 13:31 ` Patrick McHardy
2008-07-23 9:34 ` Jan Engelhardt
2008-07-23 10:14 ` Patrick McHardy
2008-07-10 13:26 ` 08/13 [NETFILTER]: Use NFPROTO_* in extensions Jan Engelhardt
2008-07-10 13:26 ` 09/13 [NETFILTER]: Implement NFPROTO_UNSPEC as a wildcard for extensions Jan Engelhardt
2008-07-10 13:28 ` 11/13 [NETFILTER]: Make Ebtables use Xtables infrastructure Jan Engelhardt
2008-07-10 16:28 ` Bart De Schuymer
2008-07-10 13:28 ` 12/13 [NETFILTER]: Move ARPREPLY to net/netfilter/ and make it usable from arp_tables Jan Engelhardt
2008-07-10 13:28 ` 13/13 [NETFILTER]: Make BRIDGE_NF_EBTABLES a menuconfig option Jan Engelhardt
2008-07-10 13:29 ` 10/13 [NETFILTER]: Give AF-independent extensions an arpt_ aliases Jan Engelhardt
2008-07-14 13:38 ` Patrick McHardy
2008-07-14 13:13 ` [NETFILTER 01/13]: Collapse tcpmss_reverse_mtu{4,6} into one function Patrick McHardy
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=487B53F8.5080006@trash.net \
--to=kaber@trash.net \
--cc=jengelh@medozas.de \
--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.