From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: "Greg Kroah-Hartman" <gregkh@suse.de>,
Andrew Lunn <andrew@lunn.ch>,
Marek Lindner <lindner_marek@yahoo.de>,
Simon Wunderlich <siwu@hrz.tu-chemnitz.de>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: batman-adv: design suggestions
Date: Sat, 14 Aug 2010 01:25:45 +0200 [thread overview]
Message-ID: <201008140125.47179.sven.eckelmann@gmx.de> (raw)
In-Reply-To: <20100813181833.GA5632@albatros>
[-- Attachment #1: Type: Text/Plain, Size: 1570 bytes --]
Vasiliy Kulikov wrote:
> On Tue, Aug 10, 2010 at 00:34 +0400, Vasiliy Kulikov wrote:
> > 2) It seems to me that NF_HOOK() at hard-interface.c:458 is misused:
> > ...
> >
> > ret = NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, dev, NULL,
> >
> > batman_skb_recv_finish);
> >
> > if (ret != 1)
> >
> > goto err_out;
> >
> > /* packet should hold at least type and version */
> > if (unlikely(skb_headlen(skb) < 2))
> >
> > goto err_free;
> >
> > /* expect a valid ethernet header here. */
> > if (unlikely(skb->mac_len != sizeof(struct ethhdr)
> >
> > || !skb_mac_header(skb)))
> >
> > goto err_free;
> >
> > ...
> >
> > static int batman_skb_recv_finish(struct sk_buff *skb)
> > {
> >
> > return NF_ACCEPT;
> >
> > }
> >
> > As I understand, if there is any hook that returns NF_STOLEN, then skb
> > is leaked.
>
[...]
> b) Why do you use bridge tables at all? This layer does not know
> anything about batman layer, only ethernet that is only a tunnel for
> batman. So, it is able to hook traffic from concrete prev-hop routers,
> but not from original sources of packets. I think it is not enough for
> network filter.
> Also if you want to process [*] cases you have to append fake
> ethernet headers before network header as NF_HOOK() would use ethernet
> header.
Because a different person (no one from the actual development team) wanted to
have it for testing purposes. Maybe we just drop it again.
thanks,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2010-08-13 23:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 20:34 batman-adv: design suggestions Vasiliy Kulikov
2010-08-09 20:53 ` Sven Eckelmann
2010-08-12 12:48 ` Vasiliy Kulikov
2010-08-14 14:50 ` Marek Lindner
2010-08-14 16:19 ` Vasiliy Kulikov
2010-08-14 17:10 ` Marek Lindner
2010-08-13 18:18 ` Vasiliy Kulikov
2010-08-13 23:25 ` Sven Eckelmann [this message]
2010-08-14 14:59 ` Marek Lindner
2010-08-14 16:13 ` Vasiliy Kulikov
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=201008140125.47179.sven.eckelmann@gmx.de \
--to=sven.eckelmann@gmx.de \
--cc=andrew@lunn.ch \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=lindner_marek@yahoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=segooon@gmail.com \
--cc=siwu@hrz.tu-chemnitz.de \
/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