]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: skip the window protection test when the originator has no neighbours
authorAntonio Quartulli <ordex@autistici.org>
Sun, 26 Feb 2012 14:39:42 +0000 (15:39 +0100)
committerAntonio Quartulli <ordex@autistici.org>
Wed, 18 Apr 2012 07:54:02 +0000 (09:54 +0200)
commit55e3e7d1fc4948deaa07dab29bc03152ea8fd11c
treefd920a0dca939ae719066941445cb87d8284969f
parent504af5415a969c2189d65a3effdeb5271c65318e
batman-adv: skip the window protection test when the originator has no neighbours

When we receive an OGM from from a node for the first time, the last_real_seqno
field of the orig_node structure has not been initialised yet. The value of this
field is used to compute the current ogm-seqno window and therefore the
protection mechanism will probably drop the packet due to an out-of-window error.
To avoid this situation this patch adds a check to skip the window protection
mechanism if no neighbour nodes have already been added. When the first
neighbour node is added, the last_real_seqno field is initialised too.

Reported-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/bat_iv_ogm.c