summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_spf.h
AgeCommit message (Collapse)Author
2023-04-13ospf6d: missing ECMP NHs in certain topologieslynne
When ospf6 is started up and SPF is run depending on which route is selected as the parent route we could miss adding a NH. If one possible parent route has two equal cost paths and the second possible parent route has only one depending on which one is selected first determines if we have have one or two NHs. In the network below when creating a route 2001:db8:3:4::/64 in R2. When SPF is run there are two possible parent routes R3 and R4. 2001:db8:1:2 +-----+ 2001:db8:2:5 +--------------+ 2 +---------------+ | ::2 | | ::2 | | +-----+ | | | ::1| | +-----+ |::5 | 1 |2001:db8:1:3+-----+2001:db8:3:5+-----+2001:db8:5:6+-----+ | +------------+ 3 +------------+ 5 +------------+ 6 | +-----+ ::1 ::3 | |::3 ::5 | |::5 ::6| | ::1| +-----+ +-----+ +-----+ | |::3 | | 2001:db8:3:4 | | | |::4 | 2001:db8:1:4 +-----+ +--------------+ 4 | ::4 | | +-----+ The problem was if we first created the route to 2001:db8:3:4::/64 with R3 as the parent route all is fine. The code was merging the NH from the parent route and R3 has 2 NH, one pointing to R1 and one to R5. But if route 2001:db8:3:4::/64 was first created with parent as R4, it has only one NH pointing to R1, and then later a new vertex was created pointing to R3 the code would only copy the nhs from the vertex not from the parent route. The vertex always has just one NH. But the parent route could have more. So when we would bringup this setup one time we would see one NH for 2001:db8:3:4::/64 and the next time we would see two NHs. The code has been modified so that it behaves the same when the route is first created, or when a vertex is created, it selects the NHs from the parent route. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-16ospf6d: introduce support for Graceful Restart (restarting mode)Renato Westphal
RFC 5187 specifies the Graceful Restart enhancement to the OSPFv3 routing protocol. This commit implements support for the GR restarting mode. Here's a quick summary of how the GR restarting mode works: * GR can be enabled on a per-instance basis using the `graceful-restart [grace-period (1-1800)]` command; * To perform a graceful shutdown, the `graceful-restart prepare ipv6 ospf` EXEC-level command needs to be issued before restarting the ospf6d daemon (there's no specific requirement on how the daemon should be restarted); * `graceful-restart prepare ospf` will initiate the graceful restart for all GR-enabled instances by taking the following actions: o Flooding Grace-LSAs over all interfaces o Freezing the OSPF routes in the RIB o Saving the end of the grace period in non-volatile memory (a JSON file stored in `$frr_statedir`) * Once ospf6d is started again, it will follow the procedures described in RFC 3623 until it detects it's time to exit the graceful restart (either successfully or unsuccessfully). Testing done: * New topotest featuring a multi-area OSPF topology (including stub and NSSA areas); * Successful interop tests against IOS-XR routers acting as helpers. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-06-04ospf6d: support for nssa in ospfv3Kaushik
Fix for the routes which is not classified as best routes. Signed-off-by: Kaushik <kaushiknath.null@gmail.com>
2021-06-04ospf6d: Support for nssa in ospfv3Kaushik
The following is implemented. 1. Configuring area as NSSA. 2. Generating Type 7 LSA. 3. Conversion of Type 7 to Type 5 ( Default Behavior). 4. NSSA ABR selection. Reviewed-by: Rafael Zalamena <rzalamena@opensourcerouting.org> Co-authored-by: Kaushik <kaushiknath.null@gmail.com> Co-authored-by: Soman K.S <somanks@gmail.com> Signed-off-by: Kaushik <kaushiknath.null@gmail.com>
2021-03-29ospf6d: Add logic to change the status of router to ASBRYash Ranjan
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-17*: require semicolon after DEFINE_<typesafe...>David Lamparter
Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-02ospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"Yash Ranjan
Modify code to add JSON format output in show command "show ipv6 ospf6 spf tree" with proper formating Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-02-01ospf6d: add CLI to control maximum paths for routes.Mobashshera Rasool
CLI added: maximum-paths (1-64) Issue: #7961 Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-11-30ospf6: get instance from route table scopeIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-30ospf6d : Transformation changes for ospf6 vrf support.harios_niral
1. All the changes are related to handle ospf6 with different vrf. 2. The dependancy of global ospf6 is removed. Co-authored-by: Kaushik <kaushik@niralnetworks.com> Signed-off-by: harios_niral <hari@niralnetworks.com>
2019-04-27ospf6d: replace pqueue_* with DECLARE_SKIPLISTDavid Lamparter
As the previous commit, this replaces ospf6d's pqueue_* usage in SPF calculations with a DECLARE_SKIPLIST_* skiplist. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-22ospf6d: spf calculation w/ multiple router lsasChirag Shah
An OSPFv3 enabled Router can originate or receive multiple Link State-IDs for Router LSAs. As per RFC 5340 A 4.3, more than one Router LSAs, from given Vertex is considered (as concatenated) single large Router LSA. Created hidden show command to simulate concatenated large LSA from advertising/self Router LSAs. Ticket:CM-19329 Reviewed By: Testing Done: Simulate 160 subinterfaces between R1 === R2--R3, This triggers R1 and R2 to generate multiple link state IDs for Router LSAs. During SPF calculation only aggregated single router LSA processed and SPF tree formed. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-11-17ospf6d: SPF consider all Router LSAsChirag Shah
Based on RFC-5340, there could be multiple Router LSAs associated with Same Advertising Router. During SPF calculation ensure first Root Vertex accommodates all Link state IDs for its originated Router LSAs push them into priority queue. Similarly follow for other Vertexes, considering Router LSAs with multiple Link State IDs. Ticket: CM-18069 Testing Done: Topology: R1 === R2 -- R3 Validated with more than 100 Subinterfaces between R1 === R2 with broadcast links, Validated show ipv6 ospf6 spf tree containing all graph nodes. Validated ip -6 route at R3 and all intra prefix LSAs route installed with ospf6 as protocol. 2) Run R1 === R2 with Point-to-Point links. 3) Perform few other abr and ospf6 test cases of LSA ageout, route install and delete cases. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2015-05-19ospf6d: ospfv3-abr-ecmp-support.patchDonald Sharp
OSPFv3: Add ABR support and make ECMP > 4. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Signed-off-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com>
2013-11-07ospf6d: add SPF logs, statistics, and display of SPF parametersDinesh Dutt
Signed-off-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> [DL: adapted to rebase / readded randomly lost line] [DL: killed timeval_subtract] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-11-07ospf6d: schedule SPF to run on events rather than directly on each event.Dinesh Dutt
OSPV3 SPF triggers on every SPF-able event instead of using timers the way OSPFv2 does. This patch makes SPF be triggered/throttled similar to OSPFv2. It adds a command to quagga identical to the OSPFv2 equivalent to configure these timers. Summary: Signed-off-by: Dinesh Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> [DL: removed reference to oa->ts_spf for rebase] [DL: killed timeval_subtract] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2008-08-22[trivia] finish off static'ification of ospf6d and ripngdPaul Jakma
2008-08-15 Paul Jakma <paul.jakma@sun.com> * {ospf6d,ripngd}/*: Finish job of marking functions as static, or exporting declarations for them, to quell warning noise with Quagga's GCC default high-level of warning flags. Thus allowing remaining, more useful warnings to be more easily seen.
2004-11-25Merge svn revisions 1208, 1222 and 1228 from Zebra cvs.hasso
2004-10-102004-10-10 Paul Jakma <paul@dishone.st>paul
* ospf6_route.c: Add const qualifier to various char arrays of constants. signed/unsigned fixes. (ospf6_linkstate_table_show) argv is const * ospf6_snmp.c: listnode typedef is dead. (ospf6_snmp_init) Take struct thread_master arg, needed for smux_init. * ospf6_snmp.h: update ospf6_snmp_init declaration. * ospf6d.c: (ospf6_init) add const qualifier to sargv, pass master to ospf_snmp6_init. * ospf6_asbr.c: const char update. * ospf6_interface.c: ditto, plus signed/unsigned fixes. (ipv6_ospf6_cost) Check whether cost fits in u_int32_t and use strtoul. * ospf6_intra.c: const char update. Parenthesise expression. * ospf6_lsa.c: signed/unsigned and const char updates. * ospf6_proto.c: ditto. * ospf6_message.c: ditto. * ospf6_lsdb.c: signed/unsigned update. * ospf6_main.c: const char update. * ospf6_neighbor.c: ditto. * ospf6_spf.c: ditto. * ospf6_top.c: ditto.
2004-09-23Remove usage of evil list and listnode typedefs.hasso
2004-08-19Merge svn revisions 924 and 925 from Zebra CVS. Also remove uselesshasso
ospf6_lsdb prototype declaration from ospf6_lsa.h. Report sent to Yasuhiro Ohara as well.
2004-05-18Ospf6d merge from Zebra repository with added privs stuff and mergedhasso
zclient changes.
2002-12-13Initial revisionpaul