summaryrefslogtreecommitdiff
path: root/lib/libospf.h
AgeCommit message (Collapse)Author
2024-10-25ospfd: Fix opaque LSA refresh interval and modify LSA cmds.Acee Lindem
The configured OSPF refresh interval was not being used for opaque LSA (it always used the constant). Also, modified the timers lsa min-arrival command to have a maximum of 5000 msecs as well as providing a path for backward command compatibility. Added missing user documentation for both timers lsa min-arrival and timers throttle lsa all. Signed-off-by: Acee Lindem <acee@lindem.com>
2024-07-06ospfd: Fix several problems with direct acknowledgments and improved delay acks.Acee Lindem
1. On P2MP interfaces, direct ack would include the same LSA multiple times multiple packets are processed before the OSPF interfae direct LSA acknowledgment event is processed. Now duplicates LSA in the same event are suppressed. 2. On non-broadcast interfaces, direct acks for multiple neighbors would be unicast to the same neighbor due to the multiple OSPF LS Update packets being process prior to the OSPF interface direct ack event. Now, separate direct acks are unicast to the neighbors requiring them. 3. The interface delayed acknowledgment timer runs would run continously (every second as long as the interace is up). Now, the timer is set when delayed acknowledgments are queued and all queued delayed acknowledges are sent when it fires. 4. For non-broadcast interface delayed acknowledgments, the logic to send to multiple neighbors wasn't working because the list was emptied while building the packet for the first neighbor. Signed-off-by: Acee Lindem <acee@lindem.com>
2024-06-20ospfd: Improve OSPF neighbor retransmission list granularity and precisionAcee Lindem
The current OSPF neighbor retransmission operates on a single per-neighbor periodic timer that sends all LSAs on the list when it expires. Additionally, since it skips the first retransmission of received LSAs so that at least the retransmission interval (resulting in a delay of between the retransmission interval and twice the interval. In environments where the links are lossy on P2MP networks with "delay-reflood" configured (which relies on neighbor retransmission in partial meshs), the implementation is sub-optimal (to say the least). This commit reimplements OSPF neighbor retransmission as follows: 1. A new data structure making use the application managed typesafe.h doubly linked list implements an OSPF LSA list where each node includes a timestamp. 2. The existing neighbor LS retransmission LSDB data structure is augmented with a pointer to the list node on the LSA list to faciliate O(1) removal when the LSA is acknowledged. 3. The neighbor LS retransmission timer is set to the expiration timer of the LSA at the top of the list. 4. When the timer expires, LSAs are retransmitted that within the window of the current time and a small delta (50 milli-secs default). The LSAs that are retransmited are given an updated retransmission time and moved to the end of the LSA list. 5. Configuration is added to set the "retransmission-window" to a value other than 50 milliseconds. 6. Neighbor and interface LSA retransmission counters are added to provide insight into the lossiness of the links. However, these will increment quickly on non-fully meshed P2MP networks with "delay-reflood" configured. 7. Added a topotest to exercise the implementation on a non-fully meshed P2MP network with "delay-reflood" configured. The alternative was to use existing mechanisms to instroduce loss but these seem less determistic in a topotest. Signed-off-by: Acee Lindem <acee@lindem.com>
2024-04-02ospfd: Implement non-broadcast support for point-to-multipoint networksAcee Lindem
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>
2024-01-29lib,ospf6d: fix reference bandwidth descriptionPhilippe Guibert
Fix reference bandwidth description. It is Kbps, not Mbps. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-07-20ospfd: Implement OSPF prefix-suppression as specified in RFC 6860Acee
Signed-off-by: Acee <aceelindem@gmail.com>
2023-06-28 ospfd: Configurable interface-level 'capability opaque' supportAcee
Add support for "[no] ip ospf capbility opaque" at the interface level with the default being capability opaque enabled. The command "no ip ospf capability opaque" will disable opaque LSA database exchange and flooding on the interface. A change in configuration will result in the interface being flapped to update our options for neighbors but no attempt will be made to purge existing LSAs as in dense topologies, these may received by neighbors through different interfaces. Topotests are added to test both the configuration and the LSA opaque flooding suppression. Signed-off-by: Acee <aceelindem@gmail.com>
2023-05-22ospfd: OSPF P2MP Delayed Reflooding configurationAcee
Currently, delayed reflooding on P2MP interfaces for LSAs received from neighbors on the interface is unconditionally (see commit c706f0e32ba8aa8780a0618b6fbba364c383ae05). In some cases, this change wasn't desirable and this feature makes delayed reflooding configurable for P2MP interfaces via the CLI command: "ip ospf network point-to-multipoint delay-reflood" in interface submode. Signed-off-by: Acee <aceelindem@gmail.com>
2023-05-08ospfd, ospf6d: introduce the "graceful-restart hello-delay" commandRenato Westphal
This command makes unplanned GR more reliable by manipulating the sending of Grace-LSAs and Hello packets for a certain amount of time, increasing the chance that the neighboring routers are aware of the ongoing graceful restart before resuming normal OSPF operation. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
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>
2022-11-21ospfd: Fix RFC conformance test cases 25.19 and 27.6Mobashshera Rasool
Steps to reproduce: -------------------------- 1. ANVL: Establish full adjacency with DUT for neighbor Rtr-0-A on DIface-0 with DUT as DR. 2. ANVL: Listen (for up to 2 * <RxmtInterval> seconds) on DIface-0. 3. DUT: Send <OSPF-LSU> packet. 4. ANVL: Verify that the received <OSPF-LSU> packet contains a Network- LSA for network N1 originated by DUT, and the LS Sequence Number is set to <InitialSequenceNumber>. 5. ANVL: Establish full adjacency with DUT for neighbor Rtr-0-B on DIface-0 with DUT as DR. 6. ANVL: Listen (for up to 2 * <RxmtInterval> seconds) on DIface-0. 7. DUT: Send <OSPF-LSU> packet. 8. ANVL: Verify that the received <OSPF-LSU> packet contains a new instance of the Network-LSA for network N1 originated by DUT, and the LS Sequence Number is set to (<InitialSequenceNumber> + 1). Both the test cases were failing while verifying the initial sequence number for network LSA. This is because currently OSPF does not reset its LSA sequence number when it is going down. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-10-05lib: fix spelling nits in more lib filesewlumpkin
Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
2019-02-11lib: add extern "C" {} blocks to all libfrr headersRenato Westphal
These are necessary to use functions defined in these headers from C++. Signed-off-by: David Lamparter <equinox@diac24.net> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-09ospf: Fix segfault if compiled with DEBUGßingen
If OSPF_LS_REFRESH_TIME is 60, min_delay in ospf_refresher_register_lsa function (ospf_lsa.c) would be negative, so index (which is unsigned) would be out of range, causing a segfault. Signed-off-by: ßingen <bingen@voltanet.io>
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>
2016-06-13ospfd/ospf6d/zebra: Change interface bandwidth range and auto-cost range to 100GDon Slice
Prior to this change, interface bandwidth could not be defined above 10G. With the use of higher speed interfaces, the ability to effectively define the path links was highly impacted. Additionally, the default auto-cost reference-bandwidth for ospf and ospfv3 was set to 100M, which relects a much earlier time. Changed both the range of interface bandwidth definitions and reference bandwidths to be up to 100G. Set the default interface bandwidth (if not defined) to 10G to make the ratio continue to cause a cost of 10 as before. Manual testing as well as ospf-min and ospf-smoke passed successfully. Ticket: CM-10756 Signed-of-by: Don Slice Reviewed-by: Donald Sharp
2015-10-20Lower the default OSPF spf timers to '0 50 5000'Daniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-7901
2015-07-31configuration options for faster OSPF convergenceMichael Rossberg
Allow configuration of faster OSPF convergence via the min_ls_interval and min_ls_arrival timer lengths. This patch was originated by Michael, and cross-ported to Cumulus's Quagga. Signed-off-by: Michael Rossberg <michael.rossberg@tu-ilmenau.de> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2015-05-19lib: lib-warnings.patchDonald Sharp
Remove compile warnings for the lib directory Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by:
2015-05-19Command to adjust min-arrival value in Milliseconds.Donald Sharp
timers lsa min-arrival <1-60000> Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com> Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
2015-05-19ospf6d: ospfv3-stub-area-support.patchDonald Sharp
Support stubby and totally stubby areas in OSPFv3 Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com>
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 p2p interface supportDinesh Dutt
Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Signed-off-by: Ayan Banerjee <ayabaner at gmail.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> Reviewed-by: James Li <jli at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-11-07ospf6d: reinvoke MaxAge remover thread if not all MaxAge LSAs were flushed.Dinesh Dutt
MaxAge LSAs are being flushed out only on an event, unlike OSPFv2 where they're flushed out periodically. This causes certain LSAs to hang around forever, never getting flushed out. This patch makes flushing out MaxAge LSAs periodic, retriggered after a certain period if not all MaxAge LSAs were flushed out. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2013-10-22ospf6d/ospfd: refactor some common definesDinesh Dutt
Rearranging common defs and structures for use betweeen OSPFv2 and OSPFv3. Created a new file called libospf.h under lib directory to hold defines that are common between OSPFv2 and OSPFv3 code bases. [DL: split of defines refactor from timer refactor] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>