From: Stanislav Zaikin Date: Fri, 20 Aug 2021 14:25:31 +0000 (+0200) Subject: ip: check if interface has link-local address X-Git-Tag: v22.02-rc0~104 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=b31fbc47f5fcf8234c757558d7b0285348774086;p=vpp.git ip: check if interface has link-local address Type: fix Change-Id: I9d3344374738f8cf883cffb4715c76b50bb4bfce Signed-off-by: Stanislav Zaikin --- diff --git a/src/vnet/fib/fib_sas.c b/src/vnet/fib/fib_sas.c index b607a0b5be8..230fcd17bf6 100644 --- a/src/vnet/fib/fib_sas.c +++ b/src/vnet/fib/fib_sas.c @@ -102,7 +102,12 @@ fib_sas6_get (u32 sw_if_index, */ 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); }