summaryrefslogtreecommitdiff
path: root/ospfd/ospf_abr.c
AgeCommit message (Collapse)Author
2013-01-07ospfd: Corrected ospfd Type-4/Type-5 ls update handlingVishal Kumar
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>
2012-10-25ospfd: respect max-metric over configured cost for summary LSAsJR Rivers
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>
2012-10-25ospfd: ABR algorithm not propagating MAXAGE LSAs into areaJR Rivers
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>
2012-10-25ospfd: blackhole route removal for area rangeJR Rivers
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>
2012-01-02ospfd: fix bug in NSSA ABR status checkDenis Ovsienko
* 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
2011-12-07ospfd: remove unused codeStephen Hemminger
The code for nssa_range and other bits that were written but never used.
2010-12-08ospfd: Unify router and network LSA refresh logic with general refresherPaul Jakma
* (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
2009-08-03ospfd: Change struct ospf_path *oi to ifindex.Joakim Tjernlund
* 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.
2006-06-26[ospfd] NSSA translate-enabled ABR should declare itself as ASBRPaul Jakma
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.
2006-05-12[ospfd] Fix leak in area-range-cost command, CID #46.Paul Jakma
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-202005-11-20 Paul Jakma <paul.jakma@sun.com>paul
* 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-292005-09-29 Alain Ritoux <alain.ritoux@6wind.com>vincent
* 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-262005-07-26 Paul Jakma <paul.jakma@sun.com>paul
* 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-262005-05-26 Paul Jakma <paul.jakma@sun.com>paul
* ospf_abr.c: (ospf_abr_update_aggregate) Fix comment, cost bug itself had been fixed long ago by Sowmini.
2005-05-062005-05-06 Paul Jakma <paul.jakma@sun.com>paul
* (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-152005-04-15 Zhipeng Gong <zpgong@cdc.3upsystems.com>paul
* 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-072005-04-07 Paul Jakma <paul.jakma@sun.com>paul
* (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-082004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* *.c: Change level of debug messages to LOG_DEBUG.
2004-10-112004-10-11 Paul Jakma <paul@dishone.st>paul
* (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.
2004-09-26Compiler warnings fixes.hasso
2004-09-23Remove usage of evil list and listnode typedefs.hasso
2004-06-20Remove ifdef's HAVE_NSSA. NSSA support is stable enough.hasso
2004-04-20Some ospfd fixes - [quagga-dev 1032], [quagga-dev 1048], [quagga-dev 1058].hasso
2004-03-04Many warning fixes from PC Drew ([quagga-dev 940]) and removing using PAGERhasso
from vtysh ([quagga-dev 932]).
2004-02-192004-02-19 Sowmini Varadhan <sowmini.varadhan@sun.com>paul
* 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-102003-08-10 amir <amir@datacore.ch>paul
* Add missing 'i' to getopts, short form of --pid_file. see http://bugzilla.quagga.net/show_bug.cgi?id=25
2003-07-122003-07-12 Paul Jakma <paul@dishone.st>paul
* (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-222003-06-19 Paul Jakma <paul@dishone.st>paul
* 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.
2003-04-19From: Hasso Tepper <hasso@estpak.ee>paul
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.
2002-12-13Initial revisionpaul