mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
uip: build the IPv6 neighbour cache only for IPv6 builds
uip-neighbor.c is the IPv6 neighbour cache. Its only caller is the neighbour solicitation handler in uip_process(), which sits inside #if UIP_CONF_IPV6, so on an IPv4 build the module is linked without being reachable. Guard it on the same macro as its caller. Worth recording separately: the module does not currently compile with UIP_CONF_IPV6 set. uip_ipaddr_cmpx() is defined only in the non-IPv6 half of uip.h, and uip_neighbor_add() calls it, so an IPv6 build stops with an implicit declaration. That is true before this change as well, and is left alone here. On SWTGW218AS, on top of the forwarding change, the stack gains a further 12 bytes to 172 available and BANK1 drops another 714 bytes to 46080.
This commit is contained in:
1 parent
175ca9464a
commit
675faf0471
1 file changed
+4
@@ -43,6 +43,8 @@
|
||||
#include "uip-neighbor.h"
|
||||
#include "../rtl837x_common.h"
|
||||
|
||||
#if UIP_CONF_IPV6
|
||||
|
||||
#pragma codeseg BANK1
|
||||
#pragma constseg BANK1
|
||||
|
||||
@@ -170,3 +172,5 @@ uip_neighbor_lookup(__xdata uip_ipaddr_t ipaddr)
|
||||
return NULL;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#endif /* UIP_CONF_IPV6 */
|
||||
Reference in new issue
Block a user