]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 years agoMerge pull request #9935 from idryzhov/fabricd-ifconf-cleanup
Mark Stapp [Tue, 16 Nov 2021 16:45:43 +0000 (11:45 -0500)]
Merge pull request #9935 from idryzhov/fabricd-ifconf-cleanup

fabricd: cleanup interface config output

2 years agoMerge pull request #10064 from idryzhov/ospf-grace-period
Russ White [Tue, 16 Nov 2021 16:32:45 +0000 (11:32 -0500)]
Merge pull request #10064 from idryzhov/ospf-grace-period

ospfd: fix no-form of "graceful-restart" command

2 years agoMerge pull request #10062 from idryzhov/bfd-replay
Russ White [Tue, 16 Nov 2021 16:32:20 +0000 (11:32 -0500)]
Merge pull request #10062 from idryzhov/bfd-replay

lib: rename bfd function to reflect real functionality

2 years agoMerge pull request #9944 from ARShreenidhi/tcp_mss_testcase
Russ White [Tue, 16 Nov 2021 14:56:48 +0000 (09:56 -0500)]
Merge pull request #9944 from ARShreenidhi/tcp_mss_testcase

tests: testcase to configure and verity tcp mss with vrf

2 years agoMerge pull request #10072 from idryzhov/zebra-memleak
Donald Sharp [Tue, 16 Nov 2021 13:01:30 +0000 (08:01 -0500)]
Merge pull request #10072 from idryzhov/zebra-memleak

zebra: fix memleak on shutdown

2 years agoMerge pull request #10071 from donaldsharp/valgrind_supp_change
Igor Ryzhov [Tue, 16 Nov 2021 10:04:37 +0000 (13:04 +0300)]
Merge pull request #10071 from donaldsharp/valgrind_supp_change

tools: Add another valgrind suppression for libyang

2 years agozebra: fix memleak on shutdown
Igor Ryzhov [Mon, 15 Nov 2021 21:00:00 +0000 (00:00 +0300)]
zebra: fix memleak on shutdown

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>
2 years agoMerge pull request #10063 from idryzhov/ospf-gr-guarded-code
Donald Sharp [Mon, 15 Nov 2021 20:08:26 +0000 (15:08 -0500)]
Merge pull request #10063 from idryzhov/ospf-gr-guarded-code

ospfd: fix code being guarded by debug check

2 years agotools: Add another valgrind suppression for libyang
Donald Sharp [Mon, 15 Nov 2021 20:06:58 +0000 (15:06 -0500)]
tools: Add another valgrind suppression for libyang

More memory leaks from libyang that we can just ignore

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10068 from Orange-OpenSource/ospf_ls
Donald Sharp [Mon, 15 Nov 2021 20:06:09 +0000 (15:06 -0500)]
Merge pull request #10068 from Orange-OpenSource/ospf_ls

ospfd: Fix wrong parsing of TE subTLV

2 years agoospfd: Fix wrong parsing of TE subTLV
Olivier Dugeon [Mon, 15 Nov 2021 17:19:35 +0000 (18:19 +0100)]
ospfd: Fix wrong parsing of TE subTLV

Function ospf_te_parse_te() and ospf_te_delete_te() browse TE TLV but also
subTLV. The loop that parse the subTLV check that cummulative read data doesn't
exceed the total size of the TLV. However, the sum variable that counts the
number of read data was wrongly intialize to 0 instead to 4 (i.e. the initial
TLV Header size that is located at the TOP of subTLV).

This patch adjust accordingly the initial value of the counter.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2 years agoMerge pull request #10014 from rgirada/ospf_nbr_cov
Donatas Abraitis [Mon, 15 Nov 2021 15:55:35 +0000 (17:55 +0200)]
Merge pull request #10014 from rgirada/ospf_nbr_cov

ospfd: fixing few coverity issues in ospf_vty.c

2 years agoMerge pull request #10048 from qlyoung/fix-reload-doc-comments
Donatas Abraitis [Mon, 15 Nov 2021 15:54:18 +0000 (17:54 +0200)]
Merge pull request #10048 from qlyoung/fix-reload-doc-comments

Fix reload comments

2 years agoMerge pull request #10050 from mjstapp/fix_mpls_queue_cleanup
Donatas Abraitis [Mon, 15 Nov 2021 15:51:51 +0000 (17:51 +0200)]
Merge pull request #10050 from mjstapp/fix_mpls_queue_cleanup

zebra: free LSP workqueue later during shutdown

2 years agoMerge pull request #10047 from idryzhov/fix-bfd-update-source
Donatas Abraitis [Mon, 15 Nov 2021 15:28:14 +0000 (17:28 +0200)]
Merge pull request #10047 from idryzhov/fix-bfd-update-source

bgpd: fix source-address for BFD sessions when using update-source IFNAME

2 years agolib: rename bfd function to reflect real functionality
Igor Ryzhov [Mon, 15 Nov 2021 15:11:49 +0000 (18:11 +0300)]
lib: rename bfd function to reflect real functionality

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoospfd: fix no-form of "graceful-restart" command
Igor Ryzhov [Wed, 10 Nov 2021 12:15:15 +0000 (15:15 +0300)]
ospfd: fix no-form of "graceful-restart" command

The no-form should use the same arguments as the regular command, hence
replace "period" with "grace-period".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoospfd: fix code being guarded by debug check
Igor Ryzhov [Fri, 5 Nov 2021 10:54:57 +0000 (13:54 +0300)]
ospfd: fix code being guarded by debug check

OSPF_NSM_TIMER_ON must be called regardless of debug configuration.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #10046 from donaldsharp/bgp_instance_del
David Lamparter [Mon, 15 Nov 2021 09:49:31 +0000 (10:49 +0100)]
Merge pull request #10046 from donaldsharp/bgp_instance_del

2 years agoMerge pull request #9956 from idryzhov/bfd-remove-ttl
Russ White [Sun, 14 Nov 2021 17:24:28 +0000 (12:24 -0500)]
Merge pull request #9956 from idryzhov/bfd-remove-ttl

lib: remove confusing bfd TTL API

2 years agoMerge pull request #10049 from qlyoung/doc-update-process-arch
Donatas Abraitis [Sat, 13 Nov 2021 19:45:40 +0000 (21:45 +0200)]
Merge pull request #10049 from qlyoung/doc-update-process-arch

doc: update & clarify language in process arch doc

2 years agoMerge pull request #10032 from opensourcerouting/build-fix-20211111
Donald Sharp [Sat, 13 Nov 2021 15:10:59 +0000 (10:10 -0500)]
Merge pull request #10032 from opensourcerouting/build-fix-20211111

build: assorted build system improvements, 2021-11 edition

2 years agoMerge pull request #10036 from donaldsharp/finally_frr
Jafar Al-Gharaibeh [Sat, 13 Nov 2021 03:35:27 +0000 (21:35 -0600)]
Merge pull request #10036 from donaldsharp/finally_frr

Finally frr

2 years agozebra: free LSP workqueue later during shutdown
Mark Stapp [Fri, 12 Nov 2021 20:10:00 +0000 (15:10 -0500)]
zebra: free LSP workqueue later during shutdown

Free the LSP workqueue later during shutdown, so that zebra
has enough time to clean up and uninstall any LSPs.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agodoc: update & clarify language in process arch doc
Quentin Young [Fri, 12 Nov 2021 19:45:36 +0000 (14:45 -0500)]
doc: update & clarify language in process arch doc

There was a historical blurb at the top of the process architecture
document that in several instances caused some confusion regarding
whether or not FRR supports multithreading. Remove this paragraph and
replace it with a summary of the page contents.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agotools: simplify excessively complex conditional
Quentin Young [Fri, 12 Nov 2021 18:37:09 +0000 (13:37 -0500)]
tools: simplify excessively complex conditional

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agotests: Ensure BGP has had time to import routes through the vpn
Donald Sharp [Fri, 12 Nov 2021 15:52:03 +0000 (10:52 -0500)]
tests: Ensure BGP has had time to import routes through the vpn

Currently I get bgp_instance_del-test as well as bgp_l3vpn_to_bgp_vrf
failures every ~3-4 runs when under a 40 parallel run with micronet.
Examination of the failure and passing cases always leads to the
failures showing convergence of bgp bestpath immediately after
the show commands to ensure that the routes are there.

Modify the code to look for the fact that the vrf has
converged from routes being passed around across vrf's
and ensure that bestpath has run on them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Add vrf information to best path debugging
Donald Sharp [Fri, 12 Nov 2021 15:46:48 +0000 (10:46 -0500)]
bgpd: Add vrf information to best path debugging

When debugging issues for routes in multiple vrf's.  It would
be extremely useful if the debug output had which vrf we
are acting on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotools: string literals -> comments
Quentin Young [Fri, 12 Nov 2021 18:16:25 +0000 (13:16 -0500)]
tools: string literals -> comments

Convert all floating string literals being used as comments, to comments

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agoMerge pull request #10045 from qlyoung/fix-pr-10006
Igor Ryzhov [Fri, 12 Nov 2021 18:12:58 +0000 (21:12 +0300)]
Merge pull request #10045 from qlyoung/fix-pr-10006

zebra: use tabs instead of spaces zebra_vxlan.c

2 years agobgpd: fix source-address for BFD sessions when using update-source IFNAME
Igor Ryzhov [Fri, 12 Nov 2021 16:32:06 +0000 (19:32 +0300)]
bgpd: fix source-address for BFD sessions when using update-source IFNAME

When "update-source IFNAME" is used for the neighbor, p->update_source
is set to NULL, so we can't use it as a source address and should use
the address from p->su_local.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agozebra: use tabs instead of spaces zebra_vxlan.c
Quentin Young [Fri, 12 Nov 2021 16:09:48 +0000 (11:09 -0500)]
zebra: use tabs instead of spaces zebra_vxlan.c

Bad style introduced in
https://github.com/FRRouting/frr/pull/10006

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agoMerge pull request #9945 from idryzhov/isis-time-t
Donatas Abraitis [Fri, 12 Nov 2021 06:39:46 +0000 (08:39 +0200)]
Merge pull request #9945 from idryzhov/isis-time-t

isisd: use time_t for last update and last flap

2 years agoMerge pull request #9982 from idryzhov/fix-netns-delete
Donald Sharp [Thu, 11 Nov 2021 23:41:33 +0000 (18:41 -0500)]
Merge pull request #9982 from idryzhov/fix-netns-delete

zebra: fix netns deletion

2 years agoMerge pull request #9981 from idryzhov/fix-vrf-delete
Donald Sharp [Thu, 11 Nov 2021 23:41:02 +0000 (18:41 -0500)]
Merge pull request #9981 from idryzhov/fix-vrf-delete

lib: fix vrf deletion when the last interface is deleted

2 years agoMerge pull request #9965 from idryzhov/fix-table-manager-disable
Donald Sharp [Thu, 11 Nov 2021 23:40:08 +0000 (18:40 -0500)]
Merge pull request #9965 from idryzhov/fix-table-manager-disable

zebra: fix disabling table manager

2 years agoMerge pull request #10035 from donaldsharp/ospf_use_after_free
Igor Ryzhov [Thu, 11 Nov 2021 21:34:16 +0000 (00:34 +0300)]
Merge pull request #10035 from donaldsharp/ospf_use_after_free

ospfd: Prevent use after free on shutdown

2 years ago*: Cleanup some documentation from quagga->frr
Donald Sharp [Thu, 11 Nov 2021 19:40:17 +0000 (14:40 -0500)]
*: Cleanup some documentation from quagga->frr

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years ago*: Rename quagga_timestamp with frr_timestamp
Donald Sharp [Thu, 11 Nov 2021 19:33:41 +0000 (14:33 -0500)]
*: Rename quagga_timestamp with frr_timestamp

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years ago*: Convert quagga_signal_X to frr_signal_X
Donald Sharp [Thu, 11 Nov 2021 19:28:54 +0000 (14:28 -0500)]
*: Convert quagga_signal_X to frr_signal_X

Naming functions/data structures more appropriately for
the project we are actually in.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospfd: Prevent use after free on shutdown
Donald Sharp [Thu, 11 Nov 2021 18:25:35 +0000 (13:25 -0500)]
ospfd: Prevent use after free on shutdown

Running ospf_topo_vrf1 leads us to this valgrind issue:

==2386518== Invalid read of size 8
==2386518==    at 0x4971520: route_top (table.c:401)
==2386518==    by 0x181F08: ospf_interface_bfd_apply (ospf_bfd.c:126)
==2386518==    by 0x182069: ospf_interface_disable_bfd (ospf_bfd.c:158)
==2386518==    by 0x18BF51: ospf_del_if_params (ospf_interface.c:557)
==2386518==    by 0x18C584: ospf_if_delete_hook (ospf_interface.c:712)
==2386518==    by 0x490CA0B: hook_call_if_del (if.c:61)
==2386518==    by 0x490D1F3: if_delete_retain (if.c:286)
==2386518==    by 0x490D337: if_delete (if.c:309)
==2386518==    by 0x490CDED: if_destroy_via_zapi (if.c:200)
==2386518==    by 0x49940A9: zclient_interface_delete (zclient.c:2237)
==2386518==    by 0x4998062: zclient_read (zclient.c:3969)
==2386518==    by 0x4979529: thread_call (thread.c:1908)
==2386518==    by 0x4919918: frr_run (libfrr.c:1164)
==2386518==    by 0x181AC7: main (ospf_main.c:235)
==2386518==  Address 0x5df39a0 is 0 bytes inside a block of size 56 free'd
==2386518==    at 0x48399AB: free (vg_replace_malloc.c:538)
==2386518==    by 0x492A03E: qfree (memory.c:141)
==2386518==    by 0x4970C6F: route_table_free (table.c:141)
==2386518==    by 0x4970A36: route_table_finish (table.c:61)
==2386518==    by 0x18C543: ospf_if_delete_hook (ospf_interface.c:708)
==2386518==    by 0x490CA0B: hook_call_if_del (if.c:61)
==2386518==    by 0x490D1F3: if_delete_retain (if.c:286)
==2386518==    by 0x490D337: if_delete (if.c:309)
==2386518==    by 0x490CDED: if_destroy_via_zapi (if.c:200)
==2386518==    by 0x49940A9: zclient_interface_delete (zclient.c:2237)
==2386518==    by 0x4998062: zclient_read (zclient.c:3969)
==2386518==    by 0x4979529: thread_call (thread.c:1908)
==2386518==    by 0x4919918: frr_run (libfrr.c:1164)
==2386518==    by 0x181AC7: main (ospf_main.c:235)
==2386518==  Block was alloc'd at
==2386518==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==2386518==    by 0x4929EFC: qcalloc (memory.c:116)
==2386518==    by 0x49709F8: route_table_init_with_delegate (table.c:53)
==2386518==    by 0x49717F4: route_table_init (table.c:528)
==2386518==    by 0x18C328: ospf_if_new_hook (ospf_interface.c:659)
==2386518==    by 0x490C97D: hook_call_if_add (if.c:60)
==2386518==    by 0x490CE85: if_create_name (if.c:223)
==2386518==    by 0x490DF32: if_get_by_name (if.c:622)
==2386518==    by 0x4993F73: zclient_interface_add (zclient.c:2186)
==2386518==    by 0x4998062: zclient_read (zclient.c:3969)
==2386518==    by 0x4979529: thread_call (thread.c:1908)
==2386518==    by 0x4919918: frr_run (libfrr.c:1164)
==2386518==    by 0x181AC7: main (ospf_main.c:235)
==2386518==

Fix the ordering to do the individual node tree cleanup after we delete
the data we care about.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10033 from donaldsharp/bgp_max_no_go
Igor Ryzhov [Thu, 11 Nov 2021 17:31:03 +0000 (20:31 +0300)]
Merge pull request #10033 from donaldsharp/bgp_max_no_go

*: use compiler.h MIN/MAX macros instead of everyone having one

2 years agobuild: fix duplicate yang.c file inclusions
David Lamparter [Thu, 11 Nov 2021 14:46:54 +0000 (15:46 +0100)]
build: fix duplicate yang.c file inclusions

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobuild: remove some useless intermediate libraries
David Lamparter [Thu, 11 Nov 2021 14:45:09 +0000 (15:45 +0100)]
build: remove some useless intermediate libraries

These really serve no purpose other than slowing our build down.  If
there's a benefit to any of these, they can be readded.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years ago*: use compiler.h MIN/MAX macros instead of everyone having one
Donald Sharp [Thu, 11 Nov 2021 14:39:52 +0000 (09:39 -0500)]
*: use compiler.h MIN/MAX macros instead of everyone having one

We had various forms of min/max macros across multiple daemons
all of which duplicated what we have in compiler.h.  Convert
everyone to use the `correct` ones

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobuild: link libcrypt & libdl to libfrr only
David Lamparter [Thu, 11 Nov 2021 14:28:33 +0000 (15:28 +0100)]
build: link libcrypt & libdl to libfrr only

They're not needed elsewhere.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobuild: link libelf to clippy only
David Lamparter [Thu, 11 Nov 2021 14:05:02 +0000 (15:05 +0100)]
build: link libelf to clippy only

It's not needed elsewhere & generates a bogus dependency.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobuild: fix more libtool stupidity for modules
David Lamparter [Thu, 11 Nov 2021 13:27:13 +0000 (14:27 +0100)]
build: fix more libtool stupidity for modules

libtool, the radioactive dumpster fire of the GNU ecosystem.

A module should not have a SONAME set.  SONAMEs are for (versioned)
libraries on search paths.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobuild: break up tests/subdir.am
David Lamparter [Thu, 11 Nov 2021 13:36:28 +0000 (14:36 +0100)]
build: break up tests/subdir.am

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #10006 from chiragshah6/evpn_dev
Russ White [Thu, 11 Nov 2021 13:09:06 +0000 (08:09 -0500)]
Merge pull request #10006 from chiragshah6/evpn_dev

zebra:  svi down remove evpn l2vni from l3vni list

2 years agoMerge pull request #10025 from opensourcerouting/xref-backtrace
Russ White [Thu, 11 Nov 2021 13:08:19 +0000 (08:08 -0500)]
Merge pull request #10025 from opensourcerouting/xref-backtrace

lib: backtraces for specific log messages

2 years agoMerge pull request #9861 from rgirada/ospf6_coverity
Russ White [Thu, 11 Nov 2021 13:04:28 +0000 (08:04 -0500)]
Merge pull request #9861 from rgirada/ospf6_coverity

ospf6d: Addressing few coverity issues.

2 years agoMerge pull request #9864 from ton31337/feature/access_list_autocomplete
Russ White [Thu, 11 Nov 2021 13:03:33 +0000 (08:03 -0500)]
Merge pull request #9864 from ton31337/feature/access_list_autocomplete

lib: Add autocomplete for access-lists

2 years agoMerge pull request #10019 from donaldsharp/pim_upstream_reg_state
Russ White [Thu, 11 Nov 2021 13:00:36 +0000 (08:00 -0500)]
Merge pull request #10019 from donaldsharp/pim_upstream_reg_state

pimd: Remove default from enum based switch

2 years agobuild: refactor `tests/subdir.am`
David Lamparter [Thu, 11 Nov 2021 12:51:44 +0000 (13:51 +0100)]
build: refactor `tests/subdir.am`

... to put related stuff next to each other.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #9931 from leibaogit/master
Igor Ryzhov [Thu, 11 Nov 2021 12:34:01 +0000 (15:34 +0300)]
Merge pull request #9931 from leibaogit/master

zebra: Fix the RA packets can not sent out

2 years agozebra: fix disabling table manager
Igor Ryzhov [Thu, 4 Nov 2021 22:54:48 +0000 (01:54 +0300)]
zebra: fix disabling table manager

42d4b30e introduced per-VRF table manager.

Table manager is allocated when the VRF is created, but it is freed when
the VRF is disabled. When this VRF is re-enabled, zebra ends up with
table manager being NULL pointer and it crashes on any dereference.

Table manager should be freed when the VRF is deleted, not when it's
disabled.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoisisd: use time_t for last update and last flap
Igor Ryzhov [Wed, 3 Nov 2021 09:40:40 +0000 (12:40 +0300)]
isisd: use time_t for last update and last flap

These variables are only assigned with time() which returns time_t.
This should also fix occasional CI build failures because of comparisons
of signed and unsigned integers.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agolib: fix vrf deletion when the last interface is deleted
Igor Ryzhov [Fri, 5 Nov 2021 22:22:07 +0000 (01:22 +0300)]
lib: fix vrf deletion when the last interface is deleted

Currently, we automatically delete an inactive VRF when its last
interface is deleted. This code introduces a couple of crashes because
of the following problems:
- vrf_delete is called before calling if_del hook, so daemons may try to
  dereference an ifp->vrf pointer which is freed
- in if_terminate, we continue to use the VRF in the loop condition
  after the last interface is deleted

This check is needed only when the interface is deleted by the user,
because if the interface is deleted by the system, VRF must still exist
in the system. Move the check to appropriate places to fix crashes.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agozebra: fix netns deletion
Igor Ryzhov [Sat, 6 Nov 2021 00:36:48 +0000 (03:36 +0300)]
zebra: fix netns deletion

We don't receive interface down/delete notifications from kernel when a
netns is deleted. Therefore we have to manually replicate the necessary
actions, otherwise interfaces are kept in the system with stale pointers
to the deleted netns.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agofabricd: cleanup interface config output
Igor Ryzhov [Tue, 2 Nov 2021 12:22:23 +0000 (15:22 +0300)]
fabricd: cleanup interface config output

We don't need to scan through all configured areas to find the circuit
associated with the interface. It is always stored in ifp->info.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agolib: remove confusing bfd TTL API
Igor Ryzhov [Thu, 4 Nov 2021 12:11:18 +0000 (15:11 +0300)]
lib: remove confusing bfd TTL API

There are two APIs to control the expected number of hops for a BFD
session – `bfd_sess_set_mininum_ttl` and `bfd_sess_set_hop_count`.
The former is very confusing, as it takes an expected TTL in the
BFD packet which is actually a protocol internal value. The latter is
simple and straightforward – it takes an expected number of hops, which
is always 1 for single-hop and >1 for multi-hop.

As the former API is not used anywhere, just remove it to avoid any
confusion.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #10029 from anlancs/doc-bgp-title
Igor Ryzhov [Thu, 11 Nov 2021 11:50:53 +0000 (14:50 +0300)]
Merge pull request #10029 from anlancs/doc-bgp-title

doc: remove redundant chars for bgp

2 years agotests: fix frr-format warnings in printfrr test
David Lamparter [Thu, 11 Nov 2021 11:27:11 +0000 (12:27 +0100)]
tests: fix frr-format warnings in printfrr test

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobuild: adjust silent make rules in tests
David Lamparter [Thu, 11 Nov 2021 11:26:29 +0000 (12:26 +0100)]
build: adjust silent make rules in tests

Purely aesthetic change to make these rules not stick out like a sore
thumb.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobuild: adjust compiler/C11 bits for autoconf 2.70+
David Lamparter [Thu, 11 Nov 2021 11:18:44 +0000 (12:18 +0100)]
build: adjust compiler/C11 bits for autoconf 2.70+

`autoconf` finally arrived in the 2010s and tries to do ISO C11.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobuild: work around AC_PROG_LEX deprecation warning
David Lamparter [Thu, 11 Nov 2021 10:57:59 +0000 (11:57 +0100)]
build: work around AC_PROG_LEX deprecation warning

`AC_PROG_LEX without either yywrap or noyywrap is obsolete`, says
autoconf 2.70.  Sadly, there is no transition window for this, in 2.69
the macro takes no arguments.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agodoc: remove redundant chars for bgp
anlan_cs [Thu, 11 Nov 2021 08:19:37 +0000 (03:19 -0500)]
doc: remove redundant chars for bgp

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2 years agoMerge pull request #10026 from idryzhov/bfd-peer-str-coverity
Donald Sharp [Thu, 11 Nov 2021 00:01:57 +0000 (19:01 -0500)]
Merge pull request #10026 from idryzhov/bfd-peer-str-coverity

bfdd: fix coverity warnings

2 years agopimd: Remove default from enum based switch
Donald Sharp [Wed, 10 Nov 2021 00:30:12 +0000 (19:30 -0500)]
pimd: Remove default from enum based switch

enum based switches should never use default.  It makes
it very hard to fix and find issues when the enum is
changed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #9988 from idryzhov/ospf-gr-broken
Donald Sharp [Wed, 10 Nov 2021 19:05:38 +0000 (14:05 -0500)]
Merge pull request #9988 from idryzhov/ospf-gr-broken

ospfd: remove commands for broken GR helper mode

2 years agoospfd: remove commands for broken GR helper mode
Igor Ryzhov [Sat, 6 Nov 2021 14:00:46 +0000 (17:00 +0300)]
ospfd: remove commands for broken GR helper mode

Issue #9983 explains what is wrong with the GR helper mode.

To unblock the CI that fails almost all the time on the ospf_gr_topo1
test, remove the commands and disable the test. Also add a reminder to
completely remove the helper mode if no one fixes the code in a month.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #9700 from mjstapp/add_json_det_attrs
Donatas Abraitis [Wed, 10 Nov 2021 14:42:30 +0000 (16:42 +0200)]
Merge pull request #9700 from mjstapp/add_json_det_attrs

bgpd: Add 'show bgp <afi> <safi> json detail' header data

2 years agodoc: stick `libunwind` into build docs
David Lamparter [Wed, 10 Nov 2021 11:16:40 +0000 (12:16 +0100)]
doc: stick `libunwind` into build docs

It's strictly optional, but… the backtraces are really much better.
Specifically, `libunwind` is notably more capable in figuring out
function names compared to glibc/libexecinfo `backtrace_symbols()`.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agodoc: add unique-id & backtrace user docs
David Lamparter [Wed, 10 Nov 2021 10:53:32 +0000 (11:53 +0100)]
doc: add unique-id & backtrace user docs

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: fix elf_py TLS section handling
David Lamparter [Wed, 10 Nov 2021 14:30:07 +0000 (15:30 +0100)]
lib: fix elf_py TLS section handling

... need to ignore TLS sections, their address is effectively
meaningless but can overlap other sections we actually need to access.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobfdd: fix coverity warnings
Igor Ryzhov [Wed, 10 Nov 2021 13:36:15 +0000 (16:36 +0300)]
bfdd: fix coverity warnings

show/clear DEFUNs always require either peer label or IP address to be
specified, so if `label` is NULL then `peer_str` is definitely not NULL.
But Coverity doesn't know about that, so it complains about possible
NULL dereference of `peer_str`. This commit should make Coverity happy.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agolib: avoid include loop with assert.h
David Lamparter [Fri, 22 Oct 2021 14:59:42 +0000 (16:59 +0200)]
lib: avoid include loop with assert.h

`assert.h` -> `xref.h` -> `typesafe.h` -> `assert.h`

Might be possible to do this more cleanly some way, but that way is not
obvious, so here's the "simple & dumb" approach.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: add `debug uid XXXXX-XXXXX backtrace`
David Lamparter [Tue, 2 Mar 2021 18:33:45 +0000 (19:33 +0100)]
lib: add `debug uid XXXXX-XXXXX backtrace`

Looks much prettier if `libunwind` is available, but works with glibc or
libexecinfo's `backtrace()` too.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #9941 from chiragshah6/mdev
Rafael Zalamena [Wed, 10 Nov 2021 10:41:33 +0000 (07:41 -0300)]
Merge pull request #9941 from chiragshah6/mdev

pimd: fix msdp mesh grp with wildcard member addr

2 years agolib: stuff xrefs into a tree for lookup
David Lamparter [Wed, 24 Feb 2021 10:57:15 +0000 (11:57 +0100)]
lib: stuff xrefs into a tree for lookup

... so we can actually access by UID without searching the entire list.

Signed-off-by: David Lamparter <equinox@diac24.net>
2 years agolib: add missing include in typerb.h
David Lamparter [Wed, 24 Feb 2021 10:56:41 +0000 (11:56 +0100)]
lib: add missing include in typerb.h

The RB-tree macros use memset(), so we need to #include <string.h>

Signed-off-by: David Lamparter <equinox@diac24.net>
2 years agoMerge pull request #9939 from idryzhov/fix-ptm-build
Mark Stapp [Tue, 9 Nov 2021 16:49:09 +0000 (11:49 -0500)]
Merge pull request #9939 from idryzhov/fix-ptm-build

zebra: fix build with --enable-bfdd=no

2 years agoMerge pull request #10007 from Jafaral/debrpm
Quentin Young [Tue, 9 Nov 2021 16:25:15 +0000 (11:25 -0500)]
Merge pull request #10007 from Jafaral/debrpm

2 years agoospfd: fixing few coverity issues in ospf_vty.c
rgirada [Tue, 9 Nov 2021 12:21:06 +0000 (04:21 -0800)]
ospfd: fixing few coverity issues in ospf_vty.c

Description:
timerval datastructure is being used without initialization.
Using these uninitialized parameters can lead unexpected results
so initializing before using it.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2 years agoMerge pull request #9996 from opensourcerouting/resolver-fix-threads
Igor Ryzhov [Tue, 9 Nov 2021 10:55:44 +0000 (13:55 +0300)]
Merge pull request #9996 from opensourcerouting/resolver-fix-threads

lib: fix `struct thread **` misuse in c-ares resolver bindings

2 years agoMerge pull request #9924 from idryzhov/isis-nb-improvements
Russ White [Mon, 8 Nov 2021 22:56:22 +0000 (17:56 -0500)]
Merge pull request #9924 from idryzhov/isis-nb-improvements

various isisd northbound fixes

2 years agoMerge pull request #9995 from donaldsharp/bfd_ospf_topo1_convvergence
Russ White [Mon, 8 Nov 2021 18:52:12 +0000 (13:52 -0500)]
Merge pull request #9995 from donaldsharp/bfd_ospf_topo1_convvergence

tests: bfd_ospf_topo1 expects unreasonable convergence times under load

2 years agodebian: adjust the changelog for the dev branch
Jafar Al-Gharaibeh [Mon, 8 Nov 2021 17:54:42 +0000 (11:54 -0600)]
debian: adjust the changelog for the dev branch

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agodebian, redhat: sync changelog from 8.1 release
Jafar Al-Gharaibeh [Thu, 4 Nov 2021 19:40:38 +0000 (14:40 -0500)]
debian, redhat: sync changelog from 8.1 release

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agozebra: svi down remove l2vni from l3vni list
Chirag Shah [Wed, 3 Nov 2021 00:57:07 +0000 (17:57 -0700)]
zebra: svi down remove l2vni from l3vni list

Problem:
L2-VNI SVI down followed by L2-VNI's vxlan device
deletion leads to stale entry into L3VNI's
L2-VNI list.

Solution:
When L2-VNI associated SVI is down, default vrf
is the new tenant vrf.
Remove L2-VNI from L3VNI's l2vni list as
L3VNI/VRF is no longer valid in absence of associated
SVI.

When SVI is up re-add L2-VNI into associated VRF's
L3VNI.

The above remove/add from the L3VNI's L2VNI list is
already done when vxlan or L2-VNI is flaped, just need
to handle when SVI is flapped.

Ticket:#2817127
Reviewed By:
Testing Done:

After deleting SVI following by L2-VNI deletion,
L3VNI's L2-VNI list delets the L2-VNI. (no stale entry).

After adding back SVI/L2-VNI, L3VNI list adds back the
L2-VNI and it is associated right tenant VRF.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agoMerge pull request #9966 from idryzhov/release-daemon-table-chunks
Donald Sharp [Mon, 8 Nov 2021 17:28:10 +0000 (12:28 -0500)]
Merge pull request #9966 from idryzhov/release-daemon-table-chunks

zebra: don't register same hook multiple times

2 years agoMerge pull request #9984 from ton31337/fix/bgp_view_all
Donald Sharp [Mon, 8 Nov 2021 17:27:10 +0000 (12:27 -0500)]
Merge pull request #9984 from ton31337/fix/bgp_view_all

bgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view all`

2 years agopimd: fix msdp mesh grp with wildcard member addr
Chirag Shah [Tue, 2 Nov 2021 17:58:47 +0000 (10:58 -0700)]
pimd: fix msdp mesh grp with wildcard member addr

frr-reload fails to recognize wildcard "*" for
member address in frr.conf/runing-config as cli
syntax expects in v4 address format.

Ticket: #2816923

Testing:

Without fix:
running config:
ip msdp mesh-group foo1 member *
Frr reoad failure log:
2021-11-02 11:05:04,317  INFO: Loading Config object from vtysh show running
line 5: % Unknown command: ip msdp mesh-group foo1 member *

Traceback (most recent call last):
  File "/usr/lib/frr/frr-reload.py", line 1950, in <module>

With fix:
--------
running config displays:
ip msdp mesh-group foo1 member 0.0.0.0

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agolib: remove `vector_get_index()`
David Lamparter [Mon, 8 Nov 2021 13:07:30 +0000 (14:07 +0100)]
lib: remove `vector_get_index()`

... its only purpose was to serve as a footgun, and all such uses have
been eliminated now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agotests: add c-ares "exercise" tool
David Lamparter [Sun, 7 Nov 2021 14:54:55 +0000 (15:54 +0100)]
tests: add c-ares "exercise" tool

This can't really be run as part of CI, it's intended as a helper
instead, to use manually after poking around in the c-ares binding code.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agotests: allow common_cli.c with logging enabled
David Lamparter [Sun, 7 Nov 2021 14:49:17 +0000 (15:49 +0100)]
tests: allow common_cli.c with logging enabled

common_cli.c disables logging by default so stdio is usable as vty
without log messages getting strewn inbetween.  This the right thing for
most tests, but not all; sometimes we do want log messages.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: fix c-ares thread misuse
David Lamparter [Sun, 7 Nov 2021 14:41:18 +0000 (15:41 +0100)]
lib: fix c-ares thread misuse

The `struct thread **ref` that the thread code takes is written to and
needs to stay valid over the lifetime of a thread.  This does not hold
up if thread pointers are directly put in a `vector` since adding items
to a `vector` may reallocate the entire array.  The thread code would
then write to a now-invalid `ref`, potentially corrupting entirely
unrelated data.

This should be extremely rare to trigger in practice since we only use
one c-ares channel, which will likely only ever use one fd, so the
vector is never resized.  That said, c-ares using only one fd is just
plain fragile luck.

Either way, fix this by creating a resolver_fd tracking struct, and
clean up the code while we're at it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #9977 from ton31337/fix/documentation_for_rpki_from_packages
Igor Ryzhov [Mon, 8 Nov 2021 12:42:51 +0000 (15:42 +0300)]
Merge pull request #9977 from ton31337/fix/documentation_for_rpki_from_packages

doc: We must install rpki packages to enable RPKI support

2 years agoMerge pull request #10001 from idryzhov/fix-bgp-ci
Donald Sharp [Mon, 8 Nov 2021 12:35:38 +0000 (07:35 -0500)]
Merge pull request #10001 from idryzhov/fix-bgp-ci

tests: fix bgp_community_change_update