Skip to content

Commit 8a26f28

Browse files
author
marek
committed
[batman] check whether we have a valid "previous ttl" to avoid a TTL of 255
git-svn-id: http://downloads.open-mesh.org/svn/batman/trunk/batman@1434 45894c77-fb22-0410-b583-ff6e7d5dbf6c
1 parent 52f7741 commit 8a26f28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

schedule.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ void schedule_forward_packet(struct orig_node *orig_node, struct bat_packet *in,
230230

231231
/* rebroadcast ogm of best ranking neighbor as is */
232232
if (orig_node->router->addr != neigh) {
233-
234233
bat_packet->tq = orig_node->router->tq_avg;
235-
bat_packet->ttl = orig_node->router->last_ttl - 1;
236234

235+
if (orig_node->router->last_ttl)
236+
bat_packet->ttl = orig_node->router->last_ttl - 1;
237237
}
238238

239239
tq_avg = orig_node->router->tq_avg;

0 commit comments

Comments
 (0)