mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_dhcpv6_client: fix for SLIP link-layer
In a point-to-point serial connection, we don't have L2 addresses. Set the link type & packet length accordingly and we will get a prefix from KEA.
This commit is contained in:
parent
079aea8775
commit
f198d689be
@ -32,6 +32,7 @@ extern "C" {
|
||||
* @{
|
||||
*/
|
||||
#define ARP_HWTYPE_ETHERNET (1U) /**< Ethernet */
|
||||
#define ARP_HWTYPE_SERIAL (20U) /**< Serial Line */
|
||||
#define ARP_HWTYPE_EUI64 (27U) /**< EUI-64 */
|
||||
/** @} */
|
||||
|
||||
|
@ -52,6 +52,11 @@ unsigned dhcpv6_client_get_duid_l2(unsigned iface, dhcpv6_duid_l2_t *duid)
|
||||
}
|
||||
else {
|
||||
switch (netif->device_type) {
|
||||
case NETDEV_TYPE_SLIP:
|
||||
duid->l2type = byteorder_htons(ARP_HWTYPE_SERIAL);
|
||||
/* L2 address length is 0 */
|
||||
res = 0;
|
||||
break;
|
||||
case NETDEV_TYPE_ETHERNET:
|
||||
case NETDEV_TYPE_BLE:
|
||||
case NETDEV_TYPE_ESP_NOW:
|
||||
|
Loading…
Reference in New Issue
Block a user