[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] netif->hwaddr_len of loopback interface is not ETH_HWADDR_L

From: Laurenz Altenmüller
Subject: [lwip-users] netif->hwaddr_len of loopback interface is not ETH_HWADDR_LEN
Date: Mon, 6 Jul 2020 19:09:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0


I want to unit test some embedded firmware on native host arch by building it against the lwip unix port (latest master). Right now I want to add a fake IP and MAC to the ARP table with `etharp_add_static_entry()` so that the tested function can find it when it uses `etharp_query()` and then `etharp_find_addr()` in its implementation. For all this I'm using the netif I get from `netif_get_loopif()`.

Unfortunately I hit the assert in etharp.c:1139 ("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!"). Using the debugger I can confirm that `netif->hwaddr_len` of my loopback netif is 0.

Should I even be able to use the loopback interface for ARP things? Am I just missing some initialization? (In my test's `setUp()` I call `sys_init(); mem_init(); netif_init(); test_netif=netif_get_loopif();`)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]