summaryrefslogtreecommitdiffstats
path: root/isisd/isisd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: move CLI node names to cmd_node->nameDavid Lamparter2020-04-161-2/+11
| | | | | | | And again for the name. Why on earth would we centralize this, just so people can forget to update it? Signed-off-by: David Lamparter <equinox@diac24.net>
* *: move CLI parent data to cmd_node->parent_nodeDavid Lamparter2020-04-161-0/+1
| | | | | | | Same as before, instead of shoving this into a big central list we can just put the parent node in cmd_node. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: remove second parameter on install_node()David Lamparter2020-04-161-5/+7
| | | | | | | | | | There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
* *: remove cmd_node->vtyshDavid Lamparter2020-04-161-2/+0
| | | | | | | The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: clean up cmd_node initializersDavid Lamparter2020-04-161-2/+10
| | | | | | ... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd, yang: unified lsp-timers commandEmanuele Di Pascale2020-04-061-6/+6
| | | | | | | | | | | | | | | | | | | Yang constraints enforced by the northbound callbacks require that the maximum lifetime be >= than (refresh interval + 300). When we are moving from one config to another through frr-reload.py, we issue a number of vtysh -c commands ('no lsp-refresh-interval level-1 500', 'no max-lsp-lifetime level-1 1000'), which reset these parameters to their default values, respectively 900 and 1200. Depending on the actual values in the current config, the order in which these commands are sent might be the wrong one, in that we hit an invalid intermediate state and make vtysh (and by extension frr-reload.py) return an error. As a workaround, let's add a one-liner command that sets all these inter-related parameters in one go, and make isisd display them as a single line too, so that the diff will be computed as a single command. The old individual commands are kept to ensure backwards compatibility. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd, yang: set default is-type to level-1-2Emanuele Di Pascale2019-12-171-5/+2
| | | | | | | | | | | | | | | | Currently isisd has this strange (legacy) behavior where the first area is created by default with level-1-2, while every other subsequent area uses the default defined in the yang model, which is level-1. This is a source of confusion when trying to configure the daemon programatically, either with frr-reload or using the transactional cli. Given how rare having multiple IS-IS instances is anyway, the easiest solution is to remove this behavior and default to level-1-2 for every area. Note that this does not affect fabricd, which continues using exclusively level-2-only areas. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: split northbound callbacks into multiple filesRenato Westphal2019-10-301-0/+1
| | | | | | | | | | | | | | | | | Rearrange the isisd northbound callbacks as following: * isis_nb.h: prototypes of all northbound callbacks. * isis_nb.c: definition of all northbound callbacks and their associated YANG data paths. * isis_nb_config.c: implementation of YANG configuration nodes. * isis_nb_state.c: implementation of YANG state nodes. * isis_nb_notifications.c: implementation of YANG notifications. This should help to keep to code more organized and easier to maintain. No behavior changes intended. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: Add vrf_id to the main isis structureDonald Sharp2019-09-101-1/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: unify isis_nexthop and isis_nexthop6 into a single structRenato Westphal2019-08-211-1/+0
| | | | | | | This unification allows us to write code that works for both IPv4 and IPv6, reducing duplication. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: Remove unnecessary use of strcpyChristian Franke2019-05-291-5/+1
| | | | | | | | `strcpy` is a dangerous function and should not be used. In this particular place, there is no need for copying strings at all, so let's just stick to referencing static strings. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: del routes when area is unconfiguredEmanuele Di Pascale2019-05-291-1/+1
| | | | | | attempt to fix #4399 Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* Merge pull request #3045 from opensourcerouting/atomsLou Berger2019-04-301-31/+16
|\ | | | | READY: lists/skiplists/rb-trees new API & sequence lock & atomic lists
| * isisd: replace dict_* with DECLARE_RBTREEDavid Lamparter2019-04-271-31/+16
| | | | | | | | | | | | | | | | Historically, isisd has been carrying around its own red-black tree to manage its LSP DB in. This replaces that with the newly-added DECLARE_RBTREE_*. This allows completely removing the dict_* code. Signed-off-by: David Lamparter <equinox@diac24.net>
* | isisd: Add IS-IS-TE support per AreaOlivier Dugeon2019-04-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Solve issue #4032 - Change MPLS-TE from global to per Area - Add new mpls_te_area structure to area in replacement of global variable isisMPLS_TE - Move mpls-te from global to instance in frr-isisd.yang - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c, isis_lsp.c and isis_zebra.c accordingly Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | Revert "isisd: Add IS-IS-TE support per Area"Russ White2019-04-231-4/+2
| |
* | Issue #4032: Add IS-IS-TE support per AreaOlivier Dugeon2019-04-151-2/+4
|/ | | | | | | | | | | - Change MPLS-TE from global to per Area - Add new mpls_te_area structure to area in replacement of global variable isisMPLS_TE - Move mpls-te frmo global to instance in frr-isisd.yang - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c, isis_lsp.c and isis_zebra.c accordingly Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: strncpy -> strlcpyQuentin Young2019-02-261-2/+3
| | | | | | strncpy is a byte copy function not a string copy function Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Treewide: use ANSI function definitionsRuben Kerkhof2019-01-241-1/+1
| | | | Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* isisd: retrieve default values from the yang modelEmanuele Di Pascale2018-12-181-4/+37
| | | | | | | | also fix a minor issue with isis_config_write where we were not incrementing the write variable, which is used to append a new line at the end of the vty string Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement the 'database-overload' notificationEmanuele Di Pascale2018-12-181-0/+3
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: modify config_write funcs to use the northboundEmanuele Di Pascale2018-12-181-0/+16
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: retrofit the 'log-adjacency-changes' commandEmanuele Di Pascale2018-12-181-6/+6
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: retrofit the 'topology' commandEmanuele Di Pascale2018-12-181-1/+6
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: retrofit the 'metric-style' commandEmanuele Di Pascale2018-12-181-5/+3
| | | | | | | Note that some of the validation checks that were previously executed in the code have been moved to the YANG model. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: retrofit the 'net' commandEmanuele Di Pascale2018-12-181-2/+4
| | | | | | | | This is a simple command but with a complex callback, the only one in isisd which uses the resource allocation API implemented in the northbound (i.e. the PREPARE phase). Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: retrofit 'router isis' and 'ip router isis' cmdsEmanuele Di Pascale2018-12-181-16/+19
| | | | | | | | | | | | | | | | | | These are complex commands to retrofit, partly due to the number of different callbacks they touch. Additionally, in FRR adding an interface to an IS-IS area that does not exist also creates that area. To make sure that this behavior is kept, while at the same time keeping the northbound api consistent, we need to take extra care to call the appropriate callbacks to update the YANG tree. Note that many callbacks rely on the existence of the corresponding IS-IS area; when these callbacks are joined together in a single transaction, we need to ensure that the area creation is performed first, or the config will fail. For this reason, the isis instance create callback has been given a slightly lower priority than the others. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: Provide statistics over number of generated purgesChristian Franke2018-12-071-0/+3
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Provide statistics over number of LSP regenerationsChristian Franke2018-12-071-0/+4
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Provide statistics about retransmitted LSPsChristian Franke2018-12-071-0/+2
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Provide statistics about sent/received PDU countChristian Franke2018-12-071-0/+5
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Move code to find LSP out of show databaseChristian Franke2018-12-071-60/+55
| | | | | | | | | Finding an LSP by its id is useful not only for the `show isis database` command. So move it out into its own function to make it reusable. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Provide better flooding debuggingChristian Franke2018-12-071-3/+34
| | | | | | Show from where LSP flooding is triggered. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Add debug output for tx-queuesChristian Franke2018-12-071-0/+38
| | | | | | | To allow easier debugging of LSP transmission scheduling, add a debug mode where all tx-queue insertions/deletions are logged. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Remove unused debug flagsChristian Franke2018-11-081-188/+0
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Combine lsp_l1/l2_refreshChristian Franke2018-10-241-0/+7
| | | | | | | | lsp_l1_refresh and lsp_l2_refresh are identical apart from the hardcoded IS-IS level they are referring to. So merge them and pass the level as part of the argument. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Add debugging for BFDChristian Franke2018-10-051-0/+37
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* *: list_delete_and_null() -> list_delete()David Lamparter2018-10-021-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: add purge originator identification supportChristian Franke2018-09-051-0/+4
| | | | | | | Implement RFC 6232, optionally allowing to flood isisd's NET and hostname in purges it originates. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: add flooding algorithm debuggingChristian Franke2018-09-051-0/+6
| | | | | | | Add a command `debug openfabric flooding` to allow verification of correct operation of the OpenFabric flooding optimization algorithm. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: allow to configure tier-level advertisementChristian Franke2018-09-051-0/+9
| | | | | | | | | | | | | While OpenFabric calculates most tier numbers automatically by the fabric locality calculation algorithm, that algorithm requires two systems to be manually configured as tier 0, so it has reference points. Also, completely manual configuration is possible. To support this, introduce appropriate CLI commands and flood the configured information. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: run a hop-by-hop spfChristian Franke2018-09-051-1/+4
| | | | | | | | | | OpenFabric uses an spf with the metric for all links set to one, both for flooding optimization and for fabric locality detection. So extend isisd's spf code to allow running it with such a metric and have it run whenever normal spf runs. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: adjacency formation optimization as per section 2.4Christian Franke2018-09-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenFabric changes IS-IS's initial database synchronization. While regular IS-IS will simultaneuously exchange LSPs with all neighboring routers during startup, this is considered too much churn for a densely connected fabric. To mitigate this, OpenFabric prescribes that a router should only bring up an adjacency with a single neighbor and perform a full synchronization with that neighbor, before bringing up further adjacencies. This is implemented by having a field `initial_sync_state` in the fabricd datastructure which tracks whether an initial sync is still pending, currently in progress, or complete. When an initial sync is pending, the state will transition to the in-progress state when the first IIH is received. During this state, all IIHs from other routers are ignored. Any IIHs transmitted on any link other than the one to the router with which we are performing the initial sync will always report the far end as DOWN in their threeway handshake state, avoiding the formation of additional adjacencies. The state will be left if all the SRM and SSN flags on the initial-sync circuit are cleared (meaning that initial sync has completed). This is checked in `lsp_tick`. When this condition occurrs, we progress to the initial-sync-complete state, allowing other adjacencies to form. The state can also be left if the initial synchronization is taking too long to succeed, for whatever reason. In that case, we fall back to the initial-sync-pending state and will reattempt initial synchronization with a different neighbor. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: adjust IS-IS defaults as per draftChristian Franke2018-09-051-19/+26
| | | | | | | | OpenFabric specifies that it should always be run with wide metrics via P2P links and only as Level-2. Implement this as default and remove all the knobs from fabricd which allow other configuration. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: add new daemon as build of isisdChristian Franke2018-09-051-117/+120
| | | | | | | fabricd is built using the sources of isisd. To allow differentiation in the code, -DFABRICD=1 is added to its preprocessor flags. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: make spf code dst-src awareChristian Franke2018-08-031-0/+4
| | | | | | | Take the source-prefix sub-TLV into consideration when running SPF and support creation/deletion of dst-src routes as result. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: make use of advanced concepts like arrays and loopsChristian Franke2018-08-031-13/+17
| | | | | | | Have an array of spftrees instead of a separate spftree and an spftree6 for which all the code gets duplicated. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: move route_table into spftreeChristian Franke2018-08-031-41/+23
| | | | | | | | As isisd's route_tables are directly related to spf trees, move the route tables into the spftree instead of maintaining them alongside of the spftrees. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* bgpd isisd ldpd lib ospfd pimd: redundancy (infer)paco2018-06-201-1/+1
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-12/+12
| | | | | | | | | | | | | | | | | | | | | | 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>