Author: marek Date: 2009-09-11 17:56:53 +0000 (Fri, 11 Sep 2009) New Revision: 1434
Modified: trunk/batman/schedule.c Log: [batman] check whether we have a valid "previous ttl" to avoid a TTL of 255
Modified: trunk/batman/schedule.c =================================================================== --- trunk/batman/schedule.c 2009-09-11 17:56:49 UTC (rev 1433) +++ trunk/batman/schedule.c 2009-09-11 17:56:53 UTC (rev 1434) @@ -230,10 +230,10 @@
/* rebroadcast ogm of best ranking neighbor as is */ if (orig_node->router->addr != neigh) { - bat_packet->tq = orig_node->router->tq_avg; - bat_packet->ttl = orig_node->router->last_ttl - 1;
+ if (orig_node->router->last_ttl) + bat_packet->ttl = orig_node->router->last_ttl - 1; }
tq_avg = orig_node->router->tq_avg;