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
pgpY6lqwaKS3t.pgp
Description: PGP signature
