All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel <daniel@dev-zone.org>
To: Patrick Schaaf <bof@bof.de>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: MAC address matching. Or other ideas.
Date: Mon, 12 May 2003 10:44:54 +1200	[thread overview]
Message-ID: <3EBED266.3050608@dev-zone.org> (raw)
In-Reply-To: <20030510105942.GB28426@oknodo.bof.de>

Thanks for your reply, I thought that there may be some issues with 
matching dst MAC addresses. You are right though that a better solution 
would be to base it on the gateways IP address. I would be happy to 
implement it myself, but I don't have any experience with C let alone 
kernel programming, though it would be cool to have something I wrote in 
the kernel. It you guys added a method to allow people to write perl 
modules then I would certainly contribute :).
If someone wants to/ has the time the time to implement such a match 
module then kudos to them, otherwise I will just have to find a 
different solution.

Thanks again for your help.
Daniel


Patrick Schaaf wrote:
>>Is it possible to get the MAC match module to match on dst MAC address 
>>rather than just src MAC?
> 
> 
> Not without much much work. The destination MAC is not known, generally,
> while the packet traverses the network stack; only on output, after
> a potentially long time waiting for an ARP reply, will a destination
> MAC be available for checking.
> 
> You could, maybe, be lucky to have it in the POSTROUTING table. But I
> doubt that.
> 
> 
>>So I want to be able to say only gimme traffic that is coming in and
>>out via gateway X, the only way I can figure to do that is by matching
>>the MAC address of the gateway,
> 
> 
> Why not the IP address of the gateway? That is known after routing,
> i.e. in both the INPUT and FORWARD chains, and a 'route' match
> is trivial to write, as far as I know. There is already a nice
> ROUTE target in patch-o-matic, such a route-match could A) be
> patterned after the target (take the same options), and it
> could B) look at the exact same structure (skb->dst) that the
> ROUTE target sets up. Nice mirror work.
> 
> If that's a solution for you, and you set out to implement it,
> just mail me if you have detail questions.
> 
> best regards
>   Patrick

      parent reply	other threads:[~2003-05-11 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-04 23:34 MAC address matching. Or other ideas Daniel
2003-05-10 10:59 ` Patrick Schaaf
2003-05-10 13:24   ` Maciej Soltysiak
2003-05-10 13:43     ` Patrick Schaaf
2003-05-11 22:44   ` Daniel [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=3EBED266.3050608@dev-zone.org \
    --to=daniel@dev-zone.org \
    --cc=bof@bof.de \
    --cc=netfilter-devel@lists.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 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.