summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_top.h
AgeCommit message (Collapse)Author
2022-04-02*: Fix spelling of GracefullDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-09ospf6d: Stitching the auth trailer code with rest of ospf6.Abhinay Ramesh
Problem Statement: ================== RFC 7166 support for OSPF6 in FRR code. RCA: ==== This feature is newly supported in FRR Fix: ==== Core functionality implemented in previous commit is stitched with rest of ospf6 code as part of this commit. Risk: ===== Low risk Tests Executed: =============== Have executed the combination of commands. Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
2022-02-01Merge pull request #10373 from anlancs/ospf-add-asbrIgor Ryzhov
ospfd: fix missing "aggregation timer" in running configuration
2022-01-28ospf6d: adjust type of "aggr_delay_interval"anlan_cs
Adjust type of "aggr_delay_interval": Just replace `unsigned int` with `uint16_t` for range is (50..1800). Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-01-28ospf6d: restart spf when distance is updatedckishimo
if r1 has a route received from a neighbor and the same route configured as static, the administrative distance will determine which route to use r1(config)# ipv6 route 1:1::1/128 Null0 70 r1# sh ipv6 route Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure S>* 1:1::1/128 [70/0] unreachable (blackhole), weight 1, 00:00:12 O 1:1::1/128 [110/20] via fe80::1833:c9ff:fe7b:3e43, r1-r2-eth0, weight 1, 00:00:49 The static route is selected. If we now change the administrative distance in ospf6, the OSPF route should be selected r1(config)# router ospf6 r1(config-ospf6)# distance 50 r1# sh ipv6 route Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure S>* 1:1::1/128 [70/0] unreachable (blackhole), weight 1, 00:00:39 O 1:1::1/128 [110/20] via fe80::1833:c9ff:fe7b:3e43, r1-r2-eth0, weight 1, 00:01:16 However the distance is not applied as there are no changes in the routing table This commit will force the update of the routing table with the new configured distance r1# sh ipv6 route Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure O>* 1:1::1/128 [50/20] via fe80::8cb7:e6ff:fef5:2344, r1-r2-eth0, weight 1, 00:00:03 S 1:1::1/128 [70/0] unreachable (blackhole), weight 1, 00:00:19 Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2022-01-18Merge pull request #9644 from opensourcerouting/ospf-opaque-attrsRuss White
OSPF opaque route attributes
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-11-23ospf6d: Remove ospf6->external_id_tableDonald Sharp
The external_id_table was only ever used to store pointers to data and was never used for lookup during the course of normal operations. However it did lead to crashes because somewhere along the way external routes stored in the external_table never had their id associated into the external_id_table and we would assert on the node lookup failing. Since this code was never used for anything other than storing data and it was never retrieved for anything useful let's just remove it from ospf6d. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-24Merge pull request #9585 from opensourcerouting/ospf6d-nssa-dflt-originateRuss White
ospf6d: add a knob to generate Type-7 default routes
2021-09-23Merge pull request #9084 from louis-oui/fix-ospf6-router-idIgor Ryzhov
ospf6d: fix LSAs remain in LSDB with an old router-id value
2021-09-21ospf6d: 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>
2021-09-21ospf6d: factorize router-id updateLouis Scalbert
ospf6_router_id_update function is used by ospf6_router_id_update_zebra to update the running the ospf6 router-id. This patches makes the functions to (un)configure ospf6 router-id use the same function as ospf6_router_id_update_zebra. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-09-21ospf6d: don't update router-id if at least one adjacency is FullLouis Scalbert
When a router-id change is notified by zebra to ospf6d, we only take into account the change if no adjacencies are in Full state. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-09-16ospf6d: introduce support for Graceful Restart (restarting mode)Renato Westphal
RFC 5187 specifies the Graceful Restart enhancement to the OSPFv3 routing protocol. This commit implements support for the GR restarting mode. Here's a quick summary of how the GR restarting mode works: * GR can be enabled on a per-instance basis using the `graceful-restart [grace-period (1-1800)]` command; * To perform a graceful shutdown, the `graceful-restart prepare ipv6 ospf` EXEC-level command needs to be issued before restarting the ospf6d daemon (there's no specific requirement on how the daemon should be restarted); * `graceful-restart prepare ospf` will initiate the graceful restart for all GR-enabled instances by taking the following actions: o Flooding Grace-LSAs over all interfaces o Freezing the OSPF routes in the RIB o Saving the end of the grace period in non-volatile memory (a JSON file stored in `$frr_statedir`) * Once ospf6d is started again, it will follow the procedures described in RFC 3623 until it detects it's time to exit the graceful restart (either successfully or unsuccessfully). Testing done: * New topotest featuring a multi-area OSPF topology (including stub and NSSA areas); * Successful interop tests against IOS-XR routers acting as helpers. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-08-10ospf6d: Datastructure modification for GR helper functionality.rgirada
Description: Adding GR helper specific datastructures. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2021-07-30Merge pull request #9028 from mobash-rasool/ospfv3-asbr-summarisationRuss White
Ospfv3 ASBR summarisation feature
2021-07-27Merge pull request #8944 from opensourcerouting/ospf6-mtu-revertIgor Ryzhov
ospf6d: revert PR #8622
2021-07-21ospf6d: ASBR Summarisation feature implementationMobashshera Rasool
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>
2021-07-02Revert "ospf6d: fix LSAs remain in LSDB with an old router-id value"revert-8795-fix-ospf6-router-idDonald Sharp
2021-07-02Merge pull request #8795 from louis-oui/fix-ospf6-router-idPhilippe Guibert
ospf6d: fix LSAs remain in LSDB with an old router-id value
2021-07-01ospf6d: factorize router-id updateLouis Scalbert
ospf6_router_id_update function is used by ospf6_router_id_update_zebra to update the running the ospf6 router-id. This patches makes the functions to (un)configure ospf6 router-id use the same function as ospf6_router_id_update_zebra. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> ---
2021-07-01ospf6d: don't update router-id if at least one adjacency is FullLouis Scalbert
When a router-id change is notified by zebra to ospf6d, we only take into account the change if no adjacencies are in Full state. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-07-01Merge pull request #8954 from mobash-rasool/ospfv3-featureIgor Ryzhov
ospf6d: route-map config changed, not getting applied on all types of…
2021-06-30ospf6d: route-map config changed, not getting applied on all types of routesMobashshera Rasool
Problem Statement: ================== when route-map config is changed from permit to deny, it is not getting applied to both connected and static and vice versa RCA: ================== When route-map changes from permit to deny or vice versa, a notification is sent to ospf6 daemon via ospf6_asbr_routemap_update. In this function, a thread is scheduled after 5 seconds to apply the route-map changes. In this thread (ospf6_asbr_routemap_update_timer), only the first type is passed as argument and only the first type i.e "connected" is passed and hence in callback only on this type of route route-map gets applied. Fix: ==== Need to loop through all the route-types in the call back and process the route-map changes. Added a flag to mark which all route-types needs to be processed. Test Executed: =============== 1. Change route-map from permit to deny. 2. Change route-map from deny to permit. 3. Add new route and checked. 4. Verified summarised routes. Risk: ============ Low Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-06-29ospf6d: use per-vrf router id instead of one globalIgor Ryzhov
This code was not fully completed when adding support for VRFs. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-29Revert "ospf6d: Limit the number of interface addresses being supported"David Lamparter
This reverts commit f85b76195aeeb80b6f834da32459a05e297a0a78.
2021-06-27ospf6d: "clear ipv6 ospf6 process" commandYash Ranjan
Adding the "clear ipv6 ospf6 command" . It resets the ospfv3 datastructures and clears the database as well as route tables. It resets the neighborship by restarting the interface state machine. If the user wants to change the router-id, this command updates the router-id to the latest static router-id and starts the neighbor formation with the new router-id. Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-06-18ospf6d: add write-multiplier configurationPat Ruddy
allow amount of work done by read and write threads in a single invocation to be tuned to between 1 and 100 packets (default 20) Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18ospf6d: add hello messages to tx fifoPat Ruddy
queue outgoing hello messages to the interface tx FIFO and schedule the ospf_write task to deal with them. Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18ospf6d: add tx fifo infrastructurePat Ruddy
Add per interface fifo and per instance write list as a precursor to implementing fairer sharing of the ospf6 oscket resources. Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-04ospf6d: Support for nssa in ospfv3Kaushik
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>
2021-05-11ospf6d: Limit the number of interface addresses being supportedlynne
The code had no limits on addresses configured on an interface running ospf6d. The code would crash when more than 100 addresses were added. This change limits the number of interface address to 100 if mtu is set to the default value. If the mtu is set to a jumbo packet size or larger we will support 200 interface addresses. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-05-05ospf6d: add internal support for multiple vrfsharios_niral
Co-authored-by: Kaushik Nath <kaushiknath.null@gmail.com> Signed-off-by: harios_niral <hari@niralnetworks.com>
2021-03-29ospf6d: Add logic to change the status of router to ASBRYash Ranjan
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-29ospf6d: Add CLI and logic for default-information originate commandYash Ranjan
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-17*: require semicolon after DEFINE_QOBJ & co.David Lamparter
Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-01ospf6d: add CLI to control maximum paths for routes.Mobashshera Rasool
CLI added: maximum-paths (1-64) Issue: #7961 Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-12-09ospf6d : Code refactoring for route redistribution.Kaushik
1. Created new ospf6_redist structure. 2. Moved the 'route_map' structure from structure 'ospf6' to structure 'ospf6_redist'. 3. Added new message type OSPF6_REDISTRIBUTE. 4. Added the placeholder for metric option in structure ospf6_redist for redistribute. 5. Added few API's for route redistribute lookup, add & del. Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-10-30ospf6d : Transformation changes for ospf6 vrf support.harios_niral
1. All the changes are related to handle ospf6 with different vrf. 2. The dependancy of global ospf6 is removed. Co-authored-by: Kaushik <kaushik@niralnetworks.com> Signed-off-by: harios_niral <hari@niralnetworks.com>
2020-10-06ospf6d : Socket change for ospf6d vrf support.Kaushik
1. The socket() call is changed to vrf_socket(). 2. The ospf6 instance creation api added. 3. The global socket fd is replaced with ospf6->fd. 4. All dependency of the global socket is resolved. 5. Added the ospf6 receive timer in the global structure. 6. Performed the thread off on receive timer when we do "no router ospf6". Co-authored-by: harios <hari@niralnetworks.com> Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-07-14ospf6d: use in_addr_t for area/router IDsDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06ospfd: use new defaults mechanism (v2)David Lamparter
Some preprocessor constants converted to enums to make the names usable in the preprocessor. v2: better isolation between core and vty code to make future northbound conversion easier. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-09-10ospf6: Add vrf_id to the ospf6 data structureDonald Sharp
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>
2018-03-01ospf6d: assign zebra router-id to ospf6 instanceChirag Shah
Store zebra router-id in global structure. Before router ospf6 instance created, zebra router-id callback called. During ospf6 main execution zebra init happens, but default instance does not execute until cli replay 'router ospf6'. Call ospf6_router_id_change during 'router ospf6' to assign zebra router id to ospf6 instance. Ticket:CM-19937 Testing Done: Assign Loopback /32 (6.6.6.6/32) address, restart frr with (router ospf6 in frr.conf). ospf6 default instance assigned 6.6.6.6 router-id. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-02-15ospf6d: router-id change notify to restart ospf6dChirag Shah
Notify user to store config and restart ospf6d as part of router-id change cli if any of the area active. Store zebra router-id under ospf6, when static router-id removed restore zebra router-id, ask to restart ospf6d. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-02-14ospf6d: Handle Premature Aging of LSAsChirag Shah
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>
2018-01-26ospf6d: Fix redist w/ route-map during restartChirag Shah
Add hook for route-map update event. Add a delay one shot timer to accomodate route-map update and reset redist with zebra to process all redistribute routes with route-map info. Cleanup route-map, prefix cached date during ospf6 exit. Ticket:CM-13800 Testing Done: configure redistribute connected with route-map to define type-2 routes. Restart frr.service and validated route-map add,update event, thread is scheduled, once timer is done redist reset with zebra. Upon redist add notification, all route map info is cached in ospf6 and processed as type-2 route and send ASE E2 LSA. 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>