summaryrefslogtreecommitdiff
path: root/ospfd/ospf_route.h
AgeCommit message (Collapse)Author
2023-07-18ospfd: Support show intra-area network type in 'show ip ospf route' commandZhiyuan Wan
User can now use 'show ip ospf route detail' command to distinguish intra-area stub network and transit network. Transit network will be displayed as 'N T prefix ...'. NOTICE: Json output format has been changed, intra-area transit networks will have a new attribute 'transit' and value is 'true'. And 'adv' (means advertise router) change to 'advertisedRouter'. Example output: bsp-debianrt-exp1# show ip ospf route detail Codes: N - network T - transitive IA - inter-area E - external route D - destination R - router ============ OSPF network routing table ============ N T 10.0.0.0/24 [32] area: 0.0.0.0 via 192.168.124.67, ens192 adv 10.0.0.5 N 10.0.30.0/24 [33] area: 0.0.0.0 via 192.168.124.67, ens192 adv 10.0.0.5 ... Signed-off-by: Zhiyuan Wan <h@iloli.bid>
2023-03-31ospfd: add support for NSSA Type-7 address rangesRenato Westphal
Implement NSSA address ranges as specified by RFC 3101: NSSA border routers may be configured with Type-7 address ranges. Each Type-7 address range is defined as an [address,mask] pair. Many separate Type-7 networks may fall into a single Type-7 address range, just as a subnetted network is composed of many separate subnets. NSSA border routers may aggregate Type-7 routes by advertising a single Type-5 LSA for each Type-7 address range. The Type-5 LSA resulting from a Type-7 address range match will be distributed to all Type-5 capable areas. Syntax: area A.B.C.D nssa range A.B.C.D/M [<not-advertise|cost (0-16777215)>] Example: router ospf router-id 1.1.1.1 area 1 nssa area 1 nssa range 172.16.0.0/16 area 1 nssa range 10.1.0.0/16 ! Since regular area ranges and NSSA ranges have a lot in common, this commit reuses the existing infrastructure for area ranges as much as possible to avoid code duplication. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
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-17Revert "bgpd, ospfd: update BGP when routes are removed from OSPF routing table"Donatas Abraitis
This reverts commit bba9435157515689cb752e1ff9ac18a44f08b73a.
2022-10-12bgpd, ospfd: update BGP when routes are removed from OSPF routing tableMadhuri Kuruganti
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
2022-06-02ospfd: add all_rtrs route table when opaque enabledChristian Hopps
The reachable router table is used by OSPF opaque clients in order to determine if the router advertising the opaque LSA data is reachable (i.e., 2-way conectivity check). Signed-off-by: Christian Hopps <chopps@labn.net>
2022-01-15lib, ospfd, ospf6d, zebra: add OSPF opaque route attributesRenato Westphal
Update ospfd and ospf6d to send opaque route attributes to zebra. Those attributes are stored in the RIB and can be viewed using the "show ip[v6] route" commands (other than that, they are completely ignored by zebra). Example: ``` debian# show ip route 192.168.1.0/24 Routing entry for 192.168.1.0/24 Known via "ospf", distance 110, metric 20, best Last update 01:57:08 ago * 10.0.1.2, via eth-rt2, weight 1 OSPF path type : External-2 OSPF tag : 0 debian# debian# show ip route 192.168.1.0/24 json { "192.168.1.0\/24":[ { "prefix":"192.168.1.0\/24", "prefixLen":24, "protocol":"ospf", "vrfId":0, "vrfName":"default", "selected":true, [snip] "ospfPathType":"External-2", "ospfTag":"0" } ] } ``` Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-05-25ospfd: Fix quick interface down up event handling in ospfDonald Sharp
When we get this sequence of events: - zebra receives interface up, sends to ospf - ospf receives intf up, processes( including neighbor formation and spf ) and sends route to zebra for installation. - zebra receives route for processing, schedules it too happen in the future - zebra receives interface down event, sends to ospf - zebra processes route X and marks it inactive because nexthop interface is down - zebra receives interface up event, sends to ospf - ospf receives both events and processes the change and decides that nothing has changed so it does not send any route change for X to zebra. At this point zebra has a route from ospf that is marked as inactive, while ospf believes that the route should be installed properly. Modify the code such that on an interface down event, ospf marks the routes as changed if the ifindex is being used for a nexthop, so that when ospf is deciding if routes have changed post spf that it can just automatically send that route down again if it still exists. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-19tests: Integrate unit tests for TI-LFAGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19ospfd: TI-LFA basic infrastructure and algorithmsGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-08-18ospfd: add print helper for SPF trees and route tablesGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-08-18ospfd: introduce a 'dry run' into SPF codeGalaxyGorilla
in OSPF interface data is used for the nexthop resolution during the SPF algorithm, see RFC2328 16.1.1. However, for certain technologies like TI-LFA it is desirable to be able to calculate SPFs for arbitrary root nodes, not just the calculating node. Since interface data is not available for other nodes it is necessary to remove this dependency and make its usage optional, depending on the intent of changing the RIB with the generated tree (or not). To signal that a SPF run is used without the intent to change the RIB an additional flag `spf_dry_run` is introduced to the ospf_area struct. This flag is currently only used within the pure SPF code but will be extended to the SPF postprocessing later on. Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-06-03ospfd: Add ECMP support to OSPF Segment RoutingOlivier Dugeon
* Change sr_prefix structure in ospf_sr.h to add support to ECMP * Add new Segment Routing information to ospf_paths in ospf_route.h * Backport MPLS label configuration from IS-IS Segment Routing implementation * Re-write log message in ospf_sr.c and ospf_ext.c Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.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>
2016-08-18*: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma
(cherry picked from commit 9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744)
2016-07-28ospfd: ditch unused time fieldsDavid Lamparter
The ctime/mtime fields in ospf_route and start_time field in ospf_master are written but never read, thus entirely useless. Remove them. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2015-05-19Unnumbered interface support.Donald Sharp
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-07-25ospf_spf_process_stubs: use LSA pos to find OSFP interfaceJoakim Tjernlund
This is better than a prefix lookup as prefixes may not be unique, that is, the same prefix can exist on several interfaces. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
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.
2008-09-04[ospfd] Minor enhancements to recent self-host-routes suppression patchPaul Jakma
* ospf_spf.c: (ospf_spf_process_stubs) Track whether parent router vertex is the root, so that the host-route suppression logic need only be activated for such vertices. Move the actual logic to ospf_intra_add_stub. * ospf_route.c: (ospf_intra_add_stub) Main test of link moved here, notionally more appropriate.
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.
2004-09-23Remove usage of evil list and listnode typedefs.hasso
2004-06-20Remove ifdef's HAVE_NSSA. NSSA support is stable enough.hasso
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
2002-12-13Initial revisionpaul