[PATCH 02/10] batman-adv: Avoid u32 overflow during gateway select

2015-08-14 Thread Antonio Quartulli
From: Ruben Wisniewski The gateway selection based on fast connections is using a single value calculated from the average tq (0-255) and the download bandwidth (in 100Kibit). The formula for the first step (tq ** 2 * 1 * bandwidth) tends to overflow a u32 with low bandwidth settings like 50

[PATCH 02/10] batman-adv: Avoid u32 overflow during gateway select

2015-08-11 Thread Antonio Quartulli
From: Ruben Wisniewski The gateway selection based on fast connections is using a single value calculated from the average tq (0-255) and the download bandwidth (in 100Kibit). The formula for the first step (tq ** 2 * 1 * bandwidth) tends to overflow a u32 with low bandwidth settings like 50