summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQi.Chen@windriver.com <Qi.Chen@windriver.com>2015-11-23 12:34:12 +0800
committerArmin Kuster <akuster808@gmail.com>2016-01-29 19:19:15 -0800
commit50e09d1d3543a7fcd3d831d3ef30c13b3116fb1d (patch)
tree5ee524f392d0bedd149459f8078e457d8c6cb043
parent7bc138a365e20653ddfb9229561e3e9e50b89ee8 (diff)
downloadmeta-openembedded-50e09d1d3543a7fcd3d831d3ef30c13b3116fb1d.tar.gz
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 <Qi.Chen@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch28
-rw-r--r--meta-networking/recipes-protocols/quagga/quagga_0.99.24.1.bb1
2 files changed, 29 insertions, 0 deletions
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 000000000..f08bb572d
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch
@@ -0,0 +1,28 @@
1Upstream-Status: Pending
2
3Subject: ospf6d: check ospf6 before using it in ospf6_clean
4
5The ospf6 variable might be 'NULL' causing segment fault error.
6Check it before referencing it.
7
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
9---
10 ospf6d/ospf6d.c | 2 ++
11 1 file changed, 2 insertions(+)
12
13diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
14index 3cdd5c1..e3bf1af 100644
15--- a/ospf6d/ospf6d.c
16+++ b/ospf6d/ospf6d.c
17@@ -1892,6 +1892,8 @@ ospf6_init (void)
18 void
19 ospf6_clean (void)
20 {
21+ if (ospf6 == NULL)
22+ return;
23 if (ospf6->route_table)
24 ospf6_route_remove_all (ospf6->route_table);
25 if (ospf6->brouter_table)
26--
271.9.1
28
diff --git a/meta-networking/recipes-protocols/quagga/quagga_0.99.24.1.bb b/meta-networking/recipes-protocols/quagga/quagga_0.99.24.1.bb
index 09c4e7d28..cecf4385c 100644
--- a/meta-networking/recipes-protocols/quagga/quagga_0.99.24.1.bb
+++ b/meta-networking/recipes-protocols/quagga/quagga_0.99.24.1.bb
@@ -1,6 +1,7 @@
1require quagga.inc 1require quagga.inc
2 2
3SRC_URI += "file://babel-close-the-stdout-stderr-as-in-other-daemons.patch \ 3SRC_URI += "file://babel-close-the-stdout-stderr-as-in-other-daemons.patch \
4 file://0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch \
4" 5"
5 6
6SRC_URI[md5sum] = "7986bdc2fe6027d4c9216f7f5791e718" 7SRC_URI[md5sum] = "7986bdc2fe6027d4c9216f7f5791e718"