summaryrefslogtreecommitdiffstats
path: root/ospfd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #15846 from Shbinging/fix_ip_ospf_dead_interval_fast_helloRuss White2024-05-071-0/+2
|\ | | | | ospfd: fix the bug where ip_ospf_dead-interval_minimal_hello-multiplier did not reset hello timer
| * ospfd:fix the bug where ip_ospf_dead-interval_minimal_hello-multiplier did ↵Bing Shui2024-04-301-0/+2
| | | | | | | | | | | | not reset hello timer Signed-off-by: Bing Shui <652023330037@smail.nju.edu.cn>
* | Merge pull request #15824 from opensourcerouting/fix/ospf_show_non_defaultDonald Sharp2024-04-293-24/+25
|\ \ | | | | | | vtysh: Show `ip ospf network ...` even if it's not the same as the interface type
| * | vtysh: Show `ip ospf network ...` even if it's not the same as the interface ↵Donatas Abraitis2024-04-233-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | type ospfv3 shows this unconditionally, and ospfv2 does not show `ip ospf network ...` if the type of the interface matches the specified network. Fixes: https://github.com/FRRouting/frr/issues/15817 Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | | Merge pull request #15796 from LabNConsulting/aceelindem/ospf-ospfapi-optionsDonatas Abraitis2024-04-263-14/+45
|\ \ \ | |_|/ |/| | ospfd: OSPFAPI Server options to limit to local connections and per-instance TCP
| * | ospfd: OSPFAPI Server options to limit to local connections and per-instance TCPAcee Lindem2024-04-253-14/+45
| |/ | | | | | | | | | | | | | | | | | | This commit include OSPFAPI Server options to: 1. Allow specification of the OSPFAPI server local address. 2. Allow different OSPFAPI server TCP ports to be specified for different OSPF instances in /etc/services. Signed-off-by: Acee Lindem <acee@lindem.com>
* | Merge pull request #15783 from LabNConsulting/aceelindem/ospf-neighbor-filterDonatas Abraitis2024-04-245-1/+158
|\ \ | | | | | | ospfd: Add prefix-list filtering of OSPF neighbors on OSPF interface
| * | ospfd: Add prefix-list filtering of OSPF neighbors on OSPF interfaceAcee Lindem2024-04-185-1/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the capabiity to filter OSPF neighbors using a prefix-list with rules matching the neighbor's IP source address. Configuration, filtering, immediate neighbor pruning, topo-tests, and documentation are included. The command is: ip ospf neighbor-filter <prefix-list> [A.B.C.D] Signed-off-by: Acee Lindem <acee@lindem.com>
* | | Revert "ospfd: fix some dicey pointer arith in snmp module"Louis Scalbert2024-04-231-13/+13
| |/ |/| | | | | | | | | | | | | | | | | This reverts commit 438ef98701e9922e81a451f87ad053268a1a557e. The previous code was correct even if the coverity scanner was complaining. Fixes: https://github.com/FRRouting/frr/issues/15680 Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* | ospfd: fix 'no write-multiplier' commandBing Shui2024-04-171-1/+1
| | | | | | | | Signed-off-by: Bing Shui <652023330037@smail.nju.edu.cn>
* | ospfd: fix 'no maximum-paths' commandBing Shui2024-04-171-2/+3
|/ | | | Signed-off-by: Bing Shui <652023330037@smail.nju.edu.cn>
* Merge pull request #15724 from opensourcerouting/fix/ospfd_cleanup_deprecationDonald Sharp2024-04-151-9/+0
|\ | | | | ospfd, ospf6d: Remove deprecated JSON fields
| * ospfd, ospf6d: Remove deprecated JSON fieldsDonatas Abraitis2024-04-111-9/+0
| | | | | | | | | | | | restartSupoort Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | ospfd: Fix compile warning with `-Wformat-truncation`Donatas Abraitis2024-04-131-2/+2
|/ | | | | | | | | | | ospfd/ospf_sr.c: In function ‘show_sr_node.part.5’: ospfd/ospf_sr.c:2745:32: warning: ‘%u’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=] snprintf(tmp, sizeof(tmp), "%u", i); ^~ ospfd/ospf_sr.c:2745:31: note: directive argument in the range [0, 2147483646] snprintf(tmp, sizeof(tmp), "%u", i); Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* ospfd: Implement non-broadcast support for point-to-multipoint networksAcee Lindem2024-04-029-185/+131
| | | | | | | | | | | | | | | This extends non-broadcast support to point-to-multipoint networks. Neighbors will be explicitly configured and polled in lieu of multicast dicovery. Toptotests and documentation updates are included. Additionally, the ospf neighbor commands have been greatly simplified taking advantage of DEFPY() capabilities. The AllOSPFRouters (224.0.0.5) is still joined for non-broadcast networks since it is joined for NBMA networks. It seems this could be removed but it should done be in a separate commit. Signed-off-by: Acee Lindem <acee@lindem.com>
* Merge pull request #15593 from ↵Mark Stapp2024-03-222-19/+34
|\ | | | | | | | | LabNConsulting/acee/ospf-link-flap-ase-route-change ospfd: Assure OSPF AS External routes are installed after link flap
| * ospfd: Assure OSPF AS External routes are installed after link flapAcee2024-03-212-19/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSPF intra/inter area routes were previously marked to assure they are re-installed after a fast link flap in the commit: commit effee18744ad3e1777614f58350d74fb718d3211 Author: Donald Sharp <sharpd@nvidia.com> Date: Mon May 24 13:45:29 2021 -0400 ospfd: Fix quick interface down up event handling in ospf This commit extends this fix to OSPF AS External routes as well. Signed-off-by: Acee <aceelindem@gmail.com>
* | ospfd: Send LS Updates in response to LS Request as unicast.Acee Lindem2024-03-181-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | With this fix, OSPF LS Updates sent in response to OSPF LS Requests during the DB Exchange process will be sent as unicasts. Unless the timing of multiple database exchanges coincides, there is little chance that the LSAs in the LS Update are required by OSPF routers other than the one which elicited the LS Update. This is somewhat ambigous in RFC 2328 and two errata have been filed for clarification: https://www.rfc-editor.org/errata/eid7850 https://www.rfc-editor.org/errata/eid7851 FRR OSPFv3 (ospf6d) already does it correctly - see ospf6_lsupdate_send_neighbor(struct event *thread). Also, if there is any doubt, one can refer to the C++ code at ospf.org (John Moy's seminal OSPF reference implementation). Signed-off-by: Acee Lindem <acee@lindem.com>
* | Merge pull request #15469 from LabNConsulting/chopps/keychain-yangDonald Sharp2024-03-081-0/+2
|\ \ | | | | | | add ietf-key-chain YANG module support
| * | lib: add keychain northbound supportChristian Hopps2024-03-051-0/+2
| | | | | | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | | ospfd: Send update for route with new metricAlexander Rose2024-03-011-1/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | When an AS-external-route is deleted on our system and later added again with a new metric, then the ospfd would first send a LS-update to remove the old route and later another LS-update to add the route with the new metric again. But when this metric-change happens with no time inbetween the ospfd recognizes this as the same route and does not send any LS-update. With the change made here, the ospfd will interpret this route as a different route, when the metric has changed. Signed-off-by: Alexander Rose <alexander.rose@secunet.com>
* | Merge pull request #15431 from Orange-OpenSource/ospf-teDonatas Abraitis2024-02-271-0/+4
|\ \ | | | | | | ospfd: Solved crash in OSPF TE parsing
| * | ospfd: Solved crash in OSPF TE parsingOlivier Dugeon2024-02-271-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Iggy Frankovic discovered an ospfd crash when perfomring fuzzing of OSPF LSA packets. The crash occurs in ospf_te_parse_te() function when attemping to create corresponding egde from TE Link parameters. If there is no local address, an edge is created but without any attributes. During parsing, the function try to access to this attribute fields which has not been created causing an ospfd crash. The patch simply check if the te parser has found a valid local address. If not found, we stop the parser which avoid the crash. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | Merge pull request #15339 from opensourcerouting/fix/add_deprecationRuss White2024-02-261-3/+12
|\ \ | |/ |/| ospfd: Add deprecation cycle for `router-info X [A.B.C.D]` command
| * ospfd: Add deprecation cycle for `router-info X [A.B.C.D]` commandDonatas Abraitis2024-02-091-3/+12
| | | | | | | | | | | | | | Specifying an area is not relevant anymore. Use it for some time as a hidden command to avoid breaking the scripts. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | Merge pull request #15367 from rampxxxx/ldp_sync_cleanupRuss White2024-02-201-1/+1
|\ \ | | | | | | ospfd: fix cli shown in running config when turning off ldp-sync
| * | ospfd: fix cli shown in running config when turning off ldp-synclynnemorrison2024-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LDP-Sync is automatically enabled on interfaces when turned on in router ospf context. The user can remove ldp-sync from running on an interface, by issuing a "no ip ospd mpls ldp-sync" command. To remove all ldp-sync interface commands the user must delete ldp-sync at the router level. The code was not correctly removing the config. This PR fixes that issue. Now the extra cli ldp-sync commands are removed when ldp-sync is disabled. Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
* | | ospfd: Fix assignment with never being usedDonald Sharp2024-02-161-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | SA finds this: error 14-Feb-2024 14:52:24 ospfd/ospf_te.c:3962:2: warning: Value stored to 'sub' is never read [deadcode.DeadStores] error 14-Feb-2024 14:52:24 sub = 0; error 14-Feb-2024 14:52:24 ^ ~ error 14-Feb-2024 14:52:24 1 warning generated. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | ospfd: Decode Extended Link & Prefix TLVs for jsonOlivier Dugeon2024-02-121-65/+166
| | | | | | | | | | | | | | When dumping ospf database with json output, decode Extended Link and Extended Prefix TLVs and sub-TLVs. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | ospfd: Decode Router Info. TLVs for json outputOlivier Dugeon2024-02-121-86/+215
| | | | | | | | | | | | | | When dumping ospf database with json output, decode Router Information TLVs and sub-TLVs. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | ospfd: Decode TE TLVs for json outputOlivier Dugeon2024-02-121-129/+346
| | | | | | | | | | | | | | When dumping ospf database with json output, decode Traffic Engineering TLVs and sub-TLVs. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | ospfd: Prepare Opaque LSA for json outputOlivier Dugeon2024-02-121-10/+7
|/ | | | | | | Instead of output bulk of data with json output, prepare json context to decode opaque TLVs and sub-TLVs. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* Merge pull request #15333 from c-po/issue-14910Donatas Abraitis2024-02-091-0/+1
|\ | | | | ospfd: can not delete "segment-routing node-msd" when SR if off
| * ospfd: can not delete "segment-routing node-msd" when SR if offChristian Breunig2024-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | This fixes the initial implementation of commit 7743f2f8c00 ("OSPFd: Update Segment Routing PR following review") where it wsa not possible to remove the "segment-routing node-msd" CLI nodes via vtysh once segment-routing got disabled. Closes #14910 Signed-off-by: Christian Breunig <christian@breunig.cc>
* | ospfd: add support for "no router-info [<area|as>] command"Christian Breunig2024-02-081-2/+4
|/ | | | | | | | | | | | | | frr-reload.py will walk through all config contexts and prepend no to the CLI command. This requires that the vtysh shell code accepts a full command. To Reproduce vtysh -c "conf t" -c "router ospf" -c "router-info area" vtysh -c "conf t" -c "router ospf" -c "no router-info area" % Unknown command: no router-info area vtysh -c "conf t" -c "router ospf" -c "no router-info" Signed-off-by: Christian Breunig <christian@breunig.cc>
* *: use af-specific autocompletion for prefix-lists when possibleIgor Ryzhov2024-02-041-2/+2
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* *: create a single registry of daemons' default port valuesMark Stapp2024-02-012-7/+0
| | | | | | | | Create a single registry of default port values that daemons are using. Most of these are vty ports, but there are some others for features like ospfapi and zebra FPM. Signed-off-by: Mark Stapp <mjs@labn.net>
* ospfd: fix GR state locationDavid Lamparter2024-01-272-36/+38
| | | | | | | | | This belongs in `/var/lib`, not `/var/run`. Use library facility to load/save, support previous path as fallback, and do proper fsync(). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: fix `frr_daemon_info` indentationDavid Lamparter2024-01-271-5/+10
| | | | | | | | | | clang-format doesn't understand FRR_DAEMON_INFO is a long macro where laying out items semantically makes sense. (Also use only one `FRR_DAEMON_INFO(` in isisd so editors don't get confused with the mismatching `( ( )`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: remove sys/stat.h from zebra.hDonald Sharp2024-01-091-0/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Remove Crypto openSSL define from zebra.hDonald Sharp2024-01-041-0/+5
| | | | | | | Only a couple of places use this. Move these to a better spot. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospfd: Fix opaque functab leak and opaque AS cleanup problemsAcee2023-12-202-31/+72
| | | | | | | | | | | 1. Fix ospf opaque LSA function table memory leak. 2. Remove incorrect one-to-one association of OSPF info-per-type to function table (since there many be many). 3. Fix a problem with opaque AS external cleanup that was exposed by #2. 4. Fix LSA memory leak in ospf_opaque_type9_lsa_if_cleanup(). Signed-off-by: Acee <aceelindem@gmail.com>
* ospfd: Correct LSA parser which fulfill the TEDOlivier Dugeon2023-12-141-21/+8
| | | | | | | | | | | | | | | | | | | | Traffic Engineering Database (TED) is fulfill from the various LSA advertised and received by the router. To remove information on the TED, 2 mechanisms are used: i) parse TE Opaque LSA when there are flushed and ii) compare the list of prefixes advertised in the Router LSA with the list of corresponding edges and subnets contained in the TED. However, this second mechanism assumes that the Router LSA is unique and contains all prefixes of the advertised router. But, this is wrong. Prefixes could be advertised with several Router LSA. This conduct to remove edge and subnet in the TED while it should be maintained. The result is a faulty test with ospf_sr_te_topo1 topotest when server is heavy loaded. This simple patch removed deletion of edges and subnets when parsing the Router LSA and only removed them when the corresponding TE Opaque LSA is flushed. In addition, TE Opaque LSA are not flushed when OSPF ajacency goes down. This patch also correct this second problem. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* ospfd: fix ospf dead-interval minimal hello-multiplier param rangeBing Shui2023-12-131-3/+3
| | | | Signed-off-by: Bing Shui <652023330037@smail.nju.edu.cn>
* ospfd: Correct SID check sizeOlivier Dugeon2023-12-081-3/+15
| | | | | | | | | Segment Router Identifier (SID) could be an index (4 bytes) within a range (SRGB or SRLB) or an MPLS label (3 bytes). Thus, before calling check_size macro to verify SID TLVs size, it is mandatory to determine the SID type to avoid wrong assert. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* ospfd: fix deferred shutdown handlingRenato Westphal2023-12-011-44/+12
| | | | | | | | | | | | | | | | | | | | | The ospfd cleanup code is relatively complicated given the need to appropriately handle the "max-metric router-lsa on-shutdown (5-100)" command. When that command is configured and an OSPF instance is unconfigured, the removal of the instance should be deferred to allow other routers sufficient time to find alternate paths before the local Router-LSAs are flushed. When ospfd is killed, however, deferred shutdown shouldn't take place and all instances should be cleared immediately. This commit fixes a problem where ospf_deferred_shutdown_finish() was prematurely exiting the daemon when no instances were left, inadvertently preventing ospf_terminate() from clearing the ospfd global variables. Additionally, the commit includes code refactoring to enhance readability and maintainability. Fixes #14855. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ospfd: improve memory cleanup during shutdownRenato Westphal2023-12-012-7/+5
| | | | | | | | | | * On ospf_terminate(), proceed to clear the ospfd global variables even when no OSPF instance is configured * Remove double call to route_map_finish() * Call ospf_opaque_term() to clear the opaque LSA infrastructure * Clear the `OspfRI.area_info` and `om->ospf` global lists. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #14886 from LabNConsulting/aceelindem/ospf-link-local-fixDonatas Abraitis2023-11-295-25/+58
|\ | | | | ospfd: Fix OSPF link-local opaque LSA crash and opaque memory corruption
| * ospfd: Fix OSPF link-local opaque LSA crash and opaque memory corruptionAcee2023-11-285-25/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. When an OSPF interface is deleted, remove the references in link-local LSA. Delete the LSA from the LSDB so that the callback has accessibily to the interface prior to deletion. 2. Fix a double free for the opaque function table data structure. 3. Assure that the opaque per-type information and opaque function table structures are removed at the same time since they have back pointers to one another. 4. Add a topotest variation for the link-local opaque LSA crash. Signed-off-by: Acee <aceelindem@gmail.com>
* | Merge pull request #14811 from donaldsharp/zebra_final_shutdown_finallyChristian Hopps2023-11-281-0/+2
|\ \ | | | | | | Zebra final shutdown finally