mbed-os/connectivity/nanostack/sal-stack-nanostack/source
YannCharbon 0d2badf42c Add complete support of DHCP relay interface ID option
RFC3315 specifies the following: "The relay agent MAY send the Interface-id
option to identify the interface on which the client message was received.
If a relay agent  receives a Relay-reply message with an Interface-id
option, the relay agent relays the message to the client through the
interface identified by the option."

The current implementation of the DHCP relay reply handling, the interface
ID field from the server response is ignored. Managing the interface ID
is very important especially as DHCP requests/replies use link-local
addresses. The consequence of this is that the interface must always be
specified because the routing layer cannot guess the correct interface.
Moreover, Mbed provides a mechanism to enable/disable the interface ID
option on a DHCP relay instance, so it is important to fully support it.

The reason why this issue has not been discoverd until now is that the DHCP
relay is mainly used on systems that use only one interface (such as Wi-SUN
routers). By default, when no interface ID is specified for the socket, the
latter will choose 6loWPAN interface by default. This means that if two
interfaces are used on the same device, the 6loWPAN interface is always
selected.

The commit adds code to retrieve the interface-id value contained within
the DHCP relay reply message and write it to a control message header
that is added to the socket message. This tells the socket which
interface to choose. If the interface-id option is not enabled on the
relay, this procedure is simply ignored.
2022-08-30 17:49:41 +02:00
..
6LoWPAN Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
BorderRouter Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
Common_Protocols Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
Core Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
DHCPv6_Server Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
DHCPv6_client Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
MAC Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
MLE Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
MPL Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
NWK_INTERFACE Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
RPL Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
Security Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
Service_Libs Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
configs Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
ipv6_stack Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
libDHCPv6 Add complete support of DHCP relay interface ID option 2022-08-30 17:49:41 +02:00
libNET Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0 2021-12-08 13:41:33 +02:00
nsconfig.h Squashed 'connectivity/nanostack/sal-stack-nanostack/' changes from 4a3c5c525b..225a4af94f 2021-09-23 13:04:04 +03:00