aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/frr/frr/0001-ospfd-Adding-SUPPORT_OSPF_API-define-in-ospf_spf.c.patch
blob: 09988946b67639b0df593132d8eab67aafe18cd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From ec3bb054c331f9d928ac21a1747e0f921b51dfbc Mon Sep 17 00:00:00 2001
From: Michal Ruprich <michalruprich@gmail.com>
Date: Tue, 6 Sep 2022 12:25:01 +0200
Subject: [PATCH] ospfd: Adding SUPPORT_OSPF_API define in ospf_spf.c

It is not possible to build ospf_spf.c file with --disable-ospfapi because
ospf_apiserver.c has SUPPORT_OSPF_API around all function definitions and
that results in an undefined reference to the ospf_apiserver_notify_reachable
function error while building.

Signed-off-by: Michal Ruprich <mruprich@redhat.com>

Upstream-Status: Backport
[https://github.com/FRRouting/frr/commit/ec3bb054c331f9d928ac21a1747e0f921b51dfbc]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 ospfd/ospf_spf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 46492ff6b..4edc1de81 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -48,7 +48,10 @@
 #include "ospfd/ospf_sr.h"
 #include "ospfd/ospf_ti_lfa.h"
 #include "ospfd/ospf_errors.h"
+
+#ifdef SUPPORT_OSPF_API
 #include "ospfd/ospf_apiserver.h"
+#endif
 
 /* Variables to ensure a SPF scheduled log message is printed only once */
 
@@ -1895,7 +1898,9 @@ static void ospf_spf_calculate_schedule_worker(struct thread *thread)
 	/* Update all routers routing table */
 	ospf->oall_rtrs = ospf->all_rtrs;
 	ospf->all_rtrs = all_rtrs;
+#ifdef SUPPORT_OSPF_API
 	ospf_apiserver_notify_reachable(ospf->oall_rtrs, ospf->all_rtrs);
+#endif
 
 	/* Free old ABR/ASBR routing table */
 	if (ospf->old_rtrs)
-- 
2.25.1