summaryrefslogtreecommitdiffstats
path: root/zebra/table_manager.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib, mgmtd, zebra: cleanup of zebra conversion to mgmtdIgor Ryzhov2024-01-281-8/+2
| | | | | | | | | - use `apply_finish` callback when possible to avoid multiple applies per commit - move table range working to the CLI handler - remove unnecessary conditional compilation - remove unnecessary boolean conversion Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* zebra: convert table range command to NBIgor Ryzhov2024-01-281-57/+7
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* zebra: remove unnecessary check for default vrfanlan_cs2023-07-121-2/+1
| | | | | | | | | | | | | | The default vrf is generally non-NULL, except when shutdown. So, most of the time it is not necessary to check if it is NULL, we should remove the useless checks for it. Searched them with exact match: ``` grep -rI "zebra_vrf_lookup_by_id(VRF_DEFAULT)" | wc -l 31 ``` Signed-off-by: anlan_cs <vic.lan@pica8.com>
* *: 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, ospf6d: Do not check if NULL for XCALLOC()Donatas Abraitis2022-05-081-2/+0
| | | | Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* zebra: fix memleak on shutdownIgor Ryzhov2021-11-161-2/+4
| | | | | | | | | | During shutdown, when table_manager_disable is called for the default VRF, its vrf_id is already set to VRF_UNKNOWN, so the expression is true and the table manager memory is not freed. Change the expression to compare the VRF name instead of the id. The check in table_manager_enable is changed for consistency. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* zebra: don't register same hook multiple timesIgor Ryzhov2021-11-051-1/+0
| | | | | | | | Before 42d4b30e, table_manager_enable was called only once and the hook was also registered once. After the change, the hook is registered per each VRF that is created in the system. This is wrong. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* zebra: extend table manager per vrf, add vty configurationPhilippe Guibert2021-09-211-38/+152
| | | | | | | | | | | | | | | | Because vrf backend may be based on namespaces, each vrf can use in the [16-(2^32-1)] range table identifier for daemons that request it. Extend the table manager to be hosted by vrf. That possibility is disabled in the case the vrf backend is vrflite. In that case, all vrf context use the same table manager instance. Add a configuration command to be able to configure the wished range of tables to use. This is a solution that permits to give chunks to bgp daemon when it works with bgp flowspec entries and wants to use specific iptables that do not override vrf tables. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* *: Remove solaris from FRRDonald Sharp2020-09-211-14/+4
| | | | | | | | | | The Solaris code has gone through a deprecation cycle. No-one has said anything to us and worse of all we don't have any test systems running Solaris to know if we are making changes that are breaking on Solaris. Remove it from the system so we can clean up a bit. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: list_delete_and_null() -> list_delete()David Lamparter2018-10-021-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: style for EC replacementsQuentin Young2018-09-131-4/+3
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* zebra: ZEBRA_[ERR|WARN] -> EC_ZEBRAQuentin Young2018-09-131-3/+3
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: rename zlog_fer -> flog_errQuentin Young2018-08-141-3/+3
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* zebra, lib: error references for zebraQuentin Young2018-08-141-4/+8
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* zebra: refactor zserv names, consolidate eventsQuentin Young2018-05-291-1/+1
| | | | | | | | | | | | | | * Add centralized thread scheduling dispatchers for client threads and the main thread * Rename everything in zserv.c to stop using a combination of: - zebra_server_* - zebra_* - zserv_* Everything in zserv.c now begins with zserv_*. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* zebra: cleanup for zapi_msg.c splitQuentin Young2018-04-231-1/+1
| | | | | | | | | | * Rename client_connect and client_close hooks to zapi_client_connect and zapi_client_close * Remove some more unnecessary headers * Fix a copy-paste error in zapi_msg.[ch] header comments * Fix an inclusion comment in zserv.c Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* zebra: use hooks for client lifecycle callbacksQuentin Young2018-04-231-8/+11
| | | | | | | | | zserv.c was using hardcoded callbacks to clean up various components when a client disconnected. Ergo zserv.c had to know about all these unrelated components that it should not care about. We have hooks now, let's use the proper thing instead. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* zebra: add table manager filesPhilippe Guibert2018-03-291-0/+235
The range is given from table manager from zebra daemon. There are 2 ranges available for table identifier: - [1;252] and [256;0xffffffff] If the wished size enters in the first range, then the start and end range of table identifier is given within the first range. Otherwise, the second range is given, and an appropriate range is given. Note that for now, the case of the VRF table identifier used is not taken into account. Meaning that there may be overlapping. There are two cases to handle: - case a vrf lite is allocated after the zebra and various other daemons started. - case a vrf lite is initialised and the daemons then start The second case is easy to handle. For the former case, I am not so sure. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>