Author: marek Date: 2010-03-20 15:51:53 +0100 (Sat, 20 Mar 2010) New Revision: 1600
Modified: trunk/batman-adv-kernelland/aggregation.c Log: batman-adv: Fix aggregation direct-link bug
So far, neighbour's secondary interface OGMs can involuntarily piggyback on primary interface OGMs that arrived on the same secondary interface before. Secondary interface OGMs should NEVER leave their direct neighbour broadcast domain! This patch ensures that secondary interface OGMs can only be aggregated to other secondary interface OGMs.
Signed-off-by: Linus L?\195?\188ssing linus.luessing@web.de
Modified: trunk/batman-adv-kernelland/aggregation.c =================================================================== --- trunk/batman-adv-kernelland/aggregation.c 2010-03-20 14:51:42 UTC (rev 1599) +++ trunk/batman-adv-kernelland/aggregation.c 2010-03-20 14:51:53 UTC (rev 1600) @@ -81,9 +81,15 @@ * interface only - we still can aggregate */ if ((directlink) && (new_batman_packet->ttl == 1) && - (forw_packet->if_incoming == if_incoming)) + (forw_packet->if_incoming == if_incoming) && + + /* packets from direct neighbors or + * own secondary interface packets + * (= secondary interface packets in general) */ + (batman_packet->flags & DIRECTLINK || + (forw_packet->own && + forw_packet->if_incoming->if_num != 0))) return true; - }
return false;