Linux Netfilter development
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jan Engelhardt <jengelh@medozas.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: fix arptable_filter wrong hook registering
Date: Thu, 16 Oct 2008 13:58:03 +0200	[thread overview]
Message-ID: <48F72C4B.6080509@trash.net> (raw)
In-Reply-To: <48F72BE8.80602@netfilter.org>

Pablo Neira Ayuso wrote:
> Patrick McHardy wrote:
>> Jan Engelhardt wrote:
>>> On Wednesday 2008-10-15 21:54, Pablo Neira Ayuso 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.)
>> I agree with Jan on this one, there doesn't seem to be a reason for
>> not using the NFPROTO constants consistently.
> 
> OK, then I think that it would make sense a minor cleanup for all the
> NF_HOOK to use NFPROTO_*? We can do this later.

Agreed. For now its only necessary for ARP though if I'm not mistaken.

> BTW, why are we using NFPROTO_ARP to 3? Just a convention I guess.

No specific reason AFAIK.

  reply	other threads:[~2008-10-16 11:58 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
2008-10-16 11:52       ` Patrick McHardy
2008-10-16 11:56         ` Pablo Neira Ayuso
2008-10-16 11:58           ` Patrick McHardy [this message]
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=48F72C4B.6080509@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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