On Sunday 12 June 2016 12:14:25 Antonio Quartulli wrote:
if (orig_throughput < (gw_throughput + threshold))
goto out;
Possible overflow problem in batadv_v_gw_is_eligible. We don't know what the user will add here and what the gw_throughput is.
We already had a similar problem in the BATMAN_IV gw selection code which resulted in weird gw selections. See f63c54bba31d ("batman-adv: Avoid u32 overflow during gateway select").
if (orig_throughput < gw_throughput) goto out;
if ((orig_throughput - gw_throughput) < threshold) goto out;
Kind regards, Sven