Make LWIP_RAND optional (useful for small targets)

This commit is contained in:
Simon Goldschmidt
2011-09-03 22:27:30 +02:00
parent e27d34d118
commit 5e8ee7e006
2 changed files with 5 additions and 1 deletions

View File

@@ -493,8 +493,10 @@ mld6_delayed_report(struct mld_group *group, u16_t maxresp)
maxresp = 1;
}
/* Randomize maxresp. */
#ifdef LWIP_RAND
/* Randomize maxresp. (if LWIP_RAND is supported) */
maxresp = (LWIP_RAND() % (maxresp - 1)) + 1;
#endif /* LWIP_RAND */
/* Apply timer value if no report has been scheduled already. */
if ((group->group_state == MLD6_GROUP_IDLE_MEMBER) ||