OSDN Git Service

batman-adv: Fix own OGM check in aggregated OGMs
authorLinus Lüssing <linus.luessing@c0d3.blue>
Thu, 23 Jul 2020 12:28:08 +0000 (14:28 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Tue, 18 Aug 2020 17:40:03 +0000 (19:40 +0200)
commitd8bf0c01642275c7dca1e5d02c34e4199c200b1f
treefa7fe9fef5869f415c1614c240d9f12d7d00b920
parent303216e76dcab6049c9d42390b1032f0649a8206
batman-adv: Fix own OGM check in aggregated OGMs

The own OGM check is currently misplaced and can lead to the following
issues:

For one thing we might receive an aggregated OGM from a neighbor node
which has our own OGM in the first place. We would then not only skip
our own OGM but erroneously also any other, following OGM in the
aggregate.

For another, we might receive an OGM aggregate which has our own OGM in
a place other then the first one. Then we would wrongly not skip this
OGM, leading to populating the orginator and gateway table with ourself.

Fixes: 9323158ef9f4 ("batman-adv: OGMv2 - implement originators logic")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/bat_v_ogm.c