From 4cfca3ea62df5563c4584245e5ea9935fc4f5b26 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Fri, 9 Mar 2018 13:08:05 +0200 Subject: [PATCH] net: ipv6: Fix compile error if neighbor cache is disabled If net-shell is enabled then it could try to access neighbor state names. This would cause compile error as net_ipv6_nbr_state2str() function is then missing. Signed-off-by: Jukka Rissanen --- subsys/net/ip/ipv6.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subsys/net/ip/ipv6.c b/subsys/net/ip/ipv6.c index 58a8299cc1f..06f6643ad61 100644 --- a/subsys/net/ip/ipv6.c +++ b/subsys/net/ip/ipv6.c @@ -590,6 +590,11 @@ struct in6_addr *net_ipv6_nbr_lookup_by_index(struct net_if *iface, return NULL; } +#else +const char *net_ipv6_nbr_state2str(enum net_ipv6_nbr_state state) +{ + return ""; +} #endif /* CONFIG_NET_IPV6_NBR_CACHE */ int net_ipv6_find_last_ext_hdr(struct net_pkt *pkt, u16_t *next_hdr_idx,