summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_lsdb.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ospf6d: guard a couple of debugsJafar Al-Gharaibeh2025-01-101-2/+5
| | | | Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* ospf6d: replace ospf6_lsa_header_end()Andrew Cooks2024-09-161-2/+1
| | | | | | | | The void * return type of the replacement enables the removal of a cast at every point of use, and the name no longer suggests that it points to the last byte of the header. Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
* ospf6d: replace OSPF6_LSA_HEADER_END macroAndrew Cooks2024-05-281-3/+2
| | | | | | | | | | | | Replacing the macro with an inline function allows the compiler to check the parameter type. Use the replacement function consistently to reduce the number of open coded pointer cast plus offset calculations. use tools/indent.py to reformat all occurences of its use. Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
* * : include event ptr in event_execute apiMark Stapp2023-07-251-1/+1
| | | | | | | | | 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>
* ospf6d: Convert ospf6_lsa_unlock to a better apiDonald Sharp2023-07-121-5/+5
| | | | | | | | | Make the ospf6_lsa_unlock take the same parameters that the ospf_lsa_unlock does to make it consistent and to also ensure that no-one can make the mistake of getting the pointer cleared up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospf6d: unlock lsaryndia2023-07-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function ospf6_router_lsa_contains_adj(), ospf6_gr_check_adjs() and ospf6_find_interf_prefix_lsa() iterate through LSDB and lock each LSA. During testing, it was discovered that the lock count did not reach zero upon termination. The stack trace below indicates the leak. To resolve this issue, it was found that unlocking the LSA before returning from the functions solves the problem. This suggests that there was a missing unlock that caused the lock count to remain nonzero. ================================================================= ==22565==ERROR: LeakSanitizer: detected memory leaks Direct leak of 400 byte(s) in 2 object(s) allocated from: #0 0x7fa744ccea37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 #1 0x7fa744867562 in qcalloc ../lib/memory.c:105 #2 0x555cdbb37506 in ospf6_lsa_alloc ../ospf6d/ospf6_lsa.c:710 #3 0x555cdbb375d6 in ospf6_lsa_create ../ospf6d/ospf6_lsa.c:725 #4 0x555cdbaf1008 in ospf6_receive_lsa ../ospf6d/ospf6_flood.c:912 #5 0x555cdbb48ceb in ospf6_lsupdate_recv ../ospf6d/ospf6_message.c:1621 #6 0x555cdbb4ac90 in ospf6_read_helper ../ospf6d/ospf6_message.c:1896 #7 0x555cdbb4aecc in ospf6_receive ../ospf6d/ospf6_message.c:1925 #8 0x7fa744950c33 in event_call ../lib/event.c:1995 #9 0x7fa74483b34a in frr_run ../lib/libfrr.c:1213 #10 0x555cdbacf1eb in main ../ospf6d/ospf6_main.c:250 #11 0x7fa7443f9d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Objects leaked above: 0x6110000606c0 (200 bytes) 0x611000060940 (200 bytes) Indirect leak of 80 byte(s) in 2 object(s) allocated from: #0 0x7fa744cce867 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x7fa744867525 in qmalloc ../lib/memory.c:100 #2 0x555cdbb37520 in ospf6_lsa_alloc ../ospf6d/ospf6_lsa.c:711 #3 0x555cdbb375d6 in ospf6_lsa_create ../ospf6d/ospf6_lsa.c:725 #4 0x555cdbaf1008 in ospf6_receive_lsa ../ospf6d/ospf6_flood.c:912 #5 0x555cdbb48ceb in ospf6_lsupdate_recv ../ospf6d/ospf6_message.c:1621 #6 0x555cdbb4ac90 in ospf6_read_helper ../ospf6d/ospf6_message.c:1896 #7 0x555cdbb4aecc in ospf6_receive ../ospf6d/ospf6_message.c:1925 #8 0x7fa744950c33 in event_call ../lib/event.c:1995 #9 0x7fa74483b34a in frr_run ../lib/libfrr.c:1213 #10 0x555cdbacf1eb in main ../ospf6d/ospf6_main.c:250 #11 0x7fa7443f9d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Objects leaked above: 0x6040000325d0 (40 bytes) 0x604000032650 (40 bytes) SUMMARY: AddressSanitizer: 480 byte(s) leaked in 4 allocation(s). ================================================================= ==5483==ERROR: LeakSanitizer: detected memory leaks Direct leak of 2000 byte(s) in 10 object(s) allocated from: #0 0x7f2c3faeea37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 #1 0x7f2c3f68a6d9 in qcalloc ../lib/memory.c:105 #2 0x56431b83633d in ospf6_lsa_alloc ../ospf6d/ospf6_lsa.c:710 #3 0x56431b83640d in ospf6_lsa_create ../ospf6d/ospf6_lsa.c:725 #4 0x56431b7efe13 in ospf6_receive_lsa ../ospf6d/ospf6_flood.c:912 #5 0x56431b847b31 in ospf6_lsupdate_recv ../ospf6d/ospf6_message.c:1621 #6 0x56431b849ad6 in ospf6_read_helper ../ospf6d/ospf6_message.c:1896 #7 0x56431b849d12 in ospf6_receive ../ospf6d/ospf6_message.c:1925 #8 0x7f2c3f773c62 in event_call ../lib/event.c:1995 #9 0x7f2c3f65e2de in frr_run ../lib/libfrr.c:1213 #10 0x56431b7cdff6 in main ../ospf6d/ospf6_main.c:221 #11 0x7f2c3f21dd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Objects leaked above: 0x611000060800 (200 bytes) 0x611000060a80 (200 bytes) 0x611000060d00 (200 bytes) 0x611000060f80 (200 bytes) 0x611000061200 (200 bytes) 0x611000061480 (200 bytes) 0x611000061840 (200 bytes) 0x611000061ac0 (200 bytes) 0x61100006c740 (200 bytes) 0x61100006d500 (200 bytes) Indirect leak of 460 byte(s) in 10 object(s) allocated from: #0 0x7f2c3faee867 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x7f2c3f68a69c in qmalloc ../lib/memory.c:100 #2 0x56431b836357 in ospf6_lsa_alloc ../ospf6d/ospf6_lsa.c:711 #3 0x56431b83640d in ospf6_lsa_create ../ospf6d/ospf6_lsa.c:725 #4 0x56431b7efe13 in ospf6_receive_lsa ../ospf6d/ospf6_flood.c:912 #5 0x56431b847b31 in ospf6_lsupdate_recv ../ospf6d/ospf6_message.c:1621 #6 0x56431b849ad6 in ospf6_read_helper ../ospf6d/ospf6_message.c:1896 #7 0x56431b849d12 in ospf6_receive ../ospf6d/ospf6_message.c:1925 #8 0x7f2c3f773c62 in event_call ../lib/event.c:1995 #9 0x7f2c3f65e2de in frr_run ../lib/libfrr.c:1213 #10 0x56431b7cdff6 in main ../ospf6d/ospf6_main.c:221 #11 0x7f2c3f21dd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Objects leaked above: 0x604000033110 (40 bytes) 0x604000033190 (40 bytes) 0x604000033210 (44 bytes) 0x604000033290 (44 bytes) 0x604000033310 (44 bytes) 0x604000033390 (44 bytes) 0x604000033410 (44 bytes) 0x604000033490 (44 bytes) 0x604000034c90 (44 bytes) 0x6070000d3830 (72 bytes) SUMMARY: AddressSanitizer: 2460 byte(s) leaked in 20 allocation(s). Signed-off-by: ryndia <dindyalsarvesh@gmail.com>
* *: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp2023-03-241-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_execute to event_executeDonald Sharp2023-03-241-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospf6d: fix duplicate inter-area-prefix-LSAs after exiting from GR modeRenato Westphal2023-03-021-0/+27
| | | | | | | | | | An ABR that is originating inter-area-prefix-LSAs should take into account the fact that there might be self-originated LSAs for the same prefixes that were originated prior to a graceful restart. When that happens, the previous LSA-IDs should be reused to avoid having duplicate LSAs. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: 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>
* ospf6d: crash in ospf6_decrement_retrans_count.Manoj Naragund2022-03-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ospf6d crash is observed when lsack is received from the neighbour for AS External LSA. RCA: The crash is observed in ospf6_decrement_retrans_count while decrementing retransmit counter for the LSA when lsack is recived. This is because in ospf6_flood_interace when new LSA is being added to the neighbour's list the incrementing is happening on the received LSA instead of the already present LSA in scope DB which is already carrying counters. when this new LSA replaces the old one, the already present counters are not copied on the new LSA this creates counter mismatch which results in a crash when lsack is recevied due to counter going to negative. Fix: The fix involves following changes. 1. In ospf6_flood_interace when LSA is being added to retrans list check if there is alreday lsa in the scoped db and increment the counter on that if present. 2. In ospf6_lsdb_add copy the retrans counter from old to new lsa when its being replaced. Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
* ospf6d: add LSA statistics to LSA databaseDavid Schweizer2022-01-121-0/+12
| | | | Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
* ospf6d: Review comment fixesMobashshera Rasool2021-07-211-1/+1
| | | | | | This commit is ease reviewing the review comment fixes. Signed:-off-by: Mobashshera Rasool <mrasool@vmware.com>
* ospf6d: ASBR Summarisation feature implementationMobashshera Rasool2021-07-211-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Feature Implementation. ======================== This feature will help in advertising the External LSAs with aggregation. The commands allow us to tune the advertisement with different parameters as mentioned in the CLI List below. It can also help in case we do not want to advertise any prefix with the no-advertise option. New CLIs added: =============== summary-address X:X::X:X/M$prefix [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)}] no summary-address X:X::X:X/M$prefix [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)}] summary-address X:X::X:X/M$prefix no-advertise no summary-address X:X::X:X/M$prefix no-advertise aggregation timer (5-1800) no aggregation timer (5-1800) show ipv6 ospf6 summary-address [detail$detail] [json] debug ospf6 lsa aggregation CAT RUN: ======== QE to add test scripts Signed-Off-by: Mobashshera Rasool <mrassol@vmware.com>
* ospf6d: Support for nssa in ospfv3Kaushik2021-06-041-1/+10
| | | | | | | | | | | | | 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>
* ospf6d: kill ospf6_memory.h, use MTYPE_STATICDavid Lamparter2021-03-221-0/+2
| | | | | | | Same as other commits -- convert most DEFINE_MTYPE into the _STATIC variant, and move the remaining non-static ones to appropriate places. Signed-off-by: David Lamparter <equinox@diac24.net>
* ospf6d: Structural changes in ospf6d.cYash Ranjan2021-01-131-49/+0
| | | | | | | Removes the code redundancy for the show ipv6 ospf6 database command. Signed-off-by: Yash Ranjan <ranjany@vmware.com>
* ospf6d: fix compilation of debug codeIgor Ryzhov2020-11-181-3/+3
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* :* Convert prefix2str to %pFXDonatas Abraitis2020-10-221-5/+1
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* ospf6d, tests: Prevent use after freeDonald Sharp2020-10-111-4/+4
| | | | | | | | | | | | | | | | The code pattern: for (ALL_LSDB(lsdb, lsa)) { remove_lsa(lsa) } has a use after free in ALL_LSDB, since we ask for the next pointer, after it has been freed. Modify the code such that we grab the next pointer before we can possibly free it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospf6d: Revert "ospf6d: Prevent use after free"Donald Sharp2020-05-141-11/+4
| | | | | | | | | | This reverts commit 0f9f74baeb97f437d7acf7feda0f400d50943c4c. This commit was causing crashes and the goal of this commit was to make coverity sanity happy. I'd rather have coverity sad and not have ospfv3 crash Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospf6d: fix SA warningsMark Stapp2020-04-211-4/+4
| | | | | | Clean up some SA warnings in use of ospf6_lsa_unlock() Signed-off-by: Mark Stapp <mjs@voltanet.io>
* ospf6d: Prevent use after freeDonald Sharp2020-04-181-4/+4
| | | | | | | | | | | ospf6_lsa_unlock may free the lsa data structure as such we cannot use the passed in data structure after freeing it. Provide a mechanism to know if the data has been freed using the same usage patterns of other _unlock functions in FRR. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospf6d: Prevent use after freeDonald Sharp2019-09-251-4/+11
| | | | | | | | | the for (ALL_LSDB...) macro was iterating over lsa, when lsa had just been freed in these functions. Remove the macro and make the adjustments saving lsa_next before the free. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: do not check XMALLOC / XCALLOC for null retQuentin Young2019-02-261-4/+0
| | | | | | They never return NULL Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-12/+12
| | | | | | | | | | | | | | | | | | | | | | 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-2/+1
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* ospf6d: Handle Premature Aging of LSAsChirag Shah2018-02-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ospf6: Fix DEBUG compiling errorßingen2017-08-091-2/+1
| | | | | | | struct ospf6_lsa doesn't have next nor prev, so it was raising a compiling error if DEBUG is set. Signed-off-by: ßingen <bingen@voltanet.io>
* ospf6d: Fix memory leaksChirag Shah2017-07-271-0/+2
| | | | | | | | | | | | | | | | Free route node upon asbr redistribute route cleanup from external_id_table route tale. Free route node when route_remove is called and node->info is set to null. Decrement route node lock in route_lookup api as it is incremented as part of node_lookup api. use local variable for nexthop vs. malloc in zebra parse routine. two of the memory leaks related to nexthops per route were not freed. two of the memory leak detected per frr service restart Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* ospf6d: crash in ospf6_lsdb_showDaniel Walton2017-07-181-2/+4
| | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-369/+325
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: rewrite ospf6_lsdb_lookup_next()David Lamparter2017-07-111-30/+4
| | | | | | Again, replace open-coded table searches with API usage. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: rewrite LSDB iterationDavid Lamparter2017-07-111-135/+52
| | | | | | | rip out this pile of open-coded goo and replace it with uses of the API that table.h provides. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: use macro for LSDB walksDavid Lamparter2017-07-111-8/+5
| | | | | | ... to make it easier to refactor all of the iteration uses. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: add some abstraction guards for table codeDavid Lamparter2017-07-111-0/+3
| | | | | | | | route_node->parent and route_node->link shouldn't be touched by user code since that is a recipe for trouble once we have a hash table in parallel. 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>
* ospf6d: resolve problem with area range lsid creationDon Slice2017-01-031-18/+0
| | | | | | | | | | | | | | | | | | | | The problem reported was that routers downstream from the ABR would have prefixes in the IPv6 rib that should have been summarized. Testing showed that the prefixes were absent in the lsdb but not removed from the rib. The problem (and others) stemmed from determining the link-state id to use for the area-range statement only from other entries in the range-table. Since the area range statement creates inter-prefix LSAs (summaries) which are in all aspects identical to other inter-prefix LSAs, the number space for the lsid needs to be unique across all inter-prefix LSAs, not just unique between area range statements. This fix removes the use of range-table specific lsids and acquires the lsid just as any other inter-prefix LSA. Ticket: CM-13626 Signed-off-by: Don Slice Reviewed By: CCR-5489 Testing Done: Manual testing, repeated runs of the test that previously failed, ospf-smoke
* ospf6_lsdb: trivial, make it clear that showfunc is set before deref.Paul Jakma2016-05-261-10/+17
| | | | (cherry picked from commit 7bef33cbf5027189bd55e4890a07a6bef8277f93)
* Quagga: prefix2str fixupDonald Sharp2015-11-231-1/+1
| | | | | | | During CR for nexthop upstream it was noticed that usage of prefix2str was not consistent. This fixes this problem Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospf6d: ospfv3-abr-ecmp-support.patchDonald Sharp2015-05-201-6/+29
| | | | | | | 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>
* ospf6d: clear lsa->refresh before clearing LSAsDavid Lamparter2014-03-181-0/+2
| | | | | | | | | | | | | | | | | | | This fixes a SEGV when we receive a higher-SeqNum copy of a LSA that we originated ourselves, before a reboot of ospf6d. We create a new copy of the LSA to resync the SeqNum, but then half an hour later the old refresh thread ends up trying to refresh the free()'d old LSA. The SEGV is triggered by this chain: ospf6_lsdb_maxage_remover -> thread_execute(ospf6_lsa_refresh) -> old->refresh = NULL Which assumes that old->refresh is no longer scheduled to run, as it is being run right there. But the thread_execute() doesn't know about old->refresh and therefore didn't remove it. (Found by ANVL OSPFV3-16.17) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: handle seqnum wrappingDinesh Dutt2013-11-081-1/+12
| | | | | | | | Signed-off-by: Shrijeet Mukherjee <shm at cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> [DL: mechanical adjust to rebase] [DL: adjust to removal of timerwheel code] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: turn off expensive debuggingDinesh Dutt2013-11-081-3/+3
| | | | | | | | | OSPF6 has very expensive LSDB and route debug on by default. This needs to be turned off for scaled performance. Signed-off-by: James Li <jli at cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>Summary: Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: convert LSDB to use route_node, improve performanceDinesh Dutt2013-11-081-99/+66
| | | | | | | | | | | the performance in the presence of a large number of LSAs. I also verified that the performance improvements stayed in the presence of a large number of peers (I tested upto 128). Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>Summary: Reviewed-by: James Li <jli at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: reinvoke MaxAge remover thread if not all MaxAge LSAs were flushed.Dinesh Dutt2013-11-081-0/+23
| | | | | | | | | | | 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>
* ospf6d/ospfd: refactor some common definesDinesh Dutt2013-10-231-1/+1
| | | | | | | | | 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>
* ospf6d: fix warnings from recent prefix bit commitStephen Hemminger2009-12-101-2/+2
| | | | | | | | * lib/prefix.h * prefix6_bit(): add IPv6 wrapper for prefix_bit() * ospf6d/ospf6_lsdb.c * ospf6_lsdb_type_router_head(): employ prefix6_bit() * ospf6_lsdb_type_head(): idem
* lib: move check_bit into prefix common codeStephen Hemminger2009-12-091-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make one version of check prefix bit, and put it inline with proper prototype. This gets rid of some macro's and also some assert() that can never happen on a non-broken compiler. * bgpd/bgp_table.c * CHECK_BIT(): sayonara * check_bit(): sayonara * SET_LINK(): sayonara * set_link(): make use of prefix_bit() instead of check_bit() * bgp_node_match(): idem * bgp_node_lookup(): idem * bgp_node_get(): idem * lib/prefix.h * prefix_bit(): new inline version of check_bit() * lib/table.c * CHECK_BIT(): sayonara * check_bit(): sayonara * SET_LINK(): sayonara * set_link(): make use of prefix_bit() instead of check_bit() * route_node_match(): idem * route_node_lookup(): idem * route_node_get(): idem * ospf6d/ospf6_lsdb.c * CHECK_BIT(): sayonara * ospf6_lsdb_lookup_next(): make use of prefix_bit() instead of CHECK_BIT() * ospf6_lsdb_type_router_head(): idem * ospf6_lsdb_type_head(): idem * ospf6d/ospf6_route.c * CHECK_BIT(): sayonara * ospf6_route_match_head() make use of prefix_bit() instead of * CHECK_BIT()
* ospf6d: fix LSA locking in ospf6_new_ls_id()Tom Goff2009-12-011-0/+3
| | | | | | | * ospf6_lsdb.c: (ospf6_new_ls_id) Unlock the current LSA when breaking out of the ospf6_lsdb_*_head() / ospf6_lsdb_*_next() loop early. No explicit unlocking is needed when all LSAs are looped through because ospf6_lsdb_*_next() manages everything in that case.