Summary: Fixes in IPv4 autoip
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: sathishm6
Submitted on: Wed 28 Aug 2019 04:54:50 AM UTC
Priority: 5 - Normal
Assigned to: None
Discussion Lock: Any
Planned Release: None
This patch fixes following issues in autoip.
1) Corrected the condition for limiting the probe interval to match RFC
3927, Section 2.2.1.
2) Added fixes in autoip_stop() to avoid memory leak during autoip_start()
-> autoip_stop() sequence.
1. Fixed bug in max conflict rate limiting.
- According to RFC section RFC 3927 Section 2.2.1 conflict probe
should be increased to RATE_LIMIT_INTERVAL (60 seconds), after
conflict count reaches
MAX_CONFLICTS (i.e., 10) counts.
- The initial value of 'autoip->tried_llipaddr' is 0. Hence the probe
interval (i.e., autoip->ttw) should be increased to
RATE_LIMIT_INTERVAL (60 secs)
when the condition becomes 'autoip->tried_llipaddr >= MAX_CONFLICTS'
2. Added code to free 'autoip' client in autoip_stop() API.
- 'autoip' client is allocated in autoip_start() API, this client is
freed during autoip_stop() or in any other part of the code.
- Updated autoip_stop() API to release the memory allocated for 'autoip'
client during start.
Tag used as a base revision to apply the fix: : STABLE-2_1_2_RELEASE