summaryrefslogtreecommitdiff
path: root/staticd/static_nht.c
AgeCommit message (Collapse)Author
2022-03-27staticd: track nexthops per-SAFIDavid Lamparter
This stops intermixing SAFI_UNICAST NHT into SAFI_MULTICAST static routes. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-07-09staticd: simplify the northbound codeIgor Ryzhov
Add a couple of back pointers to static route/path/nexthop structures to simplify the NB code and save ~200 lines. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-07-01*: Replace 4/16 integers to IPV4_MAX_BYTELEN/IPV6_MAX_BYTELENDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-07-16staticd : Configuration northbound implementationvdhingra
1. Modifies the data structs to make the distance, tag and table-id property of a route, i.e created a hireachical data struct to save route and nexthop information. 2. Backend northbound implementation Signed-off-by: VishalDhingra <vdhingra@vmware.com>
2019-07-16staticd: Track state of where we are and limit installs/updates to minDonald Sharp
Track the state of the route and how we have installed it or not. This commit limits the number of installs/updates/deletes to a minimum number instead of repeated sends to zebra. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-07-16staticd: Fix static_nht_update to actually know route we are installingDonald Sharp
We are using static_nht_update in two different cases: 1) We have received a callback that a nexthop has changed and we need to find any static route that is using it and we must refigure it. 2) We have received a new static route that depends on a pre-existing nexthop, in which case we can go straight to the chase and just refigure that particular node, since we already have all the information we need. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-24staticd: If we are told a nexthop has changed reinstall the route.Donald Sharp
If we are told that a dependant nexthop has changed, just reinstall the route. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-03staticd: Fix static routes that are not added in RIB after Null0 or vrf routesAdrian Ban
When you add a static route like: ip route 10.0.0.0/24 Null0 ip route 192.168.7.0/24 99.99.99.99 nexthop-vrf EVA all routes after this command will be ignored by staticd and are not inserted in RIB. This is the cause of return instead of continue in the for loop in static_nht_update_safi() function that is stopping the search in the routes list and is returning in the previous function without calling static_zebra_route_add() function. This patch is fixing this issue. Signed-off-by: Adrian Ban <bugs@abtelcom.ro>
2019-01-04staticd: Fix nht to include SAFI_MULTICASTDonald Sharp
The nexthop tracking was correctly registering the nexthops in the SAFI_UNICAST table, but we need to apply them to the SAFI_MULTICAST mroute information( if any ) as well. donna.cumulusnetworks.com# conf t donna.cumulusnetworks.com(config)# ip mroute 230.0.4.0/24 192.168.210.50 donna.cumulusnetworks.com(config)# end donna.cumulusnetworks.com# show ip rpf Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, f - OpenFabric, > - selected route, * - FIB route C>* 10.0.2.0/24 is directly connected, enp0s3, 00:08:28 C>* 192.168.209.0/24 is directly connected, enp0s8, 00:08:28 C>* 192.168.210.0/24 is directly connected, enp0s9, 00:08:28 S>* 230.0.4.0/24 [1/0] via 192.168.210.50, enp0s9, 00:07:56 S>* 230.0.5.0/24 [1/0] via 192.168.210.50, enp0s9, 00:07:17 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-31staticd: Fix mixup in vrf translationsDonald Sharp
When we store the nexthop for ref-counting, keep track of the nexthop vrf_id as well. This will allow us to track the nexthop per vrf! Additionally when we get the callback from zebra about a nexthop update, iterate over all static routes to see if the nexthop we are getting a callback is one we are concerned about. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-13staticd: null check (Coverity 1472311)F. Aragon
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-29staticd: Allow daemon to have backup static routesDonald Sharp
Modify staticd to allow it to have backup static routes with higher admin distance. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29staticd: Code review comments fixesDonald Sharp
1) Conform staticd to proper gnu gpl file format. 2) Fix a spelling mistake found. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29staticd: Fix recursive routes for certain types of nexthopsDonald Sharp
Existing NEXTHOP_TYPE_IPV4_IFINDEX and NEXTHOP_TYPE_IPV6_IFINDEX routes allow recursion, but were broken when the route happened to recursively resolve and the resolution nexthop changed. This commit fixes this issue. Please note that this issue was in pre-move of static route handling to it's own daemon as well. This was some easy low-hanging fruit, so to speak. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29staticd: Start the addition of a staticdDonald Sharp
This is the start of separating out the static handling code from zebra -> staticd. This will help simplify the zebra code and isolate static route handling to it's own code base. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>