All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net
Subject: Re: [PATCH] netfilter: fix arptable_filter wrong hook registering
Date: Thu, 16 Oct 2008 13:52:21 +0200	[thread overview]
Message-ID: <48F72AF5.5060000@netfilter.org> (raw)
In-Reply-To: <alpine.LNX.1.10.0810152201290.28060@fbirervta.pbzchgretzou.qr>

Jan Engelhardt wrote:
>>> Perhaps the following helps?
>> Yes, your patch will also work, but it introduces an inconsistency in
>> the naming used to register hooks in the family field.
> 
> No, not really. Netfilter Hooks are supposed to register with
> 	.pf = NFPROTO_FOO
> instead of
> 	.pf = PF_FOO
> because the nf_hooks list itself is indexed by nfproto numbers,
> not PF numbers:
> 
> struct list_head nf_hooks[NFPROTO_NUMPROTO][NF_MAX_HOOKS] __read_mostly; 
> 
> (The fact that there's still PF_ in the source is merely historical,
> and as you see, PF_foo == NFPROTO_foo for that exact reason.)

This makes sense, but then I think that a cleanup for all the NF_HOOK
calls in the net code to use NFPROTO_* instead of the family would be
interesting for consistency.

BTW, I think that the last chunk of your patch should be a different one
since it fixes NFQUEUE for arptables.

I don't mind about using your patch or mine, both works. Let's fix it,
that's all. Patrick, I leave this up to you.

-- 
"Los honestos son inadaptados sociales" -- Les Luthiers

  reply	other threads:[~2008-10-16 11:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16  1:24 [PATCH] netfilter: fix arptable_filter wrong hook registering Pablo Neira Ayuso
2008-10-16  1:41 ` Jan Engelhardt
2008-10-16  1:54   ` Pablo Neira Ayuso
2008-10-16  2:03     ` Jan Engelhardt
2008-10-16 11:52       ` Pablo Neira Ayuso [this message]
2008-10-16 11:52       ` Patrick McHardy
2008-10-16 11:56         ` Pablo Neira Ayuso
2008-10-16 11:58           ` Patrick McHardy
2008-10-17 14:20           ` Jan Engelhardt
2008-10-17 14:44             ` netfilter: use NFPROTO_* constants in NF_HOOK callsites Jan Engelhardt
2008-10-18 16:13               ` Patrick McHardy
2008-10-18 19:21                 ` Jan Engelhardt
2008-10-19 12:46                   ` Pablo Neira Ayuso
2008-10-17 14:44             ` netfilter: use NFPROTO_* constants in nf_hook_ops structures Jan Engelhardt
2008-10-20  9:54   ` [PATCH] netfilter: fix arptable_filter wrong hook registering 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=48F72AF5.5060000@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=jengelh@medozas.de \
    --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.