summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_intra.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ospf6d: add space between multi-line macrosAndrew Cooks2024-09-161-0/+16
| | | | | | For readability Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
* ospf6d: move lsa structs to ospf6_lsa.hAndrew Cooks2024-09-161-60/+0
| | | | | | | It will be cleaner to have the LSAs in a single header and the future TLVs in a single header. Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
* * : include event ptr in event_execute apiMark Stapp2023-07-251-5/+6
| | | | | | | | | Include an event ptr-to-ptr in the event_execute() api call, like the various schedule api calls. This allows the execute() api to cancel an existing scheduled task if that task is being executed inline. Signed-off-by: Mark Stapp <mjs@labn.net>
* *: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp2023-03-241-3/+3
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_execute to event_executeDonald Sharp2023-03-241-9/+9
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_add_XXX functions to event_add_XXXDonald Sharp2023-03-241-10/+10
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Rename `struct thread` to `struct event`Donald Sharp2023-03-241-6/+6
| | | | | | | | | Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-16/+1
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: Change thread->func to return void instead of intDonald Sharp2022-02-241-6/+6
| | | | | | | The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospf6d: introduce support for Graceful Restart (restarting mode)Renato Westphal2021-09-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ospf6d: Cleanup headers to our standardDonald Sharp2021-09-091-5/+5
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospf6d: use in_addr_t for area/router IDsDavid Lamparter2020-07-141-5/+5
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* ospf6d: ECMP for Intra Area Prefix routesChirag Shah2018-04-061-0/+3
| | | | | | | | | | | | | | | | | | | | Handle ECMP for Intra Area Prefix LSAs routes. Ticket:CM-16139 Testing Done: Configure ospf6 passive interface R2 and R3 with same prefix address. Check Intra Area Prefix LSA update at R1 and R3 which would have ECMP paths with effective two paths and two nexthops (from R2 and R4). stop frr at R3 and R1 and R4 route changes back to one nexthop and one paht. R1 ---- R2 | | R3 ---- R4 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-24/+24
| | | | | | | | | | | | | | | | | | | | | | 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>
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-061-5/+3
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* ospf6d: Handle Premature Aging of LSAsChirag Shah2018-02-151-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC 2328 (14.1) Premature aging of LSAs from routing domain : When ospf6d is going away (router going down), send MAXAGEd self originated LSAs to all neighbors in routing domain to trigger Premature aging to remove from resepective LSDBs. Neighbor Router Reboot: Upon receiving Self-originate MAXAGEd LSA, simply discard, Current copy could be non maxaged latest. For neighbor advertised LSA's (current copy in LSDB) is set to MAXAGE but received new LSA with Non-MAXAGE (with current age), discard the current MAXAGE LSA, Send latest copy of LSA to neighbors and update the LSDB with new LSA. When a neighbor transition to FULL, trigger AS-External LSAs update from external LSDB to new neighbor. Testing: R1 ---- DUT --- R5 | \ R2 R3 | R4 Area 1: R5 and DUT Area 0: DUT, R1, R2, R3 Area 2: R2 R4 Add IPv6 static routes at R5 Redistribute kernel routes at R5, Validate routes at R4, redistributed via backbone to area 2. Stop n start frr.service at R5 and validated MAXAGE LSAs then recent age LSAs in Database at DUT-R4. Validated external routes installed DUT to R4. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-155/+160
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-4/+3
| | | | | | | | | | | 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>
* *: remove THREAD_ON macros, add nullity checkQuentin Young2017-05-091-22/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way thread.c is written, a caller who wishes to be able to cancel a thread or avoid scheduling it twice must keep a reference to the thread. Typically this is done with a long lived pointer whose value is checked for null in order to know if the thread is currently scheduled. The check-and-schedule idiom is so common that several wrapper macros in thread.h existed solely to provide it. This patch removes those macros and adds a new parameter to all thread_add_* functions which is a pointer to the struct thread * to store the result of a scheduling call. If the value passed is non-null, the thread will only be scheduled if the value is null. This helps with consistency. A Coccinelle spatch has been used to transform code of the form: if (t == NULL) t = thread_add_* (...) to the form thread_add_* (..., &t) The THREAD_ON macros have also been transformed to the underlying thread.c calls. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: nuke ^L (page feed)David Lamparter2014-06-041-1/+1
| | | | | | | | | | | | | | Quagga sources have inherited a slew of Page Feed (^L, \xC) characters from ancient history. Among other things, these break patchwork's XML-RPC API because \xC is not a valid character in XML documents. Nuke them from high orbit. Patches can be adapted simply by: sed -e 's%^L%%' -i filename.patch (you can type page feeds in some environments with Ctrl-V Ctrl-L) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: improve ordered shutdownChristian Franke2014-03-181-5/+10
| | | | | | | | Improve the _disable/_enable infrastructure so it gets into a more usable shape and make 'no router ospf6' actually work. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: add overload supportDinesh Dutt2013-11-081-0/+8
| | | | | | | | | | | | | | OSPFv3: Support setting/clearing overload bit on router It is sometimes necessary for a router to gracefully remove itself from the SPF tree i.e. it cannot act as a transit router. It does this by setting the overload bit in the router LSA. This patch adds support for enabling/disabling the overload bit. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com> [DL: patch applied with fuzz] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: CVE-2011-3323 (fortify packet reception)Denis Ovsienko2011-09-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This vulnerability (CERT-FI #514840) was reported by CROSS project. ospf6d processes IPv6 prefix structures in incoming packets without verifying that the declared prefix length is valid. This leads to a crash caused by out of bounds memory access. * ospf6_abr.h: new macros for size/alignment validation * ospf6_asbr.h: idem * ospf6_intra.h: idem * ospf6_lsa.h: idem * ospf6_message.h: idem * ospf6_proto.h: idem * ospf6_message.c * ospf6_packet_minlen: helper array for ospf6_packet_examin() * ospf6_lsa_minlen: helper array for ospf6_lsa_examin() * ospf6_hello_recv(): do not call ospf6_header_examin(), let upper layer verify the input data * ospf6_dbdesc_recv(): idem * ospf6_lsreq_recv(): idem * ospf6_lsupdate_recv(): idem * ospf6_lsack_recv(): idem * ospf6_prefixes_examin(): new function, implements A.4.1 * ospf6_lsa_examin(): new function, implements A.4 * ospf6_lsaseq_examin(): new function, an interface to above * ospf6_packet_examin(): new function, implements A.3 * ospf6_rxpacket_examin(): new function, replaces ospf6_header_examin() * ospf6_header_examin(): sayonara * ospf6_receive(): perform passive interface check earliest possible, employ ospf6_rxpacket_examin()
* [trivia] finish off static'ification of ospf6d and ripngdPaul Jakma2008-08-221-22/+22
| | | | | | | | | 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.
* [ospf6d] Import GNU Zebra CVSps#3559: Fix inter-area as-ext bug, cleanup debugPaul Jakma2006-05-151-0/+49
| | | | | | | | | 2005-10-06 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> * ospf6_asbr.c: fix bug of calculating AS-External routes in other areas. Add debugging function for border-router calculation. * ospf6d.h: version 0.9.7p
* SVN revisions 916-920 from Zebra. ABR support is almost done.hasso2004-08-151-1/+13
|
* Ospf6d merge from Zebra repository with added privs stuff and mergedhasso2004-05-181-4/+126
| | | | zclient changes.
* Initial revisionpaul2002-12-131-0/+31