public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Cc: "Martin Hundebøll" <martin@hundeboll.net>
Subject: Re: [B.A.T.M.A.N.] [RFC] batman-adv: Add filtering of OGM messages
Date: Wed, 8 Feb 2012 20:53:03 +0100	[thread overview]
Message-ID: <20120208195302.GF21844@ritirata.org> (raw)
In-Reply-To: <1328727958-16119-1-git-send-email-martin@hundeboll.net>

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

Hello Martin,

On Wed, Feb 08, 2012 at 08:05:58PM +0100, Martin Hundebøll wrote:
>  static int route_unicast_packet(struct sk_buff *skb,
>  				struct hard_iface *recv_if);
> @@ -259,6 +260,10 @@ int recv_bat_ogm_packet(struct sk_buff *skb, struct hard_iface *hard_iface)
>  
>  	ethhdr = (struct ethhdr *)skb_mac_header(skb);
>  
> +	/* Packet is filtered by user */
> +	if (filter_addr_drop(bat_priv, ethhdr->h_source))
> +		return NET_RX_DROP;
> +
>  	/* packet with broadcast indication but unicast recipient */
>  	if (!is_broadcast_ether_addr(ethhdr->h_dest))
>  		return NET_RX_DROP;

nice infrastructure :-)
But dropping the OGM at this point, doesn;t seem to be a good choice imho.
Actually the first OGM will pass through (because there is no orig_node struct
to check for filter), then all the other OGMs will be dropped up to the orig
purge timeout. At that point the orig_node structure will be deleted and so we
will have another OGM passing through and then a period of silence.

I hope I am not wrong :-)

What about moving the filter operation so that at least the last_valid field is
updated? Another option could be to take a different approach..like letting all
the OGM pass through but skipping the orig_node when checking for a possible
next-hop...

Cheers,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2012-02-08 19:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 19:05 [B.A.T.M.A.N.] [RFC] batman-adv: Add filtering of OGM messages Martin Hundebøll
2012-02-08 19:53 ` Antonio Quartulli [this message]
2012-02-09  7:59 ` Marek Lindner
2012-02-10 14:53 ` [B.A.T.M.A.N.] [RFCv2] batman-adv: Add blocking of one hop " Martin Hundebøll
2012-02-10 14:56   ` Martin Hundebøll
2012-02-15 19:23   ` Simon Wunderlich
2012-02-16 10:54     ` Martin Hundebøll

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=20120208195302.GF21844@ritirata.org \
    --to=ordex@autistici.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=martin@hundeboll.net \
    /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