ip: check if interface has link-local address
Type: fix
Change-Id: I9d3344374738f8cf883cffb4715c76b50bb4bfce
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
diff --git a/src/vnet/fib/fib_sas.c b/src/vnet/fib/fib_sas.c
index b607a0b..230fcd1 100644
--- a/src/vnet/fib/fib_sas.c
+++ b/src/vnet/fib/fib_sas.c
@@ -102,7 +102,12 @@
*/
if (ip6_address_is_link_local_unicast (dst))
{
- ip6_address_copy (src, ip6_get_link_local_address (sw_if_index));
+ const ip6_address_t *ll = ip6_get_link_local_address (sw_if_index);
+ if (NULL == ll)
+ {
+ return (false);
+ }
+ ip6_address_copy (src, ll);
return (true);
}