aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFrédéric Perrin <fred@fperrin.net>2021-12-17 14:38:38 +0000
committerDamjan Marion <dmarion@me.com>2021-12-18 12:14:00 +0000
commitc72feb8059d6d03c96c4754d555474a6482cbb3c (patch)
treef3fb88d174f0434ac4812ed9395e9fe6066caf92 /src/vnet
parentddb8d65a9786e609dbf17920a3cb2faa63a7932e (diff)
bfd: fix NULL dereference in bfd_api_verify_common
ip6_get_link_local_address() may return NULL if the local interface is not (or not yet) configured Type: fix Signed-off-by: Frédéric Perrin <fred@fperrin.net> Change-Id: I42bf2081582c4a36fa4e32145ca2f0ff73488110
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/bfd/bfd_udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/bfd/bfd_udp.c b/src/vnet/bfd/bfd_udp.c
index 4ad5660fdf6..333b321f3c1 100644
--- a/src/vnet/bfd/bfd_udp.c
+++ b/src/vnet/bfd/bfd_udp.c
@@ -614,7 +614,7 @@ bfd_udp_validate_api_input (u32 sw_if_index,
{
const ip6_address_t *ll_addr;
ll_addr = ip6_get_link_local_address (sw_if_index);
- if (ip6_address_is_equal (ll_addr, &local_addr->ip6))
+ if (ll_addr && ip6_address_is_equal (ll_addr, &local_addr->ip6))
{
/* valid address for this interface */
local_ip_valid = 1;