Fix bug #53667: ARP table max size is to small

arp table functions, nd6 destination cache and struct netif_hint
can now be u16_t or u8_t depending on table size, so up to 32K
entries can be used in these tables (s16_t)

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Simon Goldschmidt
2018-05-17 21:51:46 +02:00
parent 0f165ff136
commit 0c2fdfcf42
3 changed files with 55 additions and 49 deletions

View File

@@ -237,10 +237,16 @@ u8_t netif_alloc_client_data_id(void);
#define netif_get_client_data(netif, id) (netif)->client_data[(id)]
#endif
#if (LWIP_IPV4 && LWIP_ARP && (ARP_TABLE_SIZE > 0x7f)) || (LWIP_IPV6 && (LWIP_ND6_NUM_DESTINATIONS > 0x7f))
typedef u16_t netif_addr_idx_t;
#else
typedef u8_t netif_addr_idx_t;
#endif
#if LWIP_NETIF_HWADDRHINT
#define LWIP_NETIF_USE_HINTS 1
struct netif_hint {
u8_t addr_hint;
netif_addr_idx_t addr_hint;
};
#else /* LWIP_NETIF_HWADDRHINT */
#define LWIP_NETIF_USE_HINTS 0