diff options
author | Stanislav Zaikin <zstaseg@gmail.com> | 2021-08-20 16:25:31 +0200 |
---|---|---|
committer | Stanislav Zaikin <zstaseg@gmail.com> | 2021-08-20 16:32:49 +0200 |
commit | b31fbc47f5fcf8234c757558d7b0285348774086 (patch) | |
tree | 808a8230613b0f71d3b85f0ab9b8682d8a96ef69 /src/vnet/fib/fib_sas.c | |
parent | 48a13f38fa59387fb751fa55f5036dae3dfd5631 (diff) |
ip: check if interface has link-local address
Type: fix
Change-Id: I9d3344374738f8cf883cffb4715c76b50bb4bfce
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
Diffstat (limited to 'src/vnet/fib/fib_sas.c')
-rw-r--r-- | src/vnet/fib/fib_sas.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); } |