mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
acd: fix MAX_CONFLICTS check accorting RFC.
As written in RFC5227 in 2.1.1 Probe Details: A host implementing this specification MUST take precautions to limit the rate at which it probes for new candidate addresses: if the host experiences MAX_CONFLICTS or more address conflicts on a given interface, then the host MUST limit the rate at which it probes for new addresses on this interface to no more than one attempted new address per RATE_LIMIT_INTERVAL. But `acd_restart` restart function check for `acd->num_conflicts > MAX_CONFLICTS` which allow one more probe than expected. So this commit change the test to `acd->num_conflicts >= MAX_CONFLICTS`. Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
parent
eaa8f34f6a
commit
e09add37c1
@ -319,7 +319,7 @@ acd_restart(struct netif *netif, struct acd *acd)
|
||||
|
||||
/* if we tried more then MAX_CONFLICTS we must limit our rate for
|
||||
* acquiring and probing addresses. compliant to RFC 5227 Section 2.1.1 */
|
||||
if (acd->num_conflicts > MAX_CONFLICTS) {
|
||||
if (acd->num_conflicts >= MAX_CONFLICTS) {
|
||||
acd->state = ACD_STATE_RATE_LIMIT;
|
||||
acd->ttw = (u16_t)(RATE_LIMIT_INTERVAL * ACD_TICKS_PER_SECOND);
|
||||
LWIP_DEBUGF(ACD_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING,
|
||||
|
Loading…
Reference in New Issue
Block a user