ospfd, ospf6d: do not install routes for directly attached networks - #20720
Conversation
e855abf to
3871235
Compare
|
This seems like an okay change, but this will break tests. It probably needs to be transitioned in? |
78e0bd7 to
e4b29df
Compare
|
@greptile, you can review the files under the directories ospfd and ospf6d only? |
Greptile SummaryThis PR suppresses the installation of directly-attached (connected) OSPF routes into the kernel RIB, on the basis that the kernel already has connected routes for those prefixes. The change touches both OSPFv2 ( Key changes:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[SPF Run] --> B[ospf_intra_add_transit / ospf6_spf_install]
B --> C{Root vertex?\nv->parents empty\nor v->hops == 0}
C -- Yes --> D[mark route->connected = true]
C -- No --> E{Any parent nexthop\n== INADDR_ANY?}
E -- Yes --> D
E -- No --> F[connected = false]
D --> G[ospf_route_install / ospf6_route_table_update]
F --> G
G --> H[ospf_zebra_add / ospf6_zebra_route_update ADD]
H --> I{route->connected?}
I -- Yes --> J[Return early\ndo not send to Zebra]
I -- No --> K[zclient_route_send ZEBRA_ROUTE_ADD]
G --> L[ospf_route_delete_uniq]
L --> M{or->connected?}
M -- Yes --> N[Skip ospf_zebra_delete]
M -- No --> O{Prefix in new table?}
O -- No --> P[ospf_zebra_delete]
O -- Yes --> N
G --> Q[ospf6_zebra_route_update REM]
Q --> R{type==REM\nbest path\n& has next?}
R -- Yes --> S[Promote next as ADD\nrequest = request->next]
S --> T{β οΈ request->connected\nnot re-checked}
T --> U[zclient_route_send ZEBRA_ROUTE_ADD\npossibly for connected route]
R -- No --> V[zclient_route_send ZEBRA_ROUTE_DELETE]
|
e4b29df to
0bc15d2
Compare
There's no point in installing routes for directly attached networks since connected routes already exist for this purpose. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
`ospfd` and `ospf6d` will no longer automatically generate connected routes for all interfaces. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
0bc15d2 to
32ad50b
Compare
There's no point in installing routes for directly attached networks since connected routes already exist for this purpose.