Add a null check to ensure that another thread

does not access the address in the deletion path
of the interface.

Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2015-05-19 17:24:41 -07:00
parent 8b6912c2ff
commit 64e34726a1

View File

@ -204,7 +204,7 @@ ospf_if_name_string (struct ospf_interface *oi)
static char buf[OSPF_IF_STRING_MAXLEN] = "";
u_int32_t ifaddr;
if (!oi)
if (!oi || !oi->address)
return "inactive";
if (oi->type == OSPF_IFTYPE_VIRTUALLINK)