]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
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 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 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 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 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 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 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 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 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

2 years agotests: fix bgp_community_change_update
Igor Ryzhov [Mon, 8 Nov 2021 10:35:09 +0000 (13:35 +0300)]
tests: fix bgp_community_change_update

949aaea5 removed debugs from all topotests, but this test relies on the
debug logs so it constantly fails now.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agodoc: We must install rpki packages to enable RPKI support
Donatas Abraitis [Fri, 5 Nov 2021 20:45:05 +0000 (22:45 +0200)]
doc: We must install rpki packages to enable RPKI support

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #9871 from opensourcerouting/vector-remove-vty
Donald Sharp [Sun, 7 Nov 2021 15:58:27 +0000 (10:58 -0500)]
Merge pull request #9871 from opensourcerouting/vector-remove-vty

lib: 🧹🧹🧹 vty code 🧹🧹🧹

2 years agoMerge pull request #9859 from donaldsharp/reduce_debugs
Christian Hopps [Sun, 7 Nov 2021 14:52:28 +0000 (09:52 -0500)]
Merge pull request #9859 from donaldsharp/reduce_debugs

tests: Remove debugs from topotests

2 years agotests: bfd_ospf_topo1 expects unreasonable convergence times under load
Donald Sharp [Sun, 7 Nov 2021 13:37:09 +0000 (08:37 -0500)]
tests: bfd_ospf_topo1 expects unreasonable convergence times under load

When our CI test system is under high load, expecting bfd to
converge in under 2 seconds is not going to happen.  Modify the test
suites to just ensure that things reconvderge.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #9954 from donaldsharp/redistribute_nexthops
Donatas Abraitis [Sun, 7 Nov 2021 13:01:03 +0000 (15:01 +0200)]
Merge pull request #9954 from donaldsharp/redistribute_nexthops

zebra: Send up ifindex for redistribution when appropriate

2 years agotests: Remove debugs from topotests
Donald Sharp [Sun, 7 Nov 2021 12:45:27 +0000 (07:45 -0500)]
tests: Remove debugs from topotests

Debugs take up a significant amount of cpu time as well as
increased disk space for storage of results. Reduce test
over head by removing the debugs, Hopefully this helps
alleviate some of the overloading that we are seeing in
our CI systems.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: keep vty listeners in a proper struct & list
David Lamparter [Fri, 22 Oct 2021 12:36:39 +0000 (14:36 +0200)]
lib: keep vty listeners in a proper struct & list

Makes a bit more sense than the odd vector stuff.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: replace vtyvec/vtyshvec with lists
David Lamparter [Fri, 22 Oct 2021 12:15:55 +0000 (14:15 +0200)]
lib: replace vtyvec/vtyshvec with lists

These are just used to iterate over active vty sessions, a vector is a
weird choice there.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: remove unused vty_log() functions
David Lamparter [Fri, 22 Oct 2021 12:04:33 +0000 (14:04 +0200)]
lib: remove unused vty_log() functions

These had no remaining users for a while now.  The logging backend has
its own list of receivers.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view detail`
Donatas Abraitis [Sat, 6 Nov 2021 13:54:20 +0000 (15:54 +0200)]
bgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view detail`

AFI/SAFI is handled in bgp_vty_find_and_parse_afi_safi_bgp() properly for
IPv4, but not for IPv6. Let's have it enabled for IPv6 by default.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view all`
Donatas Abraitis [Sat, 6 Nov 2021 13:50:56 +0000 (15:50 +0200)]
bgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view all`

AFI/SAFI is handled in bgp_vty_find_and_parse_afi_safi_bgp() properly for
IPv4, but not for IPv6. Let's have it enabled for IPv6 by default.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #9958 from donaldsharp/all_protocol_nhg_replace
Donatas Abraitis [Sat, 6 Nov 2021 13:11:33 +0000 (15:11 +0200)]
Merge pull request #9958 from donaldsharp/all_protocol_nhg_replace

tests: Fix route replace test in all_protocol_startup

2 years agoMerge pull request #9980 from donaldsharp/pim_compile
Christian Hopps [Sat, 6 Nov 2021 11:12:26 +0000 (07:12 -0400)]
Merge pull request #9980 from donaldsharp/pim_compile

pimd: remove usage of inet_ntop

2 years agoMerge pull request #9960 from donaldsharp/ospfv3_crash_exchange_done
Russ White [Fri, 5 Nov 2021 23:02:01 +0000 (19:02 -0400)]
Merge pull request #9960 from donaldsharp/ospfv3_crash_exchange_done

ospf6d: Prevent use after free

2 years agopimd: remove usage of inet_ntop
Donald Sharp [Fri, 5 Nov 2021 22:05:21 +0000 (18:05 -0400)]
pimd: remove usage of inet_ntop

We should not be using inet_ntop. and should be using
the appropriate %pI4 instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospf6d: Prevent crash in adj_ok
Donald Sharp [Fri, 5 Nov 2021 21:56:42 +0000 (17:56 -0400)]
ospf6d: Prevent crash in adj_ok

The adj_ok thread event is being added but not killed
when the underlying interface is deleted.  I am seeing
this crash:

OSPF6: Received signal 11 at 1636142186 (si_addr 0x0, PC 0x561d7fc42285); aborting...
OSPF6: zlog_signal+0x18c                  7f227e93519a     7ffdae024590 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: core_handler+0xe3                  7f227e97305e     7ffdae0246b0 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: funlockfile+0x50                   7f227e863140     7ffdae024800 /lib/x86_64-linux-gnu/libpthread.so.0 (mapped at 0x7f227e84f000)
OSPF6:     ---- signal ----
OSPF6: need_adjacency+0x10                561d7fc42285     7ffdae024db0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: adj_ok+0x180                       561d7fc42f0b     7ffdae024dc0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: thread_call+0xc2                   7f227e989e32     7ffdae024e00 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: frr_run+0x217                      7f227e92a7f3     7ffdae024ec0 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: main+0xf3                          561d7fc0f573     7ffdae024fd0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: __libc_start_main+0xea             7f227e6b0d0a     7ffdae025010 /lib/x86_64-linux-gnu/libc.so.6 (mapped at 0x7f227e68a000)
OSPF6: _start+0x2a                        561d7fc0f06a     7ffdae0250e0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: in thread adj_ok scheduled from ospf6d/ospf6_interface.c:678 dr_election()

The crash is in the on->ospf6_if pointer is NULL.  The only way this could
happen from what I can tell is that the event is added to the system
and then we immediately delete the interface, removing the memory
but not freeing up the adj_ok thread event.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospf6d: Prevent use after free
Donald Sharp [Thu, 4 Nov 2021 17:00:51 +0000 (13:00 -0400)]
ospf6d: Prevent use after free

I am seeing a crash of ospf6d with this stack trace:

OSPF6: Received signal 11 at 1636042827 (si_addr 0x0, PC 0x55efc2d09ec2); aborting...
OSPF6: zlog_signal+0x18c                  7fe20c8ca19a     7ffd08035590 /lib/libfrr.so.0 (mapped at 0x7fe20c819000)
OSPF6: core_handler+0xe3                  7fe20c90805e     7ffd080356b0 /lib/libfrr.so.0 (mapped at 0x7fe20c819000)
OSPF6: funlockfile+0x50                   7fe20c7f8140     7ffd08035800 /lib/x86_64-linux-gnu/libpthread.so.0 (mapped at 0x7fe20c7e4000)
OSPF6:     ---- signal ----
OSPF6: ospf6_neighbor_state_change+0xdc     55efc2d09ec2     7ffd08035d90 /usr/lib/frr/ospf6d (mapped at 0x55efc2c8e000)
OSPF6: exchange_done+0x15c                55efc2d0ab4a     7ffd08035dc0 /usr/lib/frr/ospf6d (mapped at 0x55efc2c8e000)
OSPF6: thread_call+0xc2                   7fe20c91ee32     7ffd08035df0 /lib/libfrr.so.0 (mapped at 0x7fe20c819000)
OSPF6: frr_run+0x217                      7fe20c8bf7f3     7ffd08035eb0 /lib/libfrr.so.0 (mapped at 0x7fe20c819000)
OSPF6: main+0xf3                          55efc2cd7573     7ffd08035fc0 /usr/lib/frr/ospf6d (mapped at 0x55efc2c8e000)
OSPF6: __libc_start_main+0xea             7fe20c645d0a     7ffd08036000 /lib/x86_64-linux-gnu/libc.so.6 (mapped at 0x7fe20c61f000)
OSPF6: _start+0x2a                        55efc2cd706a     7ffd080360d0 /usr/lib/frr/ospf6d (mapped at 0x55efc2c8e000)
OSPF6: in thread exchange_done scheduled from ospf6d/ospf6_message.c:2264 ospf6_dbdesc_send_newone()

The stack trace when decoded is:

(gdb) l *(ospf6_neighbor_state_change+0xdc)
0x7bec2 is in ospf6_neighbor_state_change (ospf6d/ospf6_neighbor.c:200).
warning: Source file is more recent than executable.
195    on->name, ospf6_neighbor_state_str[prev_state],
196    ospf6_neighbor_state_str[next_state],
197    ospf6_neighbor_event_string(event));
198 }
199
200 /* Optionally notify about adjacency changes */
201 if (CHECK_FLAG(on->ospf6_if->area->ospf6->config_flags,
202        OSPF6_LOG_ADJACENCY_CHANGES)
203     && (CHECK_FLAG(on->ospf6_if->area->ospf6->config_flags,
204    OSPF6_LOG_ADJACENCY_DETAIL)

OSPFv3 is creating the event without a managing thread and as such
if the event is not run before a deletion event comes in memory
will be freed up and we'll start trying to access memory we should
not.  Modify ospfv3 to track the thread and appropriately stop
it when the memory is deleted or it is no longer need to run
that bit of code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #9936 from mjstapp/fix_pcep_tests_tmp
Russ White [Fri, 5 Nov 2021 21:32:55 +0000 (17:32 -0400)]
Merge pull request #9936 from mjstapp/fix_pcep_tests_tmp

tests: clean up temp files in libpcep tests

2 years agoMerge pull request #9978 from ton31337/fix/doc_for_deprecated_command
Russ White [Fri, 5 Nov 2021 21:31:57 +0000 (17:31 -0400)]
Merge pull request #9978 from ton31337/fix/doc_for_deprecated_command

doc: Drop misleading explanation about `neighbor X interface IFNAME`

2 years agoMerge pull request #9972 from opensourcerouting/bfd-bgp-fixes
Russ White [Fri, 5 Nov 2021 21:31:29 +0000 (17:31 -0400)]
Merge pull request #9972 from opensourcerouting/bfd-bgp-fixes

bfdd,bgpd: fix some integration bugs

2 years agodoc: Drop misleading explanation about `neighbor X interface IFNAME`
Donatas Abraitis [Fri, 5 Nov 2021 20:59:52 +0000 (22:59 +0200)]
doc: Drop misleading explanation about `neighbor X interface IFNAME`

This command is not deprecated.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #9974 from donaldsharp/ldp_vpls_topo1_wait
Jafar Al-Gharaibeh [Fri, 5 Nov 2021 19:50:02 +0000 (14:50 -0500)]
Merge pull request #9974 from donaldsharp/ldp_vpls_topo1_wait

tests: Ensure ospf has reconverged before continuing

2 years agoMerge pull request #9975 from donaldsharp/pim_basic_timings
Jafar Al-Gharaibeh [Fri, 5 Nov 2021 19:43:21 +0000 (14:43 -0500)]
Merge pull request #9975 from donaldsharp/pim_basic_timings

tests: pim_basic needs to wait for event to happen under load

2 years agoMerge pull request #9833 from idryzhov/cleanup-if-by-index-all-vrf
Russ White [Fri, 5 Nov 2021 19:17:31 +0000 (15:17 -0400)]
Merge pull request #9833 from idryzhov/cleanup-if-by-index-all-vrf

*: fix usage of if_lookup_by_index_all_vrf

2 years agoMerge pull request #9900 from SaiGomathiN/sai-pimjoin
Russ White [Fri, 5 Nov 2021 19:17:01 +0000 (15:17 -0400)]
Merge pull request #9900 from SaiGomathiN/sai-pimjoin

pimd: Change in PIM join and mroute

2 years agoMerge pull request #9777 from rgirada/ospf_nbr
Russ White [Fri, 5 Nov 2021 19:15:45 +0000 (15:15 -0400)]
Merge pull request #9777 from rgirada/ospf_nbr

ospfd: Few modifications in "show ip ospf neighbor" o/p.

2 years agoMerge pull request #9884 from ton31337/feature/long_lived_graceful_restart_capability
Russ White [Fri, 5 Nov 2021 19:15:18 +0000 (15:15 -0400)]
Merge pull request #9884 from ton31337/feature/long_lived_graceful_restart_capability

bgpd: Add Long-lived Graceful Restart capability (restarter)

2 years agoMerge pull request #9959 from ton31337/fix/doc_minor_changes_zebra.rst
Donald Sharp [Fri, 5 Nov 2021 17:59:07 +0000 (13:59 -0400)]
Merge pull request #9959 from ton31337/fix/doc_minor_changes_zebra.rst

doc: Cosmetic minor changes for zebra.rst

2 years agotests: pim_basic needs to wait for event to happen under load
Donald Sharp [Fri, 5 Nov 2021 15:49:37 +0000 (11:49 -0400)]
tests: pim_basic needs to wait for event to happen under load

The test system under load looks for upstream state only
1 time immediately after sending 2 streams of S,G data
flowing.  Give the system some time to process this
and ensure that it actually shows up in a small
amount of time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Ensure ospf has reconverged before continuing
Donald Sharp [Fri, 5 Nov 2021 15:13:12 +0000 (11:13 -0400)]
tests: Ensure ospf has reconverged before continuing

The test_ldp_pseudowires_after_link_down test
shuts a link down and was blindly waiting 5 seconds
before just assuming the test system was in a sane
state.  Remove the sleep(5) and actually look for
the changed state for the route 2.2.2.2 that the
psueudowire actually depends on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #9967 from donaldsharp/test_ospf_topo1
Russ White [Fri, 5 Nov 2021 14:28:21 +0000 (10:28 -0400)]
Merge pull request #9967 from donaldsharp/test_ospf_topo1

tests: test_ospf_topo1.py ensure rib has time to converge

2 years agoMerge pull request #9964 from donaldsharp/zebra_ifp_evpn_crash
Russ White [Fri, 5 Nov 2021 14:26:38 +0000 (10:26 -0400)]
Merge pull request #9964 from donaldsharp/zebra_ifp_evpn_crash

zebra: remove ifp reference against the macs before deleting the ifp-…

2 years agozebar: Fix the RA sent fail in netns mode
LEI BAO [Fri, 5 Nov 2021 13:06:01 +0000 (21:06 +0800)]
zebar: Fix the RA sent fail in netns mode

Make the code more explicit.
Signed-off-by: LEI BAO <bali.baolei@cn.ibm.com>
2 years agotests: test_ospf_topo1.py ensure rib has time to converge
Donald Sharp [Fri, 5 Nov 2021 00:31:37 +0000 (20:31 -0400)]
tests: test_ospf_topo1.py ensure rib has time to converge

The test does this:

a) shut link down
b) test for ospf convergence
c) ensure the route is installed

When under a heavily loaded system c) is not guaranteed
to happen quickly.  Give the system 10 extra seconds
to ensure it happens.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Fix the RA send failed in netns mode
LEI BAO [Fri, 5 Nov 2021 06:05:36 +0000 (14:05 +0800)]
zebra: Fix the RA send failed in netns mode

In the rtadv_timer(), it always uses the zvrf's socket to send RA
packets. In the vrf-lite mode, it's righ since it uses the default
vrf to send the RA packets. But in the netns mode, it uses socket
in each netns. So the issue only happens in the netns mode because
the zvrf's socket may not be in the same netns as the interface's
netns. In order to compatible with both vrf-lite and netns mode,
the fix uses the if_lookup_by_index() to check whether interfaces
can use the zvrf's socket.

Signed-off-by: LEI BAO <bali.baolei@cn.ibm.com>
2 years agoMerge pull request #9943 from idryzhov/crash-fixes
Donald Sharp [Fri, 5 Nov 2021 00:29:23 +0000 (20:29 -0400)]
Merge pull request #9943 from idryzhov/crash-fixes

a couple of crash fixes after recent interface/vrf rework

2 years agozebra: don't register same hook multiple times
Igor Ryzhov [Thu, 4 Nov 2021 23:04:02 +0000 (02:04 +0300)]
zebra: don't register same hook multiple times

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>
2 years agozebra: remove ifp reference against the macs before deleting the ifp->mac_list
Anuradha Karuppiah [Thu, 4 Nov 2021 18:15:10 +0000 (11:15 -0700)]
zebra: remove ifp reference against the macs before deleting the ifp->mac_list

Fix this crash seen in our topotests:

root@eva:/var/tmp/frr/zebra.928140# more crashlog
ZEBRA: Received signal 11 at 1636047065 (si_addr 0x0, PC 0x7fc01495a7a5); aborting...
ZEBRA: zlog_signal+0x18c                  7fc01496419a     7ffd595e1f50 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: core_handler+0xe3                  7fc0149a205e     7ffd595e2070 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: funlockfile+0x50                   7fc014841140     7ffd595e21c0 /lib/x86_64-linux-gnu/libpthread.so.0 (mapped at 0x7fc01482d000)
ZEBRA:     ---- signal ----
ZEBRA: list_delete_node+0x3c              7fc01495a7a5     7ffd595e2750 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: zebra_evpn_mac_ifp_unlink+0x9f     5600718b6518     7ffd595e2770 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_mac_clear_fwd_info+0x18     5600718b6654     7ffd595e27a0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_mac_del+0x110           5600718b90b5     7ffd595e27c0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_mac_del_hash_entry+0xef     5600718b93a7     7ffd595e28f0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: hash_iterate+0x57                  7fc014949fa8     7ffd595e2920 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: zebra_evpn_mac_del_all+0x6d        5600718b9418     7ffd595e2970 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_cleanup_all+0x5a        5600718b5322     7ffd595e29e0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_vxlan_cleanup_all+0x88     5600719106ff     7ffd595e2a10 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: hash_iterate+0x57                  7fc014949fa8     7ffd595e2a50 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: zebra_vxlan_cleanup_tables+0x3a     56007191a230     7ffd595e2aa0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_vrf_disable+0x187            5600718fd656     7ffd595e2ad0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: vrf_disable+0x8b                   7fc0149bc88f     7ffd595e2b40 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: vrf_delete+0x5b                    7fc0149bc65e     7ffd595e2b60 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: vrf_terminate_single+0x38          7fc0149bcd71     7ffd595e2b80 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: vrf_terminate+0xe5                 7fc0149bce59     7ffd595e2ba0 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: sigint+0x1de                       560071883117     7ffd595e2bc0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: quagga_sigevent_process+0x73       7fc0149a1e6c     7ffd595e2c10 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: thread_fetch+0x4f                  7fc0149b8884     7ffd595e2c30 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: frr_run+0x230                      7fc01495980c     7ffd595e2cb0 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: main+0x3e4                         5600718835b3     7ffd595e2dc0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: __libc_start_main+0xea             7fc01468cd0a     7ffd595e2e90 /lib/x86_64-linux-gnu/libc.so.6 (mapped at 0x7fc014666000)
ZEBRA: _start+0x2a                        56007186a46a     7ffd595e2f60 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: no thread information available
root@eva:/var/tmp/frr/zebra.928140#

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agodoc: Cosmetic minor changes for zebra.rst
Donatas Abraitis [Thu, 4 Nov 2021 16:56:32 +0000 (18:56 +0200)]
doc: Cosmetic minor changes for zebra.rst

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #9322 from donaldsharp/sysctl_v6
Donatas Abraitis [Thu, 4 Nov 2021 16:36:07 +0000 (18:36 +0200)]
Merge pull request #9322 from donaldsharp/sysctl_v6

doc: Add documentation about use_oif_addrs_only

2 years agotests: Fix route replace test in all_protocol_startup
Donald Sharp [Thu, 4 Nov 2021 15:45:27 +0000 (11:45 -0400)]
tests: Fix route replace test in all_protocol_startup

The route replace test was doing this seq of events:

a) Create nhg
b) Install route w/ sharpd
c) Ensure it worked
d) Modify nhg
d) Ensure the update group replace worked

The problem is that the sharp code is doing this:

/* Only send via ID if nhgroup has been successfully installed */
if (nhgid && sharp_nhgroup_id_is_installed(nhgid)) {
SET_FLAG(api.message, ZAPI_MESSAGE_NHG);
api.nhgid = nhgid;
} else {
for (ALL_NEXTHOPS_PTR(nhg, nh)) {
api_nh = &api.nexthops[i];

zapi_nexthop_from_nexthop(api_nh, nh);

i++;
}
api.nexthop_num = i;
}

The created nhg has not been successfully installed( or at least
sharpd has not read the results yet) when it gets the command
to install the routes.  As such it passes down the individual
nexthops instead.  The route replace is never going to work.

Modify the code to add a bit of sleep to allow sharpd to
get notified when the system is under load.  At this point
there is no way to query sharpd for whether or not it
thinks it's nhg is installed properly or not.  This
test is failing all over the place for a bunch of people
let's get this fixed so people can get running

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Send up ifindex for redistribution when appropriate
Donald Sharp [Thu, 4 Nov 2021 12:01:14 +0000 (08:01 -0400)]
zebra: Send up ifindex for redistribution when appropriate

Currently the NEXTHOP_TYPE_IPV4 and NEXTHOP_TYPE_IPV6 are
not sending up the resolved ifindex for the route.  This
is causing upper level protocols that have something like
this:

route-map FOO permit 10
  match interface swp13
!

router ospf
   redistribute static
!

ip route 4.5.6.7/32 10.10.10.10

where 10.10.10.10 resolves to interface swp13.  The route-map
will never match in this case.

Since FRR has the resolved nexthop interface, FRR might as
well send it up to be selected on by the upper level protocol
as needed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: update BFD config on update-source change
Rafael Zalamena [Wed, 3 Nov 2021 11:43:17 +0000 (08:43 -0300)]
bgpd: update BFD config on update-source change

Update BFD sessions when the update-source configuration is set so the
session follows the new configured source address.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2 years agobgpd: fix BFD configuration update on TTL change
Rafael Zalamena [Tue, 2 Nov 2021 21:54:23 +0000 (18:54 -0300)]
bgpd: fix BFD configuration update on TTL change

When altering the TTL of a eBGP peer also update the BFD
configuration. This was only working when the configuration happened
after the peer connection had been established.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2 years agolib: constify read only parameters
Rafael Zalamena [Wed, 3 Nov 2021 11:45:02 +0000 (08:45 -0300)]
lib: constify read only parameters

Constify some BFD library function parameters to signalize they are
not going to get modified.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2 years agolib: fix BFD IPv6 session address change
Renato Westphal [Thu, 28 Oct 2021 15:35:56 +0000 (12:35 -0300)]
lib: fix BFD IPv6 session address change

Pass the correct family type and remove unneeded casts.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoMerge pull request #9915 from pguibert6WIND/flowspec_dplane_missing
Mark Stapp [Wed, 3 Nov 2021 19:10:09 +0000 (15:10 -0400)]
Merge pull request #9915 from pguibert6WIND/flowspec_dplane_missing

Flowspec dplane missing

2 years agozebra: netfilter operations notif sent back to daemon
Philippe Guibert [Tue, 2 Nov 2021 09:05:20 +0000 (10:05 +0100)]
zebra: netfilter operations notif sent back to daemon

It appears that without that change, there were no notifications
sent to bgp daemon, after flowspec operations have been sent to
zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agozebra: update dataplane flowspec address family in ipset_info
Philippe Guibert [Thu, 28 Oct 2021 16:28:42 +0000 (18:28 +0200)]
zebra: update dataplane flowspec address family in ipset_info

It is needed for the ipset entry to know for which address family
this ipset entry applies to. Actually, the family is in the original
ipset structure and was not passed as attribute in the dataplane
ipset_info structure. Add it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agozebra: fix flowspec ipset operations
Philippe Guibert [Thu, 28 Oct 2021 11:42:57 +0000 (13:42 +0200)]
zebra: fix flowspec ipset operations

When injecting an ipset entry into the zebra dataplane context, the
ipset name is stored in a separate structure. This will permit the
flowspec plugin to be able to know which ipset has to be appended with
relevant ipset entry.
The problem was that the zebra dataplane objects related to ipset entries
is made up of an union between the ipset structure and the ipset info
structure. This was implying that the two structures were on the same
memory zone, and when extracting the data stored, the data were incomplete.

Fix this by replacing the union structure by a defined struct.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agoMerge pull request #9909 from pguibert6WIND/ospf6_dumb_contexxt
Igor Ryzhov [Wed, 3 Nov 2021 12:58:58 +0000 (15:58 +0300)]
Merge pull request #9909 from pguibert6WIND/ospf6_dumb_contexxt

ospf6d: avoid writing dumb ospf6 info at startup

2 years agoospf6d: avoid writing dumb ospf6 info at startup
Philippe Guibert [Wed, 27 Oct 2021 14:45:05 +0000 (16:45 +0200)]
ospf6d: avoid writing dumb ospf6 info at startup

in show: 'show ipv6 ospf6' handler command, the reason of SPF
executation is looked up and displayed. At startup, SPF has been
started, but shows no specific reason. Instead of dumping non
initialised string context, reset the string context.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>