Patrick Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame^] | 1 | From ec3bb054c331f9d928ac21a1747e0f921b51dfbc Mon Sep 17 00:00:00 2001 |
| 2 | From: Michal Ruprich <michalruprich@gmail.com> |
| 3 | Date: Tue, 6 Sep 2022 12:25:01 +0200 |
| 4 | Subject: [PATCH] ospfd: Adding SUPPORT_OSPF_API define in ospf_spf.c |
| 5 | |
| 6 | It is not possible to build ospf_spf.c file with --disable-ospfapi because |
| 7 | ospf_apiserver.c has SUPPORT_OSPF_API around all function definitions and |
| 8 | that results in an undefined reference to the ospf_apiserver_notify_reachable |
| 9 | function error while building. |
| 10 | |
| 11 | Signed-off-by: Michal Ruprich <mruprich@redhat.com> |
| 12 | |
| 13 | Upstream-Status: Backport |
| 14 | [https://github.com/FRRouting/frr/commit/ec3bb054c331f9d928ac21a1747e0f921b51dfbc] |
| 15 | |
| 16 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
| 17 | --- |
| 18 | ospfd/ospf_spf.c | 5 +++++ |
| 19 | 1 file changed, 5 insertions(+) |
| 20 | |
| 21 | diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c |
| 22 | index 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 | -- |
| 47 | 2.25.1 |
| 48 | |