summaryrefslogtreecommitdiffstats
path: root/isisd/isis_redist.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* isisd: add the 'redistribute table' internal supportPhilippe Guibert2023-07-121-92/+115
| | | | | | | | | | | | | | | | | | | | | The 'redistribute table' command does not create the internal contexts with the appropriate table identifier. Redistributed prefixes in IS-IS do not care about the table identifier. Add a linked list of redistribution contexts, and map the nb configuration to the linked list. - A new 'table' attribute is added in the 'struct isis_redist' context. - The 'isis_redist_update_zebra_subscriptions()' function is removed and is replaced by direct call to zebra API for turning on/off redirection. - The redistributed routes coming from zebra import the 'tableid' information. - The fabricd redistribute running-config is reworked, and the 'get_redist_settings()' function is removed. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* isisd: add redistribute table identifier in nb configurationPhilippe Guibert2023-07-121-0/+47
| | | | | | | | | | The yang model does not handle the table identifier in IS-IS. For each redistributed each address family, a new list of table elements is added to store the table identifier to redistribute, and also the optional metric and route-map values for each table identifier. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.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>
* *: Use autocomplete for route-maps under commands that require itDonatas Abraitis2022-06-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | For example: ``` donatas-laptop# show bgp ipv4 unicast neighbors 127.0.0.2 advertised-routes route-map ? RMAP_NAME Name of the route map testas2 testas donatas-laptop(config)# router bgp donatas-laptop(config-router)# address-family ipv4 donatas-laptop(config-router-af)# redistribute connected route-map ? RMAP_NAME Pointer to route-map entries testas2 testas donatas-laptop(config-router-af)# network 192.168.0.0/23 route-map ? RMAP_NAME Name of the route map testas2 testas ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* isisd: fix redistribute CLIIgor Ryzhov2021-10-051-4/+6
| | | | | | | | | | | | | | | | | | | | | Currently, it is possible to configure IPv6 protocols for IPv4 redistribution and vice versa in CLI. The YANG model doesn't allow this so the user receives the following error: ``` nfware(config-router)# redistribute ipv4 ospf6 level-1 % Failed to edit configuration. YANG error(s): Invalid enumeration value "ospf6". Invalid enumeration value "ospf6". Invalid enumeration value "ospf6". YANG path: Schema location /frr-isisd:isis/instance/redistribute/ipv4/protocol. ``` Let's make CLI more user-friendly and allow only supported protocols in redistribution commands. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* isisd: fix memleak when deleting area and instanceIgor Ryzhov2021-05-141-0/+16
| | | | | | Release memory for all redistributed route info. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* isisd: fix redistribution in vrfIgor Ryzhov2021-05-141-3/+8
| | | | | | | When the redistribution is configured in non-default VRF, isisd should redistribute routes from this VRF instead of default. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* isisd: fix "default-information originate always"Igor Ryzhov2021-05-141-2/+3
| | | | | | | We don't need to register for default routes from zebra, when the origination type is set to "always". Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* isisd: kill isis_memory.h, use MTYPE_STATICDavid Lamparter2021-03-221-4/+7
| | | | | | | Convert most DEFINE_MTYPE into the _STATIC variant, and move the remaining non-static ones to appropriate places. Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: added support for routemap match tag in redistributionEmanuele Altomare2021-03-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now it's possible to filter routes redistributed by another protocol using tag which comes from zebra daemon. Example of a possible configuration: ``` ! ipv6 route fd00::/48 blackhole tag 20 ipv6 route fd00::/60 blackhole tag 10 ! interface one ipv6 router isis COMMON isis circuit-type level-1 ! interface two ipv6 router isis COMMON isis circuit-type level-2-only ! router isis COMMON net fd.0000.0000.0000.0001.00 redistribute ipv6 static level-1 route-map static-l1 redistribute ipv6 static level-2 route-map static-l2 topology ipv6-unicast ! route-map static-l1 permit 10 match tag 10 ! route-map static-l2 permit 10 match tag 20 ! ``` Signed-off-by: Emanuele Altomare <emanuele@common-net.org>
* Merge pull request #7523 from donaldsharp/route_map_object_tRuss White2020-11-171-2/+1
|\ | | | | *: Remove route_map_object_t from the system
| * *: Remove route_map_object_t from the systemDonald Sharp2020-11-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The route_map_object_t was being used to track what protocol we were being called against. But each protocol was only ever calling itself. So we had a variable that was only ever being passed in from route_map_apply that had to be carried against and everyone was testing if that variable was for their own stack. Clean up this route_map_object_t from the entire system. We should speed some stuff up. Yes I know not a bunch but this will add up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | isisd: Free created tablesDonald Sharp2020-11-151-0/+13
|/ | | | | | | | On redistribution into isis we were creating a table for handling the redistributed routes, but never cleaning them up on shutdown properly. Do so. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* :* Convert prefix2str to %pFXDonatas Abraitis2020-10-221-13/+5
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* isisd : Transformational changes to support different VRFs.Kaushik2020-08-141-5/+7
| | | | | | | | | 1. Created a structure "isis master". 2. All the changes are related to handle ISIS with different vrf. 3. A new variable added in structure "isis" to store the vrf name. 4. The display commands for isis is changed to support different VRFs. Signed-off-by: Kaushik <kaushik@niralnetworks.com>
* *: un-split strings across linesDavid Lamparter2020-07-141-8/+4
| | | | | | | | | | | | | | | | | Remove mid-string line breaks, cf. workflow doc: .. [#tool_style_conflicts] For example, lines over 80 characters are allowed for text strings to make it possible to search the code for them: please see `Linux kernel style (breaking long lines and strings) <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_ and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: replace dict_* with DECLARE_RBTREEDavid Lamparter2019-04-271-1/+0
| | | | | | | | 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>
* fabricd: allow redistribute statements with both the route-map and metric ↵Dmitrii Turlupov2019-04-161-23/+17
| | | | | | options Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
* *: remove null check before XFREEQuentin Young2019-02-261-2/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* isisd: Added changes to track route-map usage in isis.rgirada2019-02-041-0/+2
| | | | | | | Updated the routemap applied counter wherever route map attached/detached to a redistribution list. Signed-off-by: RajeshGirada <rgirada@vmware.com>
* isisd: retrofit the 'redistribute' commandEmanuele Di Pascale2018-12-181-34/+8
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: retrofit the 'default-originate' commandEmanuele Di Pascale2018-12-181-37/+12
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* bgpd isisd ldpd lib: const drop fixes (SA)F. Aragon2018-09-171-3/+3
| | | | | | Can be detected with e.g. ./configure CFLAGS=-Wcast-qual CC=clang Signed-off-by: F. Aragon <paco@voltanet.io>
* isis: Cleanup CLI, split into parts which are shared, fabricd and isisdChristian Franke2018-09-051-19/+57
| | | | | | | | Remove isis_vty.c and create three new files isis_vty_common.c, isis_vty_fabricd.c and isis_vty_isisd.c which are built into both daemons, only fabricd and only isisd, respectively. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: add new daemon as build of isisdChristian Franke2018-09-051-10/+10
| | | | | | | 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: fix redist_delete to also consider level-2Christian Franke2018-08-031-1/+1
| | | | | | | There was an off-by-one error in redist_delete, so that routes redistributed into level-2 could never be withdrawn. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: learn and advertise IPv6 dst-src routesChristian Franke2018-08-031-53/+50
| | | | | | | Receive IPv6 dst-src routes from zebra and advertise them in our LSPs if so configured. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: use 0 as default-metric for redistributionChristian Franke2018-05-081-9/+5
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* isisd: debug msg: display distance when adding redist routeG. Paul Ziemba2018-03-091-2/+2
| | | | Signed-off-by: G. Paul Ziemba <paulz@labn.net>
* *: Cleanup multiple is_default... codeDonald Sharp2017-08-311-15/+4
| | | | | | | There are 3 different implementations of is_prefix. Standardize on is_prefix_default and fix it's implementation. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* isisd: send/receive LSPs with new parserChristian Franke2017-08-031-1/+0
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* Revert "*: reindent pt. 2"David Lamparter2017-07-221-3/+3
| | | | | | | | | This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: reindent pt. 2whitespace / reindent2017-07-171-3/+3
| | | | | | | | w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-653/+620
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge remote-tracking branch 'frr/master' into newline-reduxDavid Lamparter2017-07-141-14/+14
|\ | | | | | | | | | | Lots of conflicts from CMD_WARNING_CONFIG_FAILED... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * vtysh: return non-zero for configuration failuresDaniel Walton2017-07-131-14/+14
| | | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> This allows frr-reload.py (or anything else that scripts via vtysh) to know if the vtysh command worked or hit an error.
* | *: remove VTYNL, part 1 of 6David Lamparter2017-07-141-2/+2
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: ditch vty_outln(), part 1 of 2David Lamparter2017-07-131-5/+5
|/ | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: vty_outln (vty, "") --> vty_out (vty, VTYNL)Quentin Young2017-06-291-2/+2
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use vty_outlnQuentin Young2017-06-291-6/+7
| | | | | | Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge remote-tracking branch 'origin/stable/3.0'Donald Sharp2017-06-291-38/+65
|\
| * isisd: fix to adhere to new cli apiChristian Franke2017-06-201-22/+34
| |
| * isisd: fix memtype counting issueChristian Franke2017-06-201-3/+3
| |
| * isisd: adjust redist functionality to current zapiChristian Franke2017-06-201-13/+28
| |
* | *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-4/+4
|/ | | | | | | | | | | 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>
* *: Fix redistribute issueDonald Sharp2017-01-271-2/+2
| | | | | | | | | | Somewhere in the past we switched from using the auto-generated redistribute statements to a non-generated version. This caused us to loose new protocols to redistribute as they are added. Put it back. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge branch 'master' into fix-proto_redistnumQuentin Young2017-01-071-2/+2
|\
| * Merge remote-tracking branch 'origin/stable/2.0'Donald Sharp2017-01-061-2/+2
| |\
| | * build: rename (2 of ?): route_types macrosDavid Lamparter2016-12-201-4/+4
| | | | | | | | | | | | | | | | | | | | | All of the autogenerated macros in lib/route_types.pl are now called FRR_* instead of QUAGGA_*. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>