Fix protocol-dependent def of UIP_MAX_ROUTES
#include "lib/list.h"
#ifdef UIP_CONF_MAX_ROUTES
+
#define UIP_MAX_ROUTES UIP_CONF_MAX_ROUTES
+
#else /* UIP_CONF_MAX_ROUTES */
+
+#if UIP_CONF_IPV6_RPL_LITE
+#define UIP_MAX_ROUTES 0 /* RPL Lite only supports non-storing, no routes */
+#elif UIP_CONF_IPV6_RPL_CLASSIC
+
+#include "net/routing/rpl-classic/rpl-conf.h"
#if RPL_WITH_STORING
#define UIP_MAX_ROUTES NETSTACK_MAX_ROUTE_ENTRIES
-#else
-#define UIP_MAX_ROUTES 0
+#else /* RPL_WITH_STORING */
+#define UIP_MAX_ROUTES 0 /* No storing mode, no need for routes */
+#endif /* RPL_WITH_STORING */
+
+#else /* Not RPL Lite nor RPL Classic */
+#define UIP_MAX_ROUTES NETSTACK_MAX_ROUTE_ENTRIES
#endif
+
#endif /* UIP_CONF_MAX_ROUTES */
NBR_TABLE_DECLARE(nbr_routes);
