mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-06-16 18:03:44 +08:00
Clean up LWIP_NETIF_HWADDRHINT a bit: create a struct holding the hint(s) and pass a pointer to that struct around. That way we are free to add more hints if required (e.g. see task #11620)
This commit is contained in:
@@ -1907,9 +1907,9 @@ nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif)
|
||||
IP6_ADDR_ZONECHECK_NETIF(ip6addr, netif);
|
||||
|
||||
#if LWIP_NETIF_HWADDRHINT
|
||||
if (netif->addr_hint != NULL) {
|
||||
if (netif->hints != NULL) {
|
||||
/* per-pcb cached entry was given */
|
||||
u8_t addr_hint = *(netif->addr_hint);
|
||||
u8_t addr_hint = netif->hints->addr_hint;
|
||||
if (addr_hint < LWIP_ND6_NUM_DESTINATIONS) {
|
||||
nd6_cached_destination_index = addr_hint;
|
||||
}
|
||||
@@ -1968,9 +1968,9 @@ nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif)
|
||||
}
|
||||
|
||||
#if LWIP_NETIF_HWADDRHINT
|
||||
if (netif->addr_hint != NULL) {
|
||||
if (netif->hints != NULL) {
|
||||
/* per-pcb cached entry was given */
|
||||
*(netif->addr_hint) = nd6_cached_destination_index;
|
||||
netif->hints->addr_hint = nd6_cached_destination_index;
|
||||
}
|
||||
#endif /* LWIP_NETIF_HWADDRHINT */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user