blob: 09988946b67639b0df593132d8eab67aafe18cd7 [file] [log] [blame]
Patrick Williams8dd68482022-10-04 07:57:18 -05001From ec3bb054c331f9d928ac21a1747e0f921b51dfbc Mon Sep 17 00:00:00 2001
2From: Michal Ruprich <michalruprich@gmail.com>
3Date: Tue, 6 Sep 2022 12:25:01 +0200
4Subject: [PATCH] ospfd: Adding SUPPORT_OSPF_API define in ospf_spf.c
5
6It is not possible to build ospf_spf.c file with --disable-ospfapi because
7ospf_apiserver.c has SUPPORT_OSPF_API around all function definitions and
8that results in an undefined reference to the ospf_apiserver_notify_reachable
9function error while building.
10
11Signed-off-by: Michal Ruprich <mruprich@redhat.com>
12
13Upstream-Status: Backport
14[https://github.com/FRRouting/frr/commit/ec3bb054c331f9d928ac21a1747e0f921b51dfbc]
15
16Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
17---
18 ospfd/ospf_spf.c | 5 +++++
19 1 file changed, 5 insertions(+)
20
21diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
22index 46492ff6b..4edc1de81 100644
23--- a/ospfd/ospf_spf.c
24+++ b/ospfd/ospf_spf.c
25@@ -48,7 +48,10 @@
26 #include "ospfd/ospf_sr.h"
27 #include "ospfd/ospf_ti_lfa.h"
28 #include "ospfd/ospf_errors.h"
29+
30+#ifdef SUPPORT_OSPF_API
31 #include "ospfd/ospf_apiserver.h"
32+#endif
33
34 /* Variables to ensure a SPF scheduled log message is printed only once */
35
36@@ -1895,7 +1898,9 @@ static void ospf_spf_calculate_schedule_worker(struct thread *thread)
37 /* Update all routers routing table */
38 ospf->oall_rtrs = ospf->all_rtrs;
39 ospf->all_rtrs = all_rtrs;
40+#ifdef SUPPORT_OSPF_API
41 ospf_apiserver_notify_reachable(ospf->oall_rtrs, ospf->all_rtrs);
42+#endif
43
44 /* Free old ABR/ASBR routing table */
45 if (ospf->old_rtrs)
46--
472.25.1
48