summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_nb_state.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: clang-SA switch-enum initializer workaroundsDavid Lamparter2024-10-161-0/+1
| | | | | | | | In these cases the value assigned by the switch block is used directly rather than returned. Mark the initial/default value as used so clang-SA doesn't complain about it. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* yang: add missing `zif-gre` zebra interface typeChristian Hopps2024-04-201-0/+4
| | | | | | | | This was caught by the grpc_basic test which was receiving an invalid error result, which was returned b/c inside zebra the libyang code was flagging the value as invalid for a derived zebra interface type. Signed-off-by: Christian Hopps <chopps@labn.net>
* Merge pull request #15469 from LabNConsulting/chopps/keychain-yangDonald Sharp2024-03-081-1/+1
|\ | | | | add ietf-key-chain YANG module support
| * lib: add keychain northbound supportChristian Hopps2024-03-051-1/+1
| | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | zebra: implement zif-type oper state leafIgor Ryzhov2024-02-201-2/+40
| | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | zebra: add interface's bond to oper stateIgor Ryzhov2024-02-201-0/+22
|/ | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* zebra: fix oper-state walk bugChristian Hopps2023-12-281-1/+2
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* zebra: support yielding between oper state routes queryChristian Hopps2023-12-281-0/+41
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* zebra: add zebra to mgmtd oper-stateChristian Hopps2023-12-281-0/+4
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* zebra: add northbound api hooks for nexthop segmentsDmytro Shytyi2023-09-201-0/+52
| | | | | | | | Provide skeleton hooks for nexthop segments Those hooks address seg6 segs stack entries defined in the YANG model Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
* Merge pull request #12780 from opensourcerouting/spdx-license-idDonald Sharp2023-02-171-14/+1
|\ | | | | *: convert to SPDX License identifiers
| * *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-14/+1
| | | | | | | | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | zebra: vxlan interface refactoring changesSharath Ramamurthy2023-02-141-0/+1
| | | | | | | | | | | | | | | | This change refactors the zebra_vxlan_if related functionality to a new zebra_vxlan_if.c file. zebra_vxlan_if_up/down, zebra_vxlan_if_add/update/del is moved zebra_vxlan_if.c Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
* | zebra: data structure changes for single vxlan deviceSharath Ramamurthy2023-02-141-6/+13
|/ | | | | | | | | | | | | | This changeset introduces the data structure changes needed for single vxlan device functionality. A new struct zebra_vxlan_vni_info encodes the iftype and vni information for vxlan device. The change addresses related access changes of the new data structure fields from different files zebra_vty is modified to take care of the vni dump information according to the new vni data structure for vxlan devices. Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
* zebra: Add missing enums to switch statementsDonald Sharp2023-01-311-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Avoid casting to the same type as on the leftDonatas Abraitis2022-05-081-1/+1
| | | | | | Just not necessary. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* zebra: make ribs config falseIgor Ryzhov2021-03-161-0/+23
| | | | | | | | | | Zebra routing tables are not controlled by the user and can not be created/deleted manually. Current NB create/destroy callbacks are incorrectly implemented because instead of creating/deleting the RIB they are only checking for it's existence. YANG model should reflect the real situation. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* staticd: add support for SR PoliciesSebastien Merle2020-08-121-0/+16
| | | | | | | | | | | | | | Configuration example: ip route 9.9.9.9/32 6.6.6.6 color 123 The SR Policy to be chosen is uniquely identified by the policy endpoint (6.6.6.6) and the SR-TE color (123). Traffic will be augmented with an MPLS label stack according to the active candidate path of that particular policy. Co-authored-by: GalaxyGorilla <sascha@netdef.org> Signed-off-by: Sebastien Merle <sebastien@netdef.org>
* zebra: rib operational nb add vrf keyChirag Shah2020-07-171-16/+19
| | | | | | | | | | Add vrf as key in Rib operational nexthop list PR 6296 has added vrf as key in nexthop list. Rib operational model uses nexthop list, adding vrf key into northbound callback. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* zebra: Moving afi-safi identity to libvdhingra2020-07-161-4/+3
| | | | | | afi-safi identity handling should be in the common place. Signed-off-by: VishalDhingra <vdhingra@vmware.com>
* *: remove PRI[udx](8|16|32)David Lamparter2020-07-141-1/+1
| | | | | | | | | | | These are completely pointless and break coccinelle string replacements. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --pri8-16-32 `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
* zebra: rib nb changes with redefined nexthop modelChirag Shah2020-06-111-86/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RIB operational northbound changes based on redfined nexthop model. Testing Done: { "afi-safi-name": "ipv4-unicast", "table-id": 254, "route": [ { "prefix": "0.0.0.0/0", "route-entry": [ { "protocol": "kernel", "distance": 0, "metric": 100, "selected": [null], "installed": [null], "internal-flags": 8, "internal-status": 16, "uptime": "2020-06-06T00:28:26.139797Z", "nexthop-group": { "id": 15, "nexthop": [ { "nh-type": "ip4-ifindex", "vrf": "0", "gateway": "10.0.2.2", "interface": "enp0s3", "active": [null], "fib": [null] } ] } } ] }, { "prefix": "1.1.1.4/32", "route-entry": [ { "protocol": "kernel", "distance": 0, "metric": 0, "selected": [null], "installed": [null], "internal-flags": 8, "internal-status": 16, "uptime": "2020-06-06T00:28:26.139790Z", "nexthop-group": { "id": 16, "nexthop": [ { "nh-type": "ifindex", "vrf": "0", "gateway": "", "interface": "dummy4", "active": [null], "fib": [null] } ] } } ] } ] } Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* zebra: optimize the RIB get_next() callbackRenato Westphal2020-05-161-1/+4
| | | | | | | When fetching the next route node in the RIB, skip the empty ones to avoid calling other northbound callbacks later unnecessarily. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: skip link-local routes when iterating over the RIB using the NBRenato Westphal2020-05-161-0/+5
| | | | | | | | | | | | | The motivation for this change is that IPv6 link-local routes don't conform to the zebra YANG module since they all have the same prefix (fe80::/64), but zebra's YANG module require each route to have an unique prefix (the key of the "rib" list). This violation can cause problems when iterating over the RIB asynchronously, so skip those routes. At the end of the day nobody cares about link-local routes anyway :) Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: implement two missing RIB lookup_entry() callbacksRenato Westphal2020-05-161-3/+69
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: add missing return in one get_elem() callbackRenato Westphal2020-05-161-1/+1
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: fix SA warning in zebra_nb_state.cMark Stapp2020-05-141-1/+1
| | | | | | Fix an SA warning in zebra_nb_state.c. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* zebra: rib northbound callback implementationChirag Shah2020-05-121-48/+291
| | | | | | | | | - add RIB's northbound list create/destory callback changes. - add RIB's northbound callbacks implementation. - add RIB's nexthop callbacks implementation. - add RIB's nexthop weight field callback changes. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* zebra: add zebra container to rib modelChirag Shah2020-05-121-104/+108
| | | | | | | | Add zebra container in rib tree. When displaying RIB under vrf, it displays zebra module name. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* zebra: northbound changes for the rib modelChirag Shah2020-05-121-14/+81
| | | | | | | | | | | | | | | This commit implements: RIB operational list create/destroy. Walk over RIB tables using keys. The first RIB table will be IPV4/unicast (table-id 254) will be fetched. Create a new api to fetch RIB table based on afi-safi and table id as the keys. remove mandatory true statement from the leaf which is part of the list key. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* *: change the signature of the northbound callbacks to be more flexibleRenato Westphal2020-04-231-104/+79
| | | | | | | | | | | | | | | | | | | | | Having a fixed set of parameters for each northbound callback isn't a good idea since it makes it difficult to add new parameters whenever that becomes necessary, as several hundreds or thousands of existing callbacks need to be updated accordingly. To remediate this issue, this commit changes the signature of all northbound callbacks to have a single parameter: a pointer to a 'nb_cb_x_args' structure (where x is different for each type of callback). These structures encapsulate all real parameters (both input and output) the callbacks need to have access to. And adding a new parameter to a given callback is as simple as adding a new field to the corresponding 'nb_cb_x_args' structure, without needing to update any instance of that callback in any daemon. This commit includes a .cocci semantic patch that can be used to update old code to the new format automatically. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: add weight to nb conversionChirag Shah2020-04-161-0/+12
| | | | Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* zebra: add northbound support for zebra interfaceChirag Shah2020-04-161-12/+57
| | | | Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* zebra: add nb callbacks for zebra if stateChirag Shah2020-04-161-0/+88
| | | | | | | This is all stub callbacks autogenrated for zebra interface state data. Signed-off-by: chirag Shah <chirag@cumulusnetworks.com>
* zebra: stub changes to assimilate re into rib nbChirag Shah2020-04-161-88/+107
| | | | Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* zebra: nb callbacks supportChirag Shah2020-04-161-0/+473
Definition of the northbound callbacks and associated YANG data paths for zebra. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>