From: Antonio Quartulli <antonio@open-mesh.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: "David S. Miller" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Using skb->mark outside netfilter
Date: Tue, 7 May 2013 15:23:26 +0200 [thread overview]
Message-ID: <20130507132326.GB2729@open-mesh.com> (raw)
In-Reply-To: <5188FBD2.5090200@mojatatu.com>
[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]
Hi Jamal,
On Tue, May 07, 2013 at 06:04:18 -0700, Jamal Hadi Salim wrote:
> On 13-05-06 02:48 PM, Antonio Quartulli wrote:
>
> >
> > Now to extend this mechanism network-wide (remember that the use case is a Layer2
> > mesh network set up with batman-adv) I'm going to introduce a mechanism in
> > batman-adv itself which is supposed to read and write the skb->mark field
> > so that the value contained when the packet is leaving one end can be restored
> > later on the other end of the intra-mesh communication (only if it matches a pre
> > configured one).
> > This would allow the remote node to perform the same filtering
> > operation as if the packet was locally generated.
> >
>
> Nice idea.
> How do you encode the mark in the batman header?
The mark is not really encoded in the batman header.
Each node is configured with a mark value (the values have to be the same on
everynode in order to make the mechanism work correctly), then batman-adv will
advertise to the rest of the mesh which host is sending marked packets.
Receiving nodes will then restore the mark in the skb each time it is coming from
one of those advertised hosts.
A future feature may consists in carrying the mark directly into the header so
that batman-adv itself does not have to take care about the meaning of such
value but will just carry it (we still have to think about it...it is just an
idea now)
> >
> > To clarify the idea, here you have an ascii art representing a possible setup
> > and how the mark will be read and set:
>
> Looks sane to me.
>
Thanks a lot!
I will use it :)
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-05-07 13:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 17:41 [PATCH 0/3] bridge: implement restricted forwarding policy Antonio Quartulli
2013-04-08 17:41 ` [PATCH 1/3] if.h: add IFF_BRIDGE_RESTRICTED flag Antonio Quartulli
2013-04-08 18:58 ` Stephen Hemminger
2013-04-09 6:33 ` Antonio Quartulli
2013-04-09 7:56 ` Antonio Quartulli
2013-04-09 12:57 ` Jamal Hadi Salim
2013-04-09 13:51 ` Antonio Quartulli
2013-04-09 15:49 ` Jamal Hadi Salim
2013-04-10 16:54 ` Antonio Quartulli
2013-04-10 20:46 ` Stephen Hemminger
2013-04-11 10:56 ` Antonio Quartulli
2013-04-11 11:03 ` Jamal Hadi Salim
2013-04-08 17:41 ` [PATCH 2/3] sk_buff: add bridge_restricted flag Antonio Quartulli
2013-04-08 17:41 ` [PATCH 3/3] bridge: implement restricted port forwarding policy Antonio Quartulli
2013-05-06 18:48 ` Using skb->mark outside netfilter (was: [PATCH 0/3] bridge: implement restricted forwarding policy) Antonio Quartulli
2013-05-07 13:04 ` Using skb->mark outside netfilter Jamal Hadi Salim
2013-05-07 13:23 ` Antonio Quartulli [this message]
2013-05-07 13:30 ` Jamal Hadi Salim
2013-05-07 14:17 ` Antonio Quartulli
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=20130507132326.GB2729@open-mesh.com \
--to=antonio@open-mesh.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=netdev@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 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).