From 13b2541b11b1df346805f0869c843635ceb0229f Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Sun, 11 Mar 2012 06:17:53 +0800 Subject: 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 Acked-by: Daniele Furlan Tested-by: Simon Wunderlich --- net/batman-adv/packet.h | 1 + 1 file changed, 1 insertion(+) (limited to 'net/batman-adv/packet.h') diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h index f54969c61a1e..0ee1af770798 100644 --- a/net/batman-adv/packet.h +++ b/net/batman-adv/packet.h @@ -39,6 +39,7 @@ enum bat_packettype { #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 -- cgit v1.2.1