netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Yaron Galula <ygalula@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: Hook on non standard protocol families
Date: Tue, 16 Dec 2014 09:19:48 +0100	[thread overview]
Message-ID: <20141216081948.GA24756@breakpoint.cc> (raw)
In-Reply-To: <CAHL=LFCW6aTm-qBm6T17p7eXAkYDNJcmXA+dG0kuK+-ry5RCPA@mail.gmail.com>

Yaron Galula <ygalula@gmail.com> wrote:
> I'd like to try and hook some non standard protocol families, such as
> PF_CAN for example.
>
> Is that possible?

No.

> I have tried using nf_register_hook() with NFPROTO_UNSPEC hoping it
> will act as a wildcard, but the module I have built and loaded does
> not seem to be in use (it does work when I replace NFPROTO_UNSPEC with
> PF_INET).

Sure, because ipv4 core calls that via NF_HOOK() at various places.

> I would really appreciate your help in making this work.

At the very least you need to change the CAN core to call
netfilter hooks at the right places.

Look at ipv4 or ipv6 as a template.

      reply	other threads:[~2014-12-16  8:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  8:13 Hook on non standard protocol families Yaron Galula
2014-12-16  8:19 ` Florian Westphal [this message]

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=20141216081948.GA24756@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=ygalula@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).