net: apps: Add the non link local IPv6 address in routes

For this demo app, set the 2001:db8::/64 address in routing
table. This way we will be able to pass data using these
addresses. Something like this should not be done in real
networking environment.

Change-Id: I1764d5ae09ab95dd580c6b48d6f368bfe283a6a3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2016-02-04 13:11:37 +02:00 committed by Anas Nashif
commit bef69b7b96
2 changed files with 12 additions and 0 deletions

View file

@ -128,6 +128,12 @@ static inline void init_server()
* but do it here so that test works from first packet.
*/
uip_ds6_nbr_add(addr, lladdr, 0, NBR_REACHABLE);
#else
/* Hard code the route to peer just in case, not to
* be done in real life applications.
*/
addr = (uip_ipaddr_t *)&in6addr_peer;
uip_ds6_defrt_add(addr, 0);
#endif
addr = (uip_ipaddr_t *)&in6addr_my;

View file

@ -99,6 +99,12 @@ static inline void init_server()
* but do it here so that test works from first packet.
*/
uip_ds6_nbr_add(addr, lladdr, 0, NBR_REACHABLE);
#else
/* Hard code the route to peer just in case, not to
* be done in real life applications.
*/
addr = (uip_ipaddr_t *)&in6addr_peer;
uip_ds6_defrt_add(addr, 0);
#endif
addr = (uip_ipaddr_t *)&in6addr_my;