summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_abr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Quagga: prefix2str fixupDonald Sharp2015-11-231-3/+3
| | | | | | | 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>
* ospfd-spf-stats.patchDonald Sharp2015-05-201-0/+1
| | | | | | | | | | | | | | | | | Compute and display SPF execution statistics Detailed SPF statistics, all around time spent executing various pieces of SPF such as the SPF algorithm itself, installing routes, pruning unreachable networks etc. Reason codes for firing up SPF are: R - Router LSA, N - Network LSA, S - Summary LSA, ABR - ABR status change, ASBR - ASBR Status Change, AS - ASBR Summary, M - MaxAge Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: JR Rivers <jrrivers@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: Ayan Banerjee <ayan@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>
* ospfd: Corrected ospfd Type-4/Type-5 ls update handlingVishal Kumar2013-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is for Type-4 LS updates handling at a ABR router where ospf daemon is not distributing Type-4 LS updates with correct LS-Age after learning about a ASBR router in a ospf network. Because of this Type-5 LS updates are not learnt in ospf network. Testing Scenario: This can be re-produced by restarting the ospfd daemon on DUT (mentioned in figure below)before the Hello time interval expires for area 0.0.0.1. ____ _______ ____ _________ | | area: 0.0.0.1 | | area: 0.0.0.0 | | area: 0.0.0.2 | | | R1 |---------------------|DUT/ABR|---------------------| R2 |------------------| R3/ASBR | |____| x.x.x.0/24 |_______| y.y.y.0/64 |____| z.z.z.0/24 |_________| In the above setup when ospfd is restarted (imp:before the Hello interval at R1 expires) and DUT learns about ASBR router R3 (Type-4) in the network from R2, but this ls-update is not propagates in area 0.0.0.1. So R1 never comes to know about the ASBR router in the network, so all the type-5 LS updates coming from R3 are not learnt by R1. Further if we again restart ospfd daemon it starts working fine. With the fix given this issue can be resolved. More Discussion on this is available at: http://www.gossamer-threads.com/lists/quagga/dev/23892 Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
* ospfd: respect max-metric over configured cost for summary LSAsJR Rivers2012-10-251-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | ISSUE When max-metric router-lsa administrative is invoked on an ABR created with... area <area> range <addr/mask> the summary LSAs are sent out with 65535 (max-metric) added to the normal cost. When max-metric router-lsa administrative is invoked on an ABR created with... area <area> range <addr/mask> cost <cost> the summary LSAs are sent out with <cost> (the max-metric is ignored). This second behavior effectively incapacitates the max-metric function. PATCH This patch evaluates the state of the router and if it's isolated as a stub router (rfc3137) via `max-metric router-lsa`, we unconditionally uses the value of 0xff0000 when advertising summary LSAs. Signed-off-by: JR Rivers <jrrivers@cumulusnetworks.com> Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: Ayan Banerjee <ayan@cumulusnetworks.com> Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: ABR algorithm not propagating MAXAGE LSAs into areaJR Rivers2012-10-251-2/+3
| | | | | | | | | | | | | | | When a range (or sub-range) is deleted, the area is notified by propagating a MAXAGE LSA. This LSA stays in the database for a while to both insure propagation as well as in the off chance that it's useful in the near future. Unfortunately, the ABR algorithm was treating these MAXAGE LSAs as unchanged and not propagating them within the areas. Signed-off-by: JR Rivers <jrrivers@cumulusnetworks.com> Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com> Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: blackhole route removal for area rangeJR Rivers2012-10-251-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISSUE When an area range is created in which there the sub-area has routes that are smaller than the range, an ABR creates a blackhole route to cover the range. When the range is removed, the blackhole route is not removed. --A----B----C--- B is an ABR with A in area 1 and C in area 0. If A advertises `10.2.0.0/30` and `10.2.0.4/30` and B is configured with `area 0.0.0.1 range 10.2.0.0/29` a blackhole is created on B (`blackhole 10.2.0.0/29 proto zebra`). When the area/range is removed via the command line, the blackhole remains in existence even though the "range" route is removed from area 0 and the individual routes are propagated. PATCH The reason for this behavior is that, prior to this patch, the range is deleted from the area's list, so when ospf_abr_manage_discard_routes() gets called, there is nothing to clean up. The patch removes the discard route as part of the processing of the command line (ospf_area_range_unset()). Signed-off-by: JR Rivers <jrrivers@cumulusnetworks.com> Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: fix bug in NSSA ABR status checkDenis Ovsienko2012-01-021-2/+2
| | | | | | | * ospf_abr.c * ospf_abr_nssa_am_elected(): feed "best" instead of "address of best" into IPV4_ADDR_CMP(), because "best" is a pointer; also, mean s_addr field of the structures to get better typed pointers
* ospfd: remove unused codeStephen Hemminger2011-12-061-45/+0
| | | | | The code for nssa_range and other bits that were written but never used.
* ospfd: Unify router and network LSA refresh logic with general refresherPaul Jakma2010-12-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | * (general) Get rid of the router and network LSA specific refresh timers and make the general refresher do this instead. Get rid of the twiddling of timers for router/network LSA that was spread across the code. This lays the foundations for future, general LSA refresh improvements, such as making sequence rollover work, and having generic LSA delays. * ospfd.h: (struct ospf) Bye bye to the router-lsa update timer thread pointer. (struct ospf_area) and to the router-lsa refresh timer. * ospf_interface.h: Remove the network_lsa_self timer thread pointer * ospf_lsa.h: (struct ospf_lsa) oi field should always be there, for benefit of type-2/network LSA processing. (ospf_{router,network}_lsa_{update_timer,timer_add}) no timers for these more (ospf_{router,network}_lsa_update) more generic functions to indicate that some router/network LSAs need updating (ospf_router_lsa_update_area) update router lsa in a particular area alone. (ospf_{summary,summary_asbr,network}_lsa_refresh) replaced by the general ospf_lsa_refresh function. (ospf_lsa_refresh) general LSA refresh function
* ospfd: Change struct ospf_path *oi to ifindex.Joakim Tjernlund2009-08-031-8/+5
| | | | | | * global: In struct ospf_path, change struct ospf_interface *oi to int ifindex. It is unsafe to reference *oi as an ospf interface can be deleted under your feet. Use a weak reference instead.
* [ospfd] NSSA translate-enabled ABR should declare itself as ASBRPaul Jakma2006-06-261-48/+61
| | | | | | | | | | | | | | | 2006-06-26 Paul Jakma <paul.jakma@sun.com> * ospf_abr.c: (general) NSSA translate-candidate ABRs need to be ASBRs, or other routers may rightfully refuse to install translated type-5s LSAs. reported by dendroot@gmail.com. (ospf_abr_nssa_check_status) Detect change in translator state when ABR, and inc/dec redistribute count as when we leave/enter the disabled state - so that translate-enabled ABR properly sets ASBR bit on non-NSSA areas. Run the resulting function through indent to clean it up. * ospf_lsa.c: (router_lsa_flags) For purposes of ASBR bit, NSSA area is same as stub area.
* [ospfd] Fix leak in area-range-cost command, CID #46.Paul Jakma2006-05-131-1/+1
| | | | | | | | 2006-05-11 Paul Jakma <paul.jakma@sun.com> * ospf_abr.c: (ospf_area_range_cost_set) Shouldn't create a new range, should just lookup to see if one exists, the new range is just leaked. Fixes CID #46.
* 2005-11-20 Paul Jakma <paul.jakma@sun.com>paul2005-11-201-1/+38
| | | | | | | | | | | | | | | | | | * ospf_abr.c: (ospf_abr_announce_network_to_area) check returned LSA of ospf_summary_lsa_refresh and print warning if it failed. (ospf_abr_announce_network_to_area) similar (ospf_abr_announce_rtr_to_area) similar * ospf_lsa.c: (ospf_router_lsa_new) check LSA returned is valid. (ospf_router_lsa_originate) similar (ospf_router_lsa_refresh, ospf_network_lsa_new) similar (ospf_summary_lsa_new) Check ID is valid. (ospf_summary_lsa_originate) ditto, and check returned LSA from previous function is !NULL. (ospf_summary_lsa_refresh) check ospf_summary_lsa_new return is !NULL. (ospf_summary_asbr_lsa_new) ID valid check. (ospf_summary_asbr_lsa_originate) similar.
* 2005-09-29 Alain Ritoux <alain.ritoux@6wind.com>vincent2005-09-291-1/+1
| | | | | | | | | | | | | | | | * ospfd/ospf_vty.c: forece default route LSA to be re_issued whenever cost is changed ( [no] ip ospf area XXX default-cost YYY) Support ignore-mtu option * ospfd/ospfd.h: define OSPF_MTU_IGNORE_DEFAULT * ospfd/ospf_packet.c: support ignore-mtu option * ospfd/ospf_interface.h: field added for skipping MTU check * ospfd/ospf_interface.c: fix memory leak in ospf_crypt_key_delete() Set mtu_ignore field to default value * ospfd/ospf_abr.[ch]: export ospf_abr_announce_network_to_area() * ospfd/ospf_ism.h: add MACRO to convert internal ISM status into SNMP correct values * ospfd/ospf_snmp.c: add sanity check on LSA type in lsdb_lookup_next() convert OSPFIFSTATE internal status into SNMP values
* 2005-07-26 Paul Jakma <paul.jakma@sun.com>paul2005-07-261-1/+1
| | | | | | * ospf_abr.c: (ospf_abr_announce_network_to_area) SET_FLAG should be on lsa not old, which may be freed for one thing, obviously.
* 2005-05-26 Paul Jakma <paul.jakma@sun.com>paul2005-05-261-1/+1
| | | | | * ospf_abr.c: (ospf_abr_update_aggregate) Fix comment, cost bug itself had been fixed long ago by Sowmini.
* 2005-05-06 Paul Jakma <paul.jakma@sun.com>paul2005-05-061-38/+37
| | | | | | | | | | | | | | | | | | | | | | | * (general) extern and static qualifiers added. unspecified arguments in definitions fixed, typically they should be 'void'. function casts added for callbacks. Guards added to headers which lacked them. Proper headers included rather than relying on incomplete definitions. gcc noreturn function attribute where appropriate. * ospf_opaque.c: remove the private definition of ospf_lsa's ospf_lsa_refresh_delay. * ospf_lsa.h: export ospf_lsa_refresh_delay * ospf_packet.c: (ospf_make_md5_digest) make *auth_key const, correct thing to do - removes need for the casts later. * ospf_vty.c: Use vty.h's VTY_GET_INTEGER rather than ospf_vty's home-brewed versions, shuts up several warnings. * ospf_vty.h: remove VTY_GET_UINT32. VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX moved to lib/vty.h. * ospf_zebra.c: (ospf_distribute_list_update_timer) hacky overloading of the THREAD_ARG pointer should at least use uintptr_t.
* 2005-04-15 Zhipeng Gong <zpgong@cdc.3upsystems.com>paul2005-04-151-0/+1
| | | | | | * ospf_abr.c: (ospf_abr_announce_network_to_area) dont forget to approve LSAs for the case where metric has changed, lsa gets flushed otherwise. (backport candidate).
* 2005-04-07 Paul Jakma <paul.jakma@sun.com>paul2005-04-071-58/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (global): Fix up list loops to match changes in lib/linklist, and some basic auditing of usage. * configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES * HACKING: Add notes about deprecating interfaces and commands. * lib/linklist.h: Add usage comments. Rename getdata macro to listgetdata. Rename nextnode to listnextnode and fix its odd behaviour to be less dangerous. Make listgetdata macro assert node is not null, NULL list entries should be bug condition. ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use with for loop, Suggested by Jim Carlson of Sun. Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the "safety" of previous macro. LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to distinguish from the similarly named functions, and reflect their effect better. Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section with the old defines which were modified above, for backwards compatibility - guarded to prevent Quagga using it.. * lib/linklist.c: fix up for linklist.h changes. * ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single scan of the area list, rather than scanning all areas first for INTER_ROUTER and then again for INTER_NETWORK. According to 16.2, the scan should be area specific anyway, and further ospf6d does not seem to implement 16.3 anyway.
* 2004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-12-081-139/+139
| | | | * *.c: Change level of debug messages to LOG_DEBUG.
* 2004-10-11 Paul Jakma <paul@dishone.st>paul2004-10-111-1/+1
| | | | | | | | | | * (global) Const char update and signed/unsigned fixes. * (various headers) size defines should be unsigned. * ospf_interface.h: remove duplicated defines, include the authoritative header - though, these defines should probably be moved to a dedicated header, or ospfd.h. * ospf_lsa.h: (struct lsa) ls_seqnum should be unsigned. * ospf_packet.c: (ospf_write) cast result of shift to unsigned.
* Compiler warnings fixes.hasso2004-09-261-1/+1
|
* Remove usage of evil list and listnode typedefs.hasso2004-09-231-16/+16
|
* Remove ifdef's HAVE_NSSA. NSSA support is stable enough.hasso2004-06-201-20/+0
|
* Some ospfd fixes - [quagga-dev 1032], [quagga-dev 1048], [quagga-dev 1058].hasso2004-04-201-3/+0
|
* Many warning fixes from PC Drew ([quagga-dev 940]) and removing using PAGERhasso2004-03-041-2/+2
| | | | from vtysh ([quagga-dev 932]).
* 2004-02-19 Sowmini Varadhan <sowmini.varadhan@sun.com>paul2004-02-191-10/+10
| | | | | | * ospf_abr.c: (ospf_abr_update_aggregate) UNH 3.12b,c, address range should be configured with the highest cost path within the range, not lowest.
* 2003-08-10 amir <amir@datacore.ch>paul2003-08-101-4/+4
| | | | | * Add missing 'i' to getopts, short form of --pid_file. see http://bugzilla.quagga.net/show_bug.cgi?id=25
* 2003-07-12 Paul Jakma <paul@dishone.st>paul2003-07-121-132/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (global): Add/fixup NSSA ABR translation functionality * ospfd.h: Adjust the NSSA ROLE defines. Rename STATE to TRANSLATE. Rename the LSA_NSSA_GET define to LSA_OPTIONS_NSSA_GET. * ospfd.c: Adjust to match changes to ospfd.h * ospf_te.c: Adjust to match change to LSA_NSSA_GET. * ospf_lsa.h: slights reformatting. Add new NSSA functions, ospf_translated_nssa_compare() (not currently used), ospf_translated_nssa_refresh() and ospf_translated_nssa_originate(). * ospf_lsa.c: Implemented aforementioned new functions. Fix up several NSSA hooks to /not/ be called for Type-5s which are translated. Add additional hooks. Set the ROUTER_LSA_NT bit in router-lsa flags if ABR does translation. New function, ospf_lsa_translated_nssa_new() implemented. Dont register translated LSAs for refreshing - instead we implicitly rely on the ASBR refreshing the Type-7, and refresh the translated Type-5 at the same time. Some minor reformatting. Extra debug info added. Also, existing debug statements modified to report LSA Id. * ospf_flood.c: call ospf_translated_nssa_refresh() when refreshing Type-7. minor reformatting. * ospf_dump.c: Dump NSSA LSAs. * ospf_asbr.h: slight reformatting. Export ospf_external_route_lookup() (though, not used. probably will undo this). * ospf_abr.c: Slight reformatting in many places. Update to match ospfd.h changes. (ospf_abr_translate_nssa): make it work, using the new ospf_lsa translation functions. (Several places): change struct prefix * to struct prefix_ipv4 *. (might as well do the casts at higher levels). Add more debug info. (ospf_abr_announce_stub_defaults): announce default to NSSA areas too. (ospf_abr_announce_nssa_defaults): do nothing. this function probably should die. (see ospf_abr_announce_stub_defaults). (ospf_abr_task_timer): run NSSA tasks.
* 2003-06-19 Paul Jakma <paul@dishone.st>paul2003-06-221-39/+165
| | | | | | | | | | | | | | | | | | | | | | | | | * ospf_abr.c (ospf_abr_nssa_am_elected): new function. Look through LSDB for an area and try determine whether other routers are more 'electable' than this router. Presumes caller has checked Role. (ospf_abr_nssa_check_status): new function. check any NSSA related status changes. At present determines NSSATranslatorState should be enabled or disabled. (ospf_abr_announce_network_to_area): remove the redundant call to ospf_abr_announce_network_to_area() (as per Vadim, [zebra 14710], problem 7). (global): Update NSSATranslator to NSSATranslatorState as per ospfd.h changes (ospf_abr_announce_nssa_defaults): call ospf_abr_announce_network_to_area() to inject default summaries. (ospf_abr_nssa_task): undo commented out calls to ospf_abr_prepare_aggregates() and ospf_abr_send_nssa_aggregates(), if they're borked, lets fix them. (ospf_abr_task): remove call to ospf_abr_nssa_task() - move this to the timer scheduler. (ospf_abr_task_timer): call ospf_abr_nssa_task() and ospf_abr_nssa_check_status() (misc): some minor reformatting.
* From: Hasso Tepper <hasso@estpak.ee>paul2003-04-191-176/+163
| | | | | | | | | | | | Subject: [zebra 17365] [PATCH] Ospf area id's DECIMAL -> ADDRESS It was annoying for me to view area id's like 335544330 (20.0.0.10 in address format) in configuration. Most of other network devices are using address-like id's and so does zebra when using "show ip ospf *" commands. You can still enter id's in decimal format, but they are just shown in address format.
* Initial revisionpaul2002-12-131-0/+1741