From 83102891877bd857ff0267137c2bc72089cadbc3 Mon Sep 17 00:00:00 2001 From: "Qi.Chen@windriver.com" Date: Mon, 23 Nov 2015 12:34:12 +0800 Subject: quagga: fix segment fault when stopping ospf6d In ospf6_clean, the variable ospf6 might be NULL causing segment fault when stopping ospf6d. Check the variable before referencing it. Signed-off-by: Chen Qi Signed-off-by: Martin Jansa Signed-off-by: Joe MacDonald --- ...heck-ospf6-before-using-it-in-ospf6_clean.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch (limited to 'meta-networking/recipes-protocols/quagga/files') diff --git a/meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch b/meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch new file mode 100644 index 0000000000..f08bb572da --- /dev/null +++ b/meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch @@ -0,0 +1,28 @@ +Upstream-Status: Pending + +Subject: ospf6d: check ospf6 before using it in ospf6_clean + +The ospf6 variable might be 'NULL' causing segment fault error. +Check it before referencing it. + +Signed-off-by: Chen Qi +--- + ospf6d/ospf6d.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c +index 3cdd5c1..e3bf1af 100644 +--- a/ospf6d/ospf6d.c ++++ b/ospf6d/ospf6d.c +@@ -1892,6 +1892,8 @@ ospf6_init (void) + void + ospf6_clean (void) + { ++ if (ospf6 == NULL) ++ return; + if (ospf6->route_table) + ospf6_route_remove_all (ospf6->route_table); + if (ospf6->brouter_table) +-- +1.9.1 + -- cgit v1.2.3-54-g00ecf