On Fri, 13 Nov 2015, Donald Sharp wrote:

From: Ayan Banerjee <[email protected]>

Add a null check to ensure that another thread

What other thread would that be?

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

Signed-off-by: Ayan Banerjee <[email protected]>
Reviewed-by: Dinesh G Dutt <[email protected]>
---
ospfd/ospf_dump.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index ac93f1d..f9c0569 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -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)


--
Paul Jakma      [email protected]  @pjakma Key ID: 64A2FF6A
Fortune:
Save energy:  Drive a smaller shell.

_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to