The following commit has been merged in the master branch: commit c4bdda5487825ba83dd06d69c8507fceb1baca6b Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Mar 11 06:17:53 2012 +0800
batman-adv: avoid temporary routing loops by being strict on forwarded OGMs
batman-adv would forward OGMs from non-besthops while replacing the the TQ and TTL values with the values from the best hop. In certain corner cases this leads to a temporary routing loop. This patch changes this behavior: Only packets from best next hops are forwarded - TQ and TTL values won't be replaced anymore. However, the protocol needs to rebroadcast OGMs from single hop neighbors regardless of whether or not they are the best hop. To handle this case a new flag is introduced to alert neighboring nodes about the forwarded OGM that is not from my best next hop. It is to be discarded by all nodes except for the one originating the OGM.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Daniele Furlan daniele.furlan@gmail.com Tested-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
diff --git a/packet.h b/packet.h index 02b0c87..3c4c533 100644 --- a/packet.h +++ b/packet.h @@ -47,6 +47,7 @@ enum bat_subtype { #define COMPAT_VERSION 14
enum batman_iv_flags { + NOT_BEST_NEXT_HOP = 1 << 3, PRIMARIES_FIRST_HOP = 1 << 4, VIS_SERVER = 1 << 5, DIRECTLINK = 1 << 6