summaryrefslogtreecommitdiffstats
path: root/ripngd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ripngd: adjust header for display commandanlan_cs2024-07-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Both rip and ripng can import routes from other protocols, e.g. ISIS. But their header doesn't list the description for these abbreviations. Adjust `show ipv6 ripng` 's header for display command. Before: ``` Codes: R - RIPng, C - connected, S - Static, O - OSPF, B - BGP Sub-codes: ``` After: ``` Codes: K - kernel route, C - connected, L - local, S - static, R - RIPng, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, t - Table-Direct Sub-codes: ``` Signed-off-by: anlan_cs <vic.lan@pica8.com>
* ripngd: convert RPC commands to mgmtdIgor Ryzhov2024-04-223-21/+19
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* lib: rework northbound RPC callbackIgor Ryzhov2024-04-222-21/+7
| | | | | | | Change input/output arguments of the RPC callback from lists of (xpath/value) tuples to YANG data trees. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* ripngd: fix "clear ipv6 ripng" commandIgor Ryzhov2024-03-083-32/+34
| | | | | | | mgmtd doesn't support YANG RPCs yet, so this command must go directly to ripngd. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* ripngd: fix missing "exit" for "router ripng"Igor Ryzhov2024-03-062-0/+7
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* *: create a single registry of daemons' default port valuesMark Stapp2024-02-011-1/+0
| | | | | | | | Create a single registry of default port values that daemons are using. Most of these are vty ports, but there are some others for features like ospfapi and zebra FPM. Signed-off-by: Mark Stapp <mjs@labn.net>
* *: fix `frr_daemon_info` indentationDavid Lamparter2024-01-271-10/+12
| | | | | | | | | | clang-format doesn't understand FRR_DAEMON_INFO is a long macro where laying out items semantically makes sense. (Also use only one `FRR_DAEMON_INFO(` in isisd so editors don't get confused with the mismatching `( ( )`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ripngd: convert ripngd to mgmtdChristian Hopps2024-01-269-71/+123
| | | | | | - a couple small fixes for ripd conversion as well. Signed-off-by: Christian Hopps <chopps@labn.net>
* Merge pull request #15196 from idryzhov/nb-leaf-listDonald Sharp2024-01-241-11/+31
|\ | | | | lib: remove leaf-list xpath hack from northbound
| * lib: remove leaf-list xpath hack from northboundIgor Ryzhov2024-01-231-11/+31
| | | | | | | | | | | | | | | | | | | | | | Currently, when editing a leaf-list, `nb_candidate_edit` expects to receive it's xpath without a predicate and the value in a separate argument, and then creates the full xpath. This hack is complicated, because it depends on the operation and on the caller being a backend or not. Instead, let's require to always include the predicate in a leaf-list xpath. Update all the usages in the code accordingly. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | ripngd: use correct autocompletion for distribute-list commandsIgor Ryzhov2024-01-221-8/+67
|/ | | | | | | | Currently, we always use access-list autocompletion, even if configuring prefix-lists. We should differentiate. Also, fix missing "IPv6" docstring and use correct address family. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* ripngd: use new distribute-list northbound code.Christian Hopps2024-01-225-42/+110
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* lib: enable multiple instance support with distribute listsChristian Hopps2024-01-221-2/+3
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* lib: all: remove './' from xpath 22% speedupChristian Hopps2023-11-292-19/+19
| | | | | | fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
* *: convert `struct interface->connected` to DLISTDavid Lamparter2023-11-222-8/+4
| | | | | | | | | | | | | | | | | Replace `struct list *` with `DLIST(if_connected, ...)`. NB: while converting this, I found multiple places using connected prefixes assuming they were IPv4 without checking: - vrrpd/vrrp.c: vrrp_socket() - zebra/irdp_interface.c: irdp_get_prefix(), irdp_if_start(), irdp_advert_off() (these fixes are really hard to split off into separate commits as that would require going back and reapplying the change but with the old list handling) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ripngd: Cleanup memory on shutdownDonald Sharp2023-11-131-0/+12
| | | | | | | a) routemap data was not being cleaned up b) ripng data structure was not being cleaned up Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Move distance related defines into their own headerDonald Sharp2023-11-071-0/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* lib: convert if_zapi_callbacks into actual hooksDavid Lamparter2023-11-031-2/+4
| | | | | | | | | ...so that multiple functions can be subscribed. The create/destroy hooks are renamed to real/unreal because that's what they *actually* signal. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: remove ZEBRA_INTERFACE_VRF_UPDATEanlan_cs2023-10-073-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | Currently when one interface changes its VRF, zebra will send these messages to all daemons in *order*: 1) `ZEBRA_INTERFACE_DELETE` ( notify them delete from old VRF ) 2) `ZEBRA_INTERFACE_VRF_UPDATE` ( notify them move from old to new VRF ) 3) `ZEBRA_INTERFACE_ADD` ( notify them added into new VRF ) When daemons deal with `VRF_UPDATE`, they use `zebra_interface_vrf_update_read()->if_lookup_by_name()` to check the interface exist or not in old VRF. This check will always return *NULL* because `DELETE` ( deleted from old VRF ) is already done, so can't find this interface in old VRF. Send `VRF_UPDATE` is redundant and unuseful. `DELETE` and `ADD` are enough, they will deal with RB tree, so don't send this `VRF_UPDATE` message when vrf changes. Since all daemons have good mechanism to deal with changing vrf, and don't use this `VRF_UPDATE` mechanism. So, it is safe to completely remove all the code with `VRF_UPDATE`. Signed-off-by: anlan_cs <anlan_cs@tom.com>
* Merge pull request #13826 from opensourcerouting/fix/ripng_match_ipv6_aclsRuss White2023-06-271-0/+72
|\ | | | | ripng: match ipv6 address [prefix-list] CMDs
| * ripngd: add ability to match by ipv6 access/prefix list in route-mapsIgor Ryzhov2023-06-211-0/+72
| | | | | | | | | | | | Closes #8141. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | ripngd: changes for code maintainabilitysri-mohan12023-06-212-17/+13
|/ | | | | | these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* Merge pull request #13797 from sri-mohan1/srib-ripngDonatas Abraitis2023-06-211-29/+26
|\ | | | | ripngd: changes for code maintainability
| * ripngd: changes for code maintainabilitysri-mohan12023-06-191-29/+26
| | | | | | | | | | | | these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* | Revert "ripngd: Cleanup memory allocations on shutdown"Igor Ryzhov2023-06-151-7/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b1d29673ca16e558aea5d632da181555c83980cf. This commit introduced a crash. When the VRF is deleted, the RIPNG instance should not be freed, because the NB infrastructure still stores the pointer to it. The instance should be deleted only when it's actually deleted from the configuration. To reproduce the crash: ``` frr# conf t frr(config)# vrf vrf1 frr(config-vrf)# exit frr(config)# router ripng vrf vrf1 frr(config-router)# exit frr(config)# no vrf vrf1 frr(config)# no router ripng vrf vrf1 vtysh: error reading from ripngd: Resource temporarily unavailable (11)Warning: closing connection to ripngd because of an I/O error! frr(config)# ``` Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* ripngd: Make sure we do not overuse higher values for ECMP countDonatas Abraitis2023-05-234-2/+6
| | | | | | Use a minimum value of a CLI version and a value of Zebra capabilities. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* ripng: Implement `allow-ecmp X` commandDonatas Abraitis2023-05-235-16/+111
| | | | | | A port of ripd implementation for ripngd implemented by 75fce4645a7cf0a93ef0109d69365f51b84bc47c. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* lib: convert if_rmap config output to northboundIgor Ryzhov2023-04-122-1/+2
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* ripngd: adapt to new YANG NB if_rmap conversionChristian Hopps2023-04-113-0/+122
| | | | | | - uses YANG grouping and calls if_rmap library code to implement. Signed-off-by: Christian Hopps <chopps@labn.net>
* *: Convert event.h to frrevent.hDonald Sharp2023-03-244-4/+4
| | | | | | | We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert `struct event_master` to `struct event_loop`Donald Sharp2023-03-243-4/+4
| | | | | | Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp2023-03-244-37/+36
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert struct thread_master to struct event_master and it's ilkDonald Sharp2023-03-243-4/+4
| | | | | | | Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_timer_remain_XXX to event_timer_remain_XXXDonald Sharp2023-03-241-9/+9
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_add_XXX functions to event_add_XXXDonald Sharp2023-03-244-16/+15
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Rename `struct thread` to `struct event`Donald Sharp2023-03-244-18/+18
| | | | | | | | | Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Rename thread.[ch] to event.[ch]Donald Sharp2023-03-244-4/+4
| | | | | | | | | | | This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-0920-308/+20
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ripngd: Add missing enums to switch statementDonald Sharp2023-01-311-1/+2
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* build, vtysh: extract vtysh commands from .xrefDavid Lamparter2022-10-262-7/+0
| | | | | | | | | | | | | | | | | | | Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ripngd: Cleanup memory allocations on shutdownDonald Sharp2022-10-121-0/+7
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Create and use infrastructure to show debugs in libDonald Sharp2022-10-071-0/+2
| | | | | | | | | There are lib debugs being set but never show up in `show debug` commands because there was no way to show that they were being used. Add a bit of infrastructure to allow this and then use it for `debug route-map` Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ripngd: Convert thread_cancel to THREAD_OFFDonald Sharp2022-07-213-6/+6
| | | | | | Just convert all uses of thread_cancel to THREAD_OFF Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ripngd: Remove various macros that overlap THREAD_OFFDonald Sharp2022-07-214-22/+20
| | | | | | | | Let's just use THREAD_OFF consistently in the code base instead of each daemon having a special macro that needs to be looked at and remembered what it does. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Use autocomplete for route-maps under commands that require itDonatas Abraitis2022-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* *: Properly use memset() when zeroingDonatas Abraitis2022-05-111-5/+5
| | | | | | | Wrong: memset(&a, 0, sizeof(struct ...)); Good: memset(&a, 0, sizeof(a)); Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* *: 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>
* *: Fix spelling of modifedDonald Sharp2022-04-191-2/+2
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Fix spelling of IntefaceDonald Sharp2022-04-021-3/+3
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Fix spelling of ojbectDonald Sharp2022-04-021-2/+2
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>