summaryrefslogtreecommitdiff
path: root/ospfd/ospf_lsa.h
AgeCommit message (Collapse)Author
2025-02-24ospfd: remove unused function ins ospfd/ospf_lsa.cDonna Sharp
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
2025-02-12ospfd: Replace LSDB callbacks with LSA Update/Delete hooks.Acee Lindem
Replace the LSDB callbacks with LSA update and delete hooks using the the FRR hook mechanism. Remove redundant callbacks by placing the LSA update and delete hooks in a single place so that deletes don't need to be handled by the update hook. Simplify existing OSPF TE and OSPF API Server callbacks now that there is no ambiguity or redundancy. Also cleanup the debugging by separating out opaque-lsa debugging from the overloaded event debugging. Signed-off-by: Acee Lindem <acee@lindem.com>
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-10-15ospfd: Fixup ospf_lsa.[ch] to properly spell out parameters for functionsDonald Sharp
Our standard says when in a .h file and declaring a function all parameters must have their variables spelled out. Let's do this for ospf_lsa.h Modified ospf_lsa.c to also use event instead of thread, and uint8_t instead of unsigned short. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-31ospfd: implement Type-7 default routes for NSSA areasRenato Westphal
Add the "default-information-originate" option to the "area X nssa" command. That option allows the origination of Type-7 default routes on NSSA ABRs and ASBRs. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
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>
2023-02-21Merge pull request #12366 from manojvn/ospfv2-flood-reductionRuss White
ospfd: Support OSPF Refresh and Flooding Reduction RFC4136.
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>
2023-01-19ospfd: ospf hello changes.Manoj Naragund
Description: The changes involve setting DC bit on ospf hellos and addition of new DO_NOT_AGE flag. Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
2023-01-17Revert "ospfd: rSPF calc and messaging for optimal route reflection"Donatas Abraitis
This reverts commit a3d3a14c09cf212c7d402670247c4d518b99d8b7.
2022-10-21ospfd/ospfclient: add option to flush/withdrawal with zero lengthLou Berger
default behavior is unchanged, i.e., to not zero Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-12ospfd: rSPF calc and messaging for optimal route reflectionMadhuri Kuruganti
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
2022-08-31ospfd: Added clis to change default timers for LSA refresh and maxage remove ↵Manoj Naragund
delay. Description: Added hidden clis that will allow you to reset the default timers for LSA refresh and LSA maxage remove delay, these will help in testing LSA refresh scenarios in upcoming OSPFv2 Flood reduction feature(rfc4136). IETF Link : https://datatracker.ietf.org/doc/html/rfc4136 Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
2022-02-23*: Change thread->func to return void instead of intDonald Sharp
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>
2022-01-22ospfd: Modifying LSID generation algorithmrgirada
Description: This LSID alogithm added as per rcf2328 Appendex-E recommendation. This applies only for AS-external lsas and summary lsas. As an example of the algorithm, consider its operation when the following sequence of events occurs in a single router (Router A). (1) Router A wants to originate an AS-external-LSA for [10.0.0.0,255.255.255.0]: (a) A Link State ID of 10.0.0.0 is used. (2) Router A then wants to originate an AS-external-LSA for [10.0.0.0,255.255.0.0]: (a) The LSA for [10.0.0,0,255.255.255.0] is reoriginated using a new Link State ID of 10.0.0.255. (b) A Link State ID of 10.0.0.0 is used for [10.0.0.0,255.255.0.0]. (3) Router A then wants to originate an AS-external-LSA for [10.0.0.0,255.0.0.0]: (a) The LSA for [10.0.0.0,255.255.0.0] is reoriginated using a new Link State ID of 10.0.255.255. (b) A Link State ID of 10.0.0.0 is used for [10.0.0.0,255.0.0.0]. (c) The network [10.0.0.0,255.255.255.0] keeps its Link State ID of 10.0.0.255. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2021-11-23ospfd: fix incorrect detection of topology changes in helper modeRenato Westphal
This commit fixes a rather obscure bug that was causing the GR topotest to fail on a frequent basis. RFC 3623 specifies that a router acting as a helper to a restarting neighbor should monitor topology changes and abort the GR procedures when one is detected, falling back to normal OSPF operation. ospfd uses the ospf_lsa_different() function to detect when the content of an LSA has changed, which is considered as a topology change. The problem is that ospf_lsa_different() can return true even when the two LSAs passed as parameters are identical, provided one LSA has the OSPF_LSA_RECEIVED flag set and the other not. In the context of the ospf_gr_topo1 test, router rt6 performs a graceful restart and a few seconds later acts as a helper for router rt7. When it's acting as a helper for rt7, it still didn't translate its NSSA Type-7 LSAs, something that happens only after 7 seconds (OSPF_ABR_TASK_DELAY) of the first SPF run. The translated Type-5 LSAs on its LSDB were learned from the helping neighbors (rt3 and rt7). It's then possible that the NSSA Type-7 LSAs might be translated while rt6 is acting as helper for rt7, which causes the daemon to detect a non-existent topology change only because the OSPF_LSA_RECEIVED flag is unset in the recently originated Type-5 LSA. Fix this problem by ignoring the OSPF_LSA_RECEIVED flag when comparing LSAs for the purpose of topology change detection. In short, the bug would only show up when the restarting router would start acting as a helper immediately after coming back up (which would be hard to happen in the real world). The topotest failures became more frequent after commit 6255aad0bc78c1 because of the removal of the 'sleep' calls, which used to give ospfd more time to converge before start acting as a helper for other routers. The problem still occurred from time to time though. Fixes #9983. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-10-20lib: change thread_add_* APIIgor Ryzhov
Do not return pointer to the newly created thread from various thread_add functions. This should prevent developers from storing a thread pointer into some variable without letting the lib know that the pointer is stored. When the lib doesn't know that the pointer is stored, it doesn't prevent rescheduling and it can lead to hard to find bugs. If someone wants to store the pointer, they should pass a double pointer as the last argument. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-09-03ospfd: RFC conformance test case 25.23 issue fixMobashshera Rasool
Problem Statement : =================== LSA with InitialSequenceNumber is not originated after MaxSequenceNumber. ANVL Test case 25.33 states: ============================ As soon as this flooding of a LSA with LS sequence number MaxSequenceNumber has been acknowledged by all adjacent neighbors, a new instance can be originated with sequence number of InitialSequenceNumber. RCA : ===== DUT did not originated LSA with INITIAL_SEQUENCE number even after receiving ACK for max sequence LSA. Code is not present to handle this situation in the lsa ack flow. Fix : ===== Add code to originate LSA with initial sequence number in the LSA ack flow in case of wrap around sequence number. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-09-03ospfd: ANVL Test case 25.22, 25.23 and 28.11 fixesMobashshera Rasool
ANVL Test case 28.11 If the database copy has LS age equal to MaxAge and LS sequence number equal to MaxSequenceNumber, simply discard the received LSA without acknowledging it. ANVL Test Case 25.22 When an attempt is made to increment the sequence number past the maximum value of N - 1 (0x7fffffff; also referred to as MaxSequenceNumber), the current instance of the LSA must first be flushed from the routing domain. ANVL Test Case 25.23 As soon as this flooding of a LSA with LS sequence number MaxSequenceNumber has been acknowledged by all adjacent neighbors, a new instance can be originated with sequence number of InitialSequenceNumber. RCA: When IXIA sent LS Seq num as MAX and LS Age as (MAX - 3), DUT dropped the packet instead of sending ACK. In function ospf_ls_upd, at Line 2106 the code is there to drop the LSA. Hence its failing. Fix: LSAs ACK must be sent when received LSA is having max sequence number but not max-aged. Considering /* CVE-2017-3224 */ issue, have corrected the existing code to prevent attacker from sending LSAs with max sequence number and higher checksum and blocking the flooding of the Max-sequence numbered LSAs. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-09lib,ospfd,ospf6d: remove duplicated functionRafael Zalamena
Move `is_default_prefix` variations to `lib/prefix.h` and make the code use the library version instead of implementing it again. NOTE ---- The function was split into per family versions to cover all types. Using `union prefixconstptr` is not possible due to static analyzer warnings which cause CI to fail. The specific cases that would cause this failure were: - Caller used `struct prefix_ipv4` and called the generic function. - `is_default_prefix` with signature using `const struct prefix *` or `union prefixconstptr`. The compiler would complain about reading bytes outside of the memory bounds even though it did not take into account the `prefix->family` part. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-05-19ospfd: Correct Coverity defectsOlivier Dugeon
When browsing or parsing OSPF LSA TLVs, we need to use the LSA length which is part of the LSA header. This length, encoded in 16 bits, must be first converted to host byte order with ntohs() function. However, Coverity Scan considers that ntohs() function return TAINTED data. Thus, when the length is used to control for() loop, Coverity Scan marks this part of the code as defect with "Untrusted Loop Bound" due to the usage of Tainted variable. Similar problems occur when browsing sub-TLV where length is extracted with ntohs(). To overcome this limitation, a size attribute has been added to the ospf_lsa structure. The size is set when lsa->data buffer is allocated. In addition, when an OSPF packet is received, the size of the payload is controlled before contains is processed. For OSPF LSA, this allow a secure buffer allocation. Thus, new size attribute contains the exact buffer allocation allowing a strict control during TLV browsing. This patch adds extra control to bound for() loop during TLV browsing to avoid potential problem as suggested by Coverity Scan. Controls are based on new size attribute of the ospf_lsa structure to avoid any ambiguity. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-03-24ospfd: add support for suppress_fackishimo
This command will trigger the OSPF forwarding address suppression in translated type-5 LSAs, causing a NSSA ABR to use 0.0.0.0 as a forwarding address instead of copying the address from the type-7 LSA Example: In a topology like: R1 --- R2(ABR) --- R3(ASBR) R3 is announcing a type-7 LSA that is translated to type-5 by the R2 ABR. The forwarding address in the type-5 is by default copied from the type-7 r1# sh ip os da external AS External Link States LS age: 6 Options: 0x2 : *|-|-|-|-|-|E|- LS Flags: 0x6 LS Type: AS-external-LSA Link State ID: 3.3.3.3 (External Network Number) Advertising Router: 10.0.25.2 LS Seq Number: 80000001 Checksum: 0xcf99 Length: 36 Network Mask: /32 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 10.0.23.3 <--- address copied from type-7 lsa External Route Tag: 0 r2# sh ip os database NSSA-external Link States (Area 0.0.0.1 [NSSA]) Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.23.3 8 0x80000001 0x431d E2 3.3.3.3/32 [0x0] AS External Link States Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 0 0x80000001 0xcf99 E2 3.3.3.3/32 [0x0] r2# conf t r2(config)# router ospf r2(config-router)# area 1 nssa suppress-fa r2(config-router)# exit r2(config)# exit r2# sh ip os database NSSA-external Link States (Area 0.0.0.1 [NSSA]) Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.23.3 66 0x80000001 0x431d E2 3.3.3.3/32 [0x0] AS External Link States Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 16 0x80000002 0x0983 E2 3.3.3.3/32 [0x0] r1# sh ip os da external OSPF Router with ID (11.11.11.11) AS External Link States LS age: 34 Options: 0x2 : *|-|-|-|-|-|E|- LS Flags: 0x6 LS Type: AS-external-LSA Link State ID: 3.3.3.3 (External Network Number) Advertising Router: 10.0.25.2 LS Seq Number: 80000002 Checksum: 0x0983 Length: 36 Network Mask: /32 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 0.0.0.0 <--- address set to 0 External Route Tag: 0 r2# conf t r2(config)# router ospf r2(config-router)# no area 1 nssa suppress-fa r2(config-router)# exit r1# sh ip os da external OSPF Router with ID (11.11.11.11) AS External Link States LS age: 1 Options: 0x2 : *|-|-|-|-|-|E|- LS Flags: 0x6 LS Type: AS-external-LSA Link State ID: 3.3.3.3 (External Network Number) Advertising Router: 10.0.25.2 LS Seq Number: 80000003 Checksum: 0xcb9b Length: 36 Network Mask: /32 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 0.0.0.0 <--- address set to 0 External Route Tag: 0 r2# conf t r2(config)# router ospf r2(config-router)# no area 1 nssa suppress-fa r2(config-router)# exit r1# sh ip os da external OSPF Router with ID (11.11.11.11) AS External Link States LS age: 1 Options: 0x2 : *|-|-|-|-|-|E|- LS Flags: 0x6 LS Type: AS-external-LSA Link State ID: 3.3.3.3 (External Network Number) Advertising Router: 10.0.25.2 LS Seq Number: 80000003 Checksum: 0xcb9b Length: 36 Network Mask: /32 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 10.0.23.3 <--- address copied from type-7 lsa External Route Tag: 0 Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-19ospfd: TI-LFA basic infrastructure and algorithmsGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-11-01ospfd: ospf summarisation core handlersrgirada
Description: Apis for creating/deleting aggregate routes. Origination of summary route on behalf of matched external routes. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-10-24ospfd: External LSA not flushed when area is configured as nssa or stubSoman K S
Issue: When the ospf area is changed from default to nssa or stub, the previously advertised external LSAs are not removed from the neighbor. The LSAs remain in database till maxage timeout. Fix: Advertise the external LSAs with age set to maxage and flood to the nssa or stub area. Signed-off-by: kssoman <somanks@gmail.com>
2020-09-22ospfd: GR helper exit scenariosrgirada
Description: The follwoing helper exit scenarios are handled. 1. Recv Max age grace LSA from RESTARTER. 2. Grace timer expiry. 3. Due to topo change if lsa check is enabled. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-22ospfd: Grace LSA processingrgirada
Description: 1. Grace LSA processing. 2. Validations to become a Helper. rfc3623 section 3.1 Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2019-08-02Revert "ospfd: remove default origin max age lsa"David Lamparter
This reverts commit 313919d6e3db67eedef77960ea4e2ba2a6018ee1. This is not the correct way to fix this. - touching the LSDB to explicitly remove a MaxAge LSA is always wrong and results in desynchronization of the entire routing domain - the LSDB code correctly handles replacing a MaxAge LSA with a newly issued one - removing the old LSA resets the sequence numbers, which may cause other routers to reject the new LSA as old - the function was horribly misnamed Signed-off-by: David Lamparter <equinox@diac24.net>
2019-08-02ospfd: kill totally misnamed "timers"David Lamparter
Neither ospf_external_lsa_originate_timer() nor ospf_default_originate_timer() are actually timers. They're only executed on router-ID changes to refresh a particular LSA type. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-04-27ospfd: replace pqueue_* with DECLARE_SKIPLISTDavid Lamparter
This replaces the SPF pqueue_* with a DECLARE_SKIPLIST_* skiplist. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-04-08ospfd: fix behavior of +/-metricQuentin Young
OSPFD uses -1 as a sentinel value for uninitialized metrics. When applying a route map with a +/-metric to redistributed routes, we were using -1 as our base value to increment or decrement on, which meant that if you set e.g. +10, you would end up with a redistributed route of metric 9. This patch also removes an off-by-one sanity check that would cause a set metric +1 or set metric 0 to result in a metric value of 20 :-) Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-01-15ospfd: remove default origin max age lsaChirag Shah
default-information originate does not work if config is removed and re-added. Ticket:CM-20026 Testing Done: Validate default-information originate config removed and re-added, check ospf lsa database, and peer route cache entry for default route. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-08-20ospfd: Add ospf_lsa_new_and_data function and abstract awayDonald Sharp
In all but one instance we were following this pattern with ospf_lsa_new: ospf_lsa_new() ospf_lsa_data_new() so let's create a ospf_lsa_new_and_data to abstract this bit of fun and cleanup all the places where it assumes these function calls can fail. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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>
2017-10-03ospfd: OSPFv2 VRF SupportChirag Shah
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>
2017-01-23ospfd: time: replace local helpers with monotimeDavid Lamparter
This ditches tv_add, tv_sub, tv_cmp, etc. in favour of monotime{,_since,_until}() which actually makes the code much more readable in some locations. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-08-18*: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma
(cherry picked from commit 9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744)
2016-08-16ospfd: Remove HAVE_OPAQUE_LSADonald Sharp
HAVE_OPAQUE_LSA is used by default and you have to actively turn it off except that OPAQUE_LSA is an industry standard and used pretty much everywhere. There is no need to have special #defines for this anymore. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> (cherry picked from commit 36fef5708d074a3ef41f34d324c309c45bae119b)
2016-06-09ospfd: Fast OSPF convergenceMichael Rossberg
When considering small networks that have extreme requirements on availability and thus convergence delay, the timers given in the OSPF RFC seem a little “conservative”, i.e., the delay between accepted LSAs and the rate at which LSAs are sent. Cisco introduced two commands 'timers throttle lsa all’ and 'timers lsa arrival’, which allow operators to tune these parameters. I have been writing a patch to also support 'timers lsa arrival’ fully and ‘timers throttle lsa all’ (without the throttling part) also in quagga.
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-19Changing router-id inline isnt handled correctly in the current implementation.Donald Sharp
At the minimum, the OSPF_LSA_SELF logic isnt foolproof, and it may hit assert in ospf_refresh_unregister_lsa on a router-id change. Once OSPF has created and flooded LSAs, its not a good idea to change router-id inline. Tying it to restart has at least two benefits: - Implementation can remain sane by not having to re-adjust neighbors and LSAs, based on the new router-id. - Works as a deterrent for the user to not meddle with the router-id unless really needed.
2015-05-19Multi-Instance OSPF SummaryDonald Sharp
——————————————------------- - etc/init.d/quagga is modified to support creating separate ospf daemon process for each instance. Each individual instance is monitored by watchquagga just like any protocol daemons.(requires initd-mi.patch). - Vtysh is modified to able to connect to multiple daemons of the same protocol (supported for OSPF only for now). - ospfd is modified to remember the Instance-ID that its invoked with. For the entire life of the process it caters to any command request that matches that instance-ID (unless its a non instance specific command). Routes/messages to zebra are tagged with instance-ID. - zebra route/redistribute mechanisms are modified to work with [protocol type + instance-id] - bgpd now has ability to have multiple instance specific redistribution for a protocol (OSPF only supported/tested for now). - zlog ability to display instance-id besides the protocol/daemon name. - Changes in other daemons are to because of the needed integration with some of the modified APIs/routines. (Didn’t prefer replicating too many separate instance specific APIs.) - config/show/debug commands are modified to take instance-id argument as appropriate. Guidelines to start using multi-instance ospf --------------------------------------------- The patch is backward compatible, i.e for any previous way of single ospf deamon(router ospf <cr>) will continue to work as is, including all the show commands etc. To enable multiple instances, do the following: 1. service quagga stop 2. Modify /etc/quagga/daemons to add instance-ids of each desired instance in the following format: ospfd=“yes" ospfd_instances="1,2,3" assuming you want to enable 3 instances with those instance ids. 3. Create corresponding ospfd config files as ospfd-1.conf, ospfd-2.conf and ospfd-3.conf. 4. service quagga start/restart 5. Verify that the deamons are started as expected. You should see ospfd started with -n <instance-id> option. ps –ef | grep quagga With that /var/run/quagga/ should have ospfd-<instance-id>.pid and ospfd-<instance-id>/vty to each instance. 6. vtysh to work with instances as you would with any other deamons. 7. Overall most quagga semantics are the same working with the instance deamon, like it is for any other daemon. NOTE: To safeguard against errors leading to too many processes getting invoked, a hard limit on number of instance-ids is in place, currently its 5. Allowed instance-id range is <1-65535> Once daemons are up, show running from vtysh should show the instance-id of each daemon as 'router ospf <instance-id>’ (without needing explicit configuration) Instance-id can not be changed via vtysh, other router ospf configuration is allowed as before. Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
2013-04-20ospfd: fix flooding procedureChristian Franke
An ospf router should accept a new maxage LSA into its lsdb if it has any neighbors in state Exchange or Loading. ospfd would however only account for neighbors on the same interface which does not seem to be a valid optimization. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: Joachim Nilsson <troglobit@gmail.com> Signed-off-by: David Lamparter <equinox@diac24.net>
2013-01-07ospfd: compile warning cleanupsAndrew Certain
A set of patches to clarify some comments as well as cleanup code that was causing warnings. After these patches, the code can be compiled with -Wall -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wcast-qual -Wextra -Wno-unused-parameter -Wno-missing-field-initializers (what is current in trunk plus -Wextra -Wno-unused-parameter -Wno-missing-field-initializers). Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
2012-04-11ospfd: adjust OSPF_ROUTER_LSA_MIN_SIZE for VL caseDenis Ovsienko
2012-03-12ospfd: introduce ospf_lsa_minlen[] (BZ#705)Denis Ovsienko
This commit ports more packet checks to OSPFv2, in particular, LSA size verification and Router-LSA link blocks verification. * ospf_lsa.h: add LSA size macros * ospf_packet.h: add struct ospf_ls_update * ospf_packet.c * ospf_lsa_minlen[]: a direct equivalent of ospf6_lsa_minlen[] * ospf_router_lsa_links_examin(): new function, verifies trailing part of a Router-LSA * ospf_lsa_examin(): new function like ospf6_lsa_examin() * ospf_lsaseq_examin(): new function like ospf6_lsaseq_examin() * ospf_packet_examin(): add type-specific deeper level checks
2012-01-08ospfd: justify ospf_default_originate_timer()Denis Ovsienko
The function is implemented in ospf_lsa.c, move its "extern" declaration to ospf_lsa.h for consistency.
2011-09-27ospfd: sizing macros cleanupDenis Ovsienko
* ospf_spf.c * ROUTER_LSA_TOS_SIZE: prepend OSPF_ and move to ospf_lsa.h * ROUTER_LSA_MIN_SIZE: replace with existing OSPF_ROUTER_LSA_LINK_SIZE