batman-adv: Fix symmetry check / route flapping in multi interface setups
authorLinus Lüssing <linus.luessing@web.de>
Tue, 18 Sep 2012 01:01:08 +0000 (03:01 +0200)
committerAntonio Quartulli <ordex@autistici.org>
Sun, 23 Sep 2012 21:12:49 +0000 (23:12 +0200)
commit7caf69fb9c5017df01945a1861c042f6aa08edeb
tree76e8df9765da796a33db46b0061b61e5a3cfa954
parent40a3eb33e307616567f4b81792f405a7f3f0abee
batman-adv: Fix symmetry check / route flapping in multi interface setups

If receiving an OGM from a neighbor other than the currently selected
and if it has the same TQ then we are supposed to switch if this
neighbor provides a more symmetric link than the currently selected one.

However this symmetry check currently is broken if the interface of the
neighbor we received the OGM from and the one of the currently selected
neighbor differ: We are currently trying to determine the symmetry of the
link towards the selected router via the link we received the OGM from
instead of just checking via the link towards the currently selected
router.

This leads to way more route switches than necessary and can lead to
permanent route flapping in many common multi interface setups.

This patch fixes this issue by using the right interface for this
symmetry check.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
net/batman-adv/bat_iv_ogm.c