blob: b78fdf04d423157a1e07afbfc882f26abc3c30d6 (
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
|
From 29f1a00109eba4a5f23662b377d372f92735b2b6 Mon Sep 17 00:00:00 2001
From: Zhiyuan Wan <h@iloli.bid>
Date: Mon, 3 Apr 2023 14:35:14 +0800
Subject: [PATCH 2/3] ospfd: Fix wrong advertise router calculation in transit
network
The ospfd mistakenly copy advertise router from vertex->id, which may
not be correct in an OSPF transit network.
Signed-off-by: Zhiyuan Wan <h@iloli.bid>
---
ospfd/ospf_route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index fea9f79bf..c98790b5e 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -864,7 +864,7 @@ void ospf_route_copy_nexthops_from_vertex(struct ospf_area *area,
|| area->spf_dry_run) {
path = ospf_path_new();
path->nexthop = nexthop->router;
- path->adv_router = v->id;
+ path->adv_router = v->lsa->adv_router;
if (oi) {
path->ifindex = oi->ifp->ifindex;
--
2.30.2
|