summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/ip/ip6_link.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/ip/ip6_link.c b/src/vnet/ip/ip6_link.c
index 082033a9de9..0527b2ffc52 100644
--- a/src/vnet/ip/ip6_link.c
+++ b/src/vnet/ip/ip6_link.c
@@ -319,9 +319,10 @@ ip6_get_link_local_address (u32 sw_if_index)
{
const ip6_link_t *il;
- vec_validate (ip6_links, sw_if_index);
+ il = ip6_link_get (sw_if_index);
- il = &ip6_links[sw_if_index];
+ if (NULL == il)
+ return (NULL);
return (&il->il_ll_addr);
}
@@ -331,7 +332,10 @@ ip6_link_get_mcast_adj (u32 sw_if_index)
{
const ip6_link_t *il;
- il = &ip6_links[sw_if_index];
+ il = ip6_link_get (sw_if_index);
+
+ if (NULL == il)
+ return (INDEX_INVALID);
return (il->il_mcast_adj);
}