This PR is to fix the issues in LwIP for AutoIP which is required for passing Bonjour Conformance Test for mDNS. Following gives the summary of the changes/fixes added.
Changes:
1. Following issues are fixed in LwIP for AutoIP.
- Fixed bug in max conflict rate limiting: According to RFC section RFC 3927 Section 2.2.1 conflict probe interval should be increased to 60 seconds, once conflict count reaches after 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 60 secs when 'autoip->tried_llipaddr >= MAX_CONFLICTS'
- Added code to free 'autoip' client in autoip_stop() API: New 'autoip' client is allocated in autoip_start() API, and the client is not freed during autoip_stop(). This would result in memory leak, if not freed. Updated autoip_stop() API to take care of releasing the memory allocated for 'autoip' client.
2. Introduced a configurable macro "MBED_CONF_LWIP_DHCP_TIMEOUT" in "lwipopts.h" to configure DHCP timeout based on the usecase requirement. For example: bonjour conformance test would need a DHCP timeout value which is grater than 320 secs to run mDNS probing test to verify protocol compilance of the implementation.
Tested the fixes using Bonjour Conformance Test tool Version 1.5.0 for IPv4. It has successfully passed Bonjour Conformance Test.
Changes:
1. Following issues are fixed in LwIP for AutoIP.
a) Fixed bug in max conflict rate limitting.
- According to RFC section RFC 3927 Section 2.2.1 conflict probe interval
should be increased to 60 seconds, once conflict count reaches after
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 60 secs
when 'autoip->tried_llipaddr >= MAX_CONFLICTS'
b) Added code to free 'autoip' client in autoip_stop() API.
- New 'autoip' client is allocated in autoip_start() API, and the client
is not freed during autoip_stop(). This would result in memory leak
if not freed.
- Updated autoip_stop() API to take care of releasing the memory allocated
for 'autoip' client.
2. Introduced a configurable macro "MBED_CONF_LWIP_DHCP_TIMEOUT" in "lwipopts.h"
to configure DHCP timeout based on the usecase requirement. For example:
bonjour conformance test would need a DHCP timeout value which is grater than
320 secs to run mDNS probing test to verify protocol compilance of the implementation.
Created (a new) PPP interface for PPP service. Removed lwip
dependencies to PPP (memory allocations etc.). Moved PPP
configuration options away from lwIP mbed_lib.json to new
PPP service. For backwards compatibility, using the old
options is also currently supported.
Applied missing LWIP patch to PPP/utils.c
"Major Refactoring & extensions" commited on May 23, 201 by hasnainvirk
LWIP 2.1.2 tcpip thread stack is restored to 1200 bytes
Added Multihoming feature to LWIP (ability to use more than one network interfaces) for increasing networking reliability.
This involves:
LWIP interface
LWIP IP routing
DNS storage
Sockets (bind to interface name possibility)
possibility to add non default network interface
cellular middleware modifications if cellular connection is used