]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
12 months agoldpd: changes for code maintainability
sri-mohan1 [Tue, 9 May 2023 13:15:27 +0000 (18:45 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
12 months agoldpd: changes for code maintainability
sri-mohan1 [Mon, 8 May 2023 09:58:50 +0000 (15:28 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
12 months agoldpd: changes for code maintainability
sri-mohan1 [Sun, 7 May 2023 15:30:52 +0000 (21:00 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
12 months agoldpd: changes for code maintainability
sri-mohan1 [Sat, 6 May 2023 14:22:34 +0000 (19:52 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
12 months agoldpd: changes for code maintainability
sri-mohan1 [Fri, 5 May 2023 18:11:01 +0000 (23:41 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
13 months agoMerge pull request #13120 from Pdoijode/ospf-virtual-link-crash
Jafar Al-Gharaibeh [Wed, 29 Mar 2023 04:18:58 +0000 (23:18 -0500)]
Merge pull request #13120 from Pdoijode/ospf-virtual-link-crash

ospfd: Fix for vitual-link crash in signal handler

13 months agoMerge pull request #13132 from donaldsharp/use_zebra_vrf_lookup_by_id
Jafar Al-Gharaibeh [Wed, 29 Mar 2023 04:17:03 +0000 (23:17 -0500)]
Merge pull request #13132 from donaldsharp/use_zebra_vrf_lookup_by_id

zebra: Use zebra_vrf_lookup_by_id when we can

13 months agozebra: Use zebra_vrf_lookup_by_id when we can
Donald Sharp [Tue, 28 Mar 2023 19:49:50 +0000 (15:49 -0400)]
zebra: Use zebra_vrf_lookup_by_id when we can

Let's make this as consistent as is possible.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #13113 from sri-mohan1/sri-mohan-ldp
Donatas Abraitis [Tue, 28 Mar 2023 16:14:27 +0000 (19:14 +0300)]
Merge pull request #13113 from sri-mohan1/sri-mohan-ldp

ldpd: changes for code maintainability

13 months agoMerge pull request #13118 from opensourcerouting/fix/password_xfer_config
Russ White [Tue, 28 Mar 2023 15:21:42 +0000 (11:21 -0400)]
Merge pull request #13118 from opensourcerouting/fix/password_xfer_config

bgpd: Copy the password from the previous peer on peer_xfer_config()

13 months agoMerge pull request #13123 from donaldsharp/fix_route_map_name
Russ White [Tue, 28 Mar 2023 15:19:08 +0000 (11:19 -0400)]
Merge pull request #13123 from donaldsharp/fix_route_map_name

bgpd: Fix debug output for route-map names when using a unsuppress-map

13 months agoMerge pull request #13117 from donaldsharp/assert_unneeded
Russ White [Tue, 28 Mar 2023 14:17:15 +0000 (10:17 -0400)]
Merge pull request #13117 from donaldsharp/assert_unneeded

Assert unneeded

13 months agobgpd: Fix debug output for route-map names when using a unsuppress-map
Donald Sharp [Tue, 28 Mar 2023 11:47:22 +0000 (07:47 -0400)]
bgpd: Fix debug output for route-map names when using a unsuppress-map

Log is printing this with this config:

2023-03-28 07:36:47.007 [DEBG] bgpd: [Q9J6Z-09HRR] 192.168.119.120 [Update:SEND] 1.2.3.33/32 is filtered by route-map '(null)'

Here's the config:

 address-family ipv4 unicast
  network 1.2.3.33/32
  network 1.2.3.34/32
  aggregate-address 1.2.3.0/24 summary-only
  redistribute table 33 route-map foo
  neighbor 192.168.119.120 route-map DENY in
  neighbor 192.168.119.120 unsuppress-map UNSUPPRESS

ip prefix-list UNSUPPRESS seq 5 permit 1.2.3.4/32
ip prefix-list UNSUPPRESS seq 10 permit 1.2.3.5/32
ip prefix-list UNSUPPRESS seq 15 permit 1.2.3.6/32

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #13119 from mjstapp/fix_mgmt_proto_makefile
Donald Sharp [Tue, 28 Mar 2023 10:35:19 +0000 (06:35 -0400)]
Merge pull request #13119 from mjstapp/fix_mgmt_proto_makefile

build: clean up mgmtd lib protobuf make syntax

13 months agoospfd: Fix for vitual-link crash in signal handler
Pooja Jagadeesh Doijode [Mon, 27 Mar 2023 17:31:00 +0000 (10:31 -0700)]
ospfd: Fix for vitual-link crash in signal handler

Whenever OSPF virtual-link is created, a virtual interface is
associated with it. Name of the virtual interface is derived by
combining "VLINK" string with the value of vlink_count, which is a global
variable.

Problem:
Consider a scenario where 2 virtual links A and B are created in OSPF with
virtual interfaces VLINK0 and VLINK1 respectively. When virtual-link A is unconfigured
and reconfigured, new interface name derived for it will be VLINK1, which is already
associated with virtual-link B. Due to this, both virtual-links A and B will
point to the same interface, VLINK1.

During FRR restart when signal handler is called, OSPF goes through all the virtual
links and deletes the interface(oi) associated with it. During the deletion of interface
for virtual-link B,it accesses the interface which was deleted already(which was deleted
during deletion of virual-link A) and whose fields were set to NULL. This
leads to OSPF crash.

Fixed it by not decrementing vlink_count during unconfig/deletion for virtual-link.

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
13 months agobuild: clean up mgmtd lib protobuf make syntax
Mark Stapp [Mon, 27 Mar 2023 20:44:27 +0000 (16:44 -0400)]
build: clean up mgmtd lib protobuf make syntax

Fix the makefile rules for the new mgmtd lib module that's
generated from a protobuf spec file.

Signed-off-by: Mark Stapp <mjs@labn.net>
13 months agobgpd: Copy the password from the previous peer on peer_xfer_config()
Donatas Abraitis [Mon, 27 Mar 2023 19:03:03 +0000 (22:03 +0300)]
bgpd: Copy the password from the previous peer on peer_xfer_config()

We copy the password only if an existing peer structure didn't have it.

But it might be the case when it exists, and we skip here.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #13086 from donaldsharp/suppress_fib_pending
Donatas Abraitis [Mon, 27 Mar 2023 18:55:58 +0000 (21:55 +0300)]
Merge pull request #13086 from donaldsharp/suppress_fib_pending

bgpd: Ensure suppress-fib-pending works with network statements

13 months agomgmtd: Remove unnecessary asserts
Donald Sharp [Mon, 27 Mar 2023 12:09:42 +0000 (08:09 -0400)]
mgmtd: Remove unnecessary asserts

event_add_XXXX functions have no failure path where
if you pass in a double event pointer that it could
return without setting the pointer.  As such these
asserts make no sense and are unnecessary

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agolib: Remove unneeded asserts in mgmt code
Donald Sharp [Mon, 27 Mar 2023 12:08:36 +0000 (08:08 -0400)]
lib: Remove unneeded asserts in mgmt code

event_add_XXXX functions have no failure path where
if you pass in a double event pointer that it could
return without setting the pointer.  As such these
asserts make no sense and are unnecessary

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #12931 from SaiGomathiN/yang
Donatas Abraitis [Mon, 27 Mar 2023 10:45:00 +0000 (13:45 +0300)]
Merge pull request #12931 from SaiGomathiN/yang

pim6d: custom error-message for non-multicast groups

13 months agoldpd: changes for code maintainability
sri-mohan1 [Mon, 27 Mar 2023 06:57:01 +0000 (12:27 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
13 months agoMerge pull request #13084 from opensourcerouting/fix/bgp_vrf_md5_password
Donald Sharp [Sun, 26 Mar 2023 12:21:31 +0000 (08:21 -0400)]
Merge pull request #13084 from opensourcerouting/fix/bgp_vrf_md5_password

bgpd: Set md5 TCP socket option for outgoing connections on listener

13 months agoMerge pull request #13101 from opensourcerouting/fix/bindir_for_frr-reload
Donald Sharp [Sun, 26 Mar 2023 12:20:33 +0000 (08:20 -0400)]
Merge pull request #13101 from opensourcerouting/fix/bindir_for_frr-reload

tools: Set correct directory of vtysh for frr-reload.py

13 months agoMerge pull request #13108 from opensourcerouting/clippy-string-warn
Donald Sharp [Sat, 25 Mar 2023 16:57:00 +0000 (12:57 -0400)]
Merge pull request #13108 from opensourcerouting/clippy-string-warn

lib: improve clippy behavior with invalid input

13 months agolib/clippy: bail out on newline inside string
David Lamparter [Sat, 25 Mar 2023 03:34:35 +0000 (12:34 +0900)]
lib/clippy: bail out on newline inside string

While C compilers will generally process strings across lines, we really
don't want that.  I rather treat this as the indication of the typo it
probably is warn about it than support this odd C edge case.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
13 months agolib/clippy: don't SEGV on invalid tokens in DEFPY
David Lamparter [Sat, 25 Mar 2023 03:33:14 +0000 (12:33 +0900)]
lib/clippy: don't SEGV on invalid tokens in DEFPY

The token value can be NULL if we run into something that failed to
parse.  Throw a Python exception rather than SEGV.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
13 months agoMerge pull request #12953 from donaldsharp/struct_event
Jafar Al-Gharaibeh [Fri, 24 Mar 2023 18:48:53 +0000 (13:48 -0500)]
Merge pull request #12953 from donaldsharp/struct_event

Struct event

13 months agotools: Set correct directory of vtysh for frr-reload.py
Donatas Abraitis [Thu, 23 Mar 2023 18:55:14 +0000 (20:55 +0200)]
tools: Set correct directory of vtysh for frr-reload.py

Before it was setting SDIR, which is /usr/lib/frr, but the vtysh binary is put
under bindir (which is /usr/local by default). And running `/usr/lib/frr/frr reload`
failed.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #13093 from manojvn/ospf_mem_leaks
Donald Sharp [Fri, 24 Mar 2023 14:23:18 +0000 (10:23 -0400)]
Merge pull request #13093 from manojvn/ospf_mem_leaks

ospfd: Fix for memory leak issue in ospf related to flood_reduction tests.

13 months agoMerge pull request #13100 from opensourcerouting/fix/bgp_cap_llgr_length_check
Donald Sharp [Fri, 24 Mar 2023 14:22:48 +0000 (10:22 -0400)]
Merge pull request #13100 from opensourcerouting/fix/bgp_cap_llgr_length_check

bgpd: Check 7 bytes for Long-lived Graceful-Restart capability

13 months agobgpd: Check 7 bytes for Long-lived Graceful-Restart capability
Donatas Abraitis [Fri, 24 Mar 2023 07:55:23 +0000 (09:55 +0200)]
bgpd: Check 7 bytes for Long-lived Graceful-Restart capability

It's not 4 bytes, it was assuming the same as Graceful-Restart tuples.

LLGR has more 3 bytes (Long-lived Stale Time).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #13088 from donaldsharp/pim_use_after
mobash-rasool [Fri, 24 Mar 2023 13:03:05 +0000 (18:33 +0530)]
Merge pull request #13088 from donaldsharp/pim_use_after

pimd: Fix use after free issue for ifp's moving vrfs

13 months agoMerge pull request #13094 from loganaden/master
Donald Sharp [Fri, 24 Mar 2023 12:41:11 +0000 (08:41 -0400)]
Merge pull request #13094 from loganaden/master

mgmtd: Fix fd leak.

13 months ago*: Fixup formatting issues due to reordering
Donald Sharp [Thu, 23 Mar 2023 11:37:28 +0000 (07:37 -0400)]
*: Fixup formatting issues due to reordering

All the event changes exposed a bunch of places where
we were not properly following our standards.  Just
clean them up in one big fell swoop.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert event.h to frrevent.h
Donald Sharp [Tue, 7 Mar 2023 19:22:48 +0000 (14:22 -0500)]
*: Convert event.h to frrevent.h

We should probably prevent any type of namespace collision
with something else.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert `struct event_master` to `struct event_loop`
Donald Sharp [Tue, 7 Mar 2023 19:14:41 +0000 (14:14 -0500)]
*: Convert `struct event_master` to `struct event_loop`

Let's find a better name for it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert thread_master_XXX functions to event_master_XXX
Donald Sharp [Sat, 4 Mar 2023 14:14:52 +0000 (09:14 -0500)]
*: Convert thread_master_XXX functions to event_master_XXX

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert THREAD_XXX macros to EVENT_XXX macros
Donald Sharp [Sun, 25 Dec 2022 15:26:52 +0000 (10:26 -0500)]
*: Convert THREAD_XXX macros to EVENT_XXX macros

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agolib, zebra: Convert THREAD_TIMER_STRLEN to EVENT_TIMER_STRLEN
Donald Sharp [Sun, 11 Dec 2022 16:39:09 +0000 (11:39 -0500)]
lib, zebra: Convert THREAD_TIMER_STRLEN to EVENT_TIMER_STRLEN

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agolib: change cpu_thread_history to cpu_event_history
Donald Sharp [Sun, 11 Dec 2022 16:36:01 +0000 (11:36 -0500)]
lib: change cpu_thread_history to cpu_event_history

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agolib: convert xref_threadsched to xref_eventsched
Donald Sharp [Sun, 11 Dec 2022 16:33:30 +0000 (11:33 -0500)]
lib: convert xref_threadsched to xref_eventsched

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agolib: convert thread internal lists to event internal lists
Donald Sharp [Sun, 11 Dec 2022 16:27:26 +0000 (11:27 -0500)]
lib: convert thread internal lists to event internal lists

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert struct thread_master to struct event_master and it's ilk
Donald Sharp [Sun, 11 Dec 2022 16:20:40 +0000 (11:20 -0500)]
*: Convert struct thread_master to struct event_master and it's ilk

Convert the `struct thread_master` to `struct event_master`
across the code base.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert a bunch of thread_XX to event_XX
Donald Sharp [Sun, 11 Dec 2022 15:51:58 +0000 (10:51 -0500)]
*: Convert a bunch of thread_XX to event_XX

Convert these functions:

thread_getrusage
thread_cmd_init
thread_consumed_time
thread_timer_to_hhmmss
thread_is_scheduled
thread_ignore_late_timer

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert thread_should_yield and thread_set_yield_time
Donald Sharp [Sun, 11 Dec 2022 15:39:12 +0000 (10:39 -0500)]
*: Convert thread_should_yield and thread_set_yield_time

Convert thread_should_yield and thread_set_yield_time
to event_should_yield and event_set_yield_time

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert thread_timer_remain_XXX to event_timer_remain_XXX
Donald Sharp [Sun, 11 Dec 2022 13:19:00 +0000 (08:19 -0500)]
*: Convert thread_timer_remain_XXX to event_timer_remain_XXX

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert thread_execute to event_execute
Donald Sharp [Sun, 11 Dec 2022 13:06:25 +0000 (08:06 -0500)]
*: Convert thread_execute to event_execute

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agolib: Convert THREAD_YIELD_TIME_SLOT to EVENT_YIELD_TIME_SLOT
Donald Sharp [Sun, 11 Dec 2022 12:55:02 +0000 (07:55 -0500)]
lib: Convert THREAD_YIELD_TIME_SLOT to EVENT_YIELD_TIME_SLOT

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert thread_fetch and thread_call to event_fetch and event_call
Donald Sharp [Sun, 11 Dec 2022 12:51:16 +0000 (07:51 -0500)]
*: Convert thread_fetch and thread_call to event_fetch and event_call

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agolib: Convert thread_type to event_type and make an enum
Donald Sharp [Sat, 10 Dec 2022 14:28:31 +0000 (09:28 -0500)]
lib: Convert thread_type to event_type and make an enum

a) Convert thread types to a enum
b) Convert MTYPES to EVENT instead of THREAD

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert thread_cancelXXX to event_cancelXXX
Donald Sharp [Sat, 10 Dec 2022 14:08:37 +0000 (09:08 -0500)]
*: Convert thread_cancelXXX to event_cancelXXX

Modify the code base so that thread_cancel becomes event_cancel

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Convert thread_add_XXX functions to event_add_XXX
Donald Sharp [Fri, 20 May 2022 18:19:08 +0000 (14:19 -0400)]
*: Convert thread_add_XXX functions to event_add_XXX

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Rename `struct thread` to `struct event`
Donald Sharp [Tue, 1 Mar 2022 21:18:12 +0000 (16:18 -0500)]
*: Rename `struct thread` to `struct event`

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>
13 months ago*: Rename thread.[ch] to event.[ch]
Donald Sharp [Mon, 28 Feb 2022 15:40:31 +0000 (10:40 -0500)]
*: Rename thread.[ch] to event.[ch]

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>
13 months agoMerge pull request #13065 from rgirada/ospf_abr_summary
Donald Sharp [Thu, 23 Mar 2023 23:57:08 +0000 (19:57 -0400)]
Merge pull request #13065 from rgirada/ospf_abr_summary

13 months agomgmtd: Fix fd leak.
Loganaden Velvindron [Thu, 23 Mar 2023 19:07:06 +0000 (23:07 +0400)]
mgmtd: Fix fd leak.

Close fd before returning to avoid leaks.

Signed-off-by: Loganaden Velvindron <logan@cyberstorm.mu>
13 months agoospfd: Fix for memory leak issue in ospf related to flood_reduction tests.
Manoj Naragund [Thu, 23 Mar 2023 12:59:38 +0000 (05:59 -0700)]
ospfd: Fix for memory leak issue in ospf related to flood_reduction tests.

Problem:
Multiple memory leaks after pr12366

RCA:
ospf_lsa_unlock was not happening for the few of the LSAs in
ospf_lsa_refresh_walker after pr12366 due to which memory
related to lsas was leaking.

Fix:
Moved the ospf_lsa_unlock outside if check.

Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
13 months agoMerge pull request #13074 from donaldsharp/hash_clean_and_free
Donatas Abraitis [Thu, 23 Mar 2023 12:08:29 +0000 (14:08 +0200)]
Merge pull request #13074 from donaldsharp/hash_clean_and_free

*: Add a hash_clean_and_free() function

13 months agoMerge pull request #13078 from opensourcerouting/fix/set_distance_zero
Donald Sharp [Thu, 23 Mar 2023 11:50:35 +0000 (07:50 -0400)]
Merge pull request #13078 from opensourcerouting/fix/set_distance_zero

bgpd: Do not allow setting `set distance` via route-maps to zero

13 months agopimd: Fix use after free issue for ifp's moving vrfs
Donald Sharp [Wed, 22 Mar 2023 22:24:56 +0000 (18:24 -0400)]
pimd: Fix use after free issue for ifp's moving vrfs

We have this valgrind trace:

==1125== Invalid read of size 4
==1125==    at 0x170A7D: pim_if_delete (pim_iface.c:203)
==1125==    by 0x170C01: pim_if_terminate (pim_iface.c:80)
==1125==    by 0x174F34: pim_instance_terminate (pim_instance.c:68)
==1125==    by 0x17535B: pim_vrf_terminate (pim_instance.c:260)
==1125==    by 0x1941CF: pim_terminate (pimd.c:161)
==1125==    by 0x1B476D: pim_sigint (pim_signals.c:44)
==1125==    by 0x4910C22: frr_sigevent_process (sigevent.c:133)
==1125==    by 0x49220A4: thread_fetch (thread.c:1777)
==1125==    by 0x48DC8E2: frr_run (libfrr.c:1222)
==1125==    by 0x15E12A: main (pim_main.c:176)
==1125==  Address 0x6274d28 is 1,192 bytes inside a block of size 1,752 free'd
==1125==    at 0x48369AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1125==    by 0x174FF1: pim_vrf_delete (pim_instance.c:181)
==1125==    by 0x4925480: vrf_delete (vrf.c:264)
==1125==    by 0x4925480: vrf_delete (vrf.c:238)
==1125==    by 0x49332C7: zclient_vrf_delete (zclient.c:2187)
==1125==    by 0x4934319: zclient_read (zclient.c:4003)
==1125==    by 0x492249C: thread_call (thread.c:2008)
==1125==    by 0x48DC8D7: frr_run (libfrr.c:1223)
==1125==    by 0x15E12A: main (pim_main.c:176)
==1125==  Block was alloc'd at
==1125==    at 0x4837B65: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1125==    by 0x48E80AF: qcalloc (memory.c:116)
==1125==    by 0x1750DA: pim_instance_init (pim_instance.c:90)
==1125==    by 0x1750DA: pim_vrf_new (pim_instance.c:161)
==1125==    by 0x4924FDC: vrf_get (vrf.c:183)
==1125==    by 0x493334C: zclient_vrf_add (zclient.c:2157)
==1125==    by 0x4934319: zclient_read (zclient.c:4003)
==1125==    by 0x492249C: thread_call (thread.c:2008)
==1125==    by 0x48DC8D7: frr_run (libfrr.c:1223)
==1125==    by 0x15E12A: main (pim_main.c:176)

and you do this series of events:

a) Create a vrf, put an interface in it
b) Turn on pim on that interface and turn on pim in that vrf
c) Delete the vrf
d) Do anything with the interface, in this case shutdown the system

The move of the interface to a new vrf is leaving the pim_ifp->pim pointer pointing
at the old pim instance, which was just deleted, so the instance pointer was freed.

Let's clean up the pim pointer in the interface pointer as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #13059 from FRRouting/dev/mgmtd
Jafar Al-Gharaibeh [Wed, 22 Mar 2023 17:37:14 +0000 (12:37 -0500)]
Merge pull request #13059 from FRRouting/dev/mgmtd

Introduce the centralized management daemon

13 months agobgpd: Ensure suppress-fib-pending works with network statements
Donald Sharp [Wed, 22 Mar 2023 15:35:28 +0000 (11:35 -0400)]
bgpd: Ensure suppress-fib-pending works with network statements

The flag for telling BGP that a route is expected to be installed
first before notifying a peer was always being set upon receipt
of a path that could be accepted as bestpath.  This is not correct:
imagine that you have a peer sending you a route and you have a
network statement that covers the same route.  Irrelevant if the
network statement would win the flag on the dest was being set
in bgp_update.  Thus you could get into a situation where
the network statement path wins but since the flag is set on
the node, it will never be announced to a peer.

Let's just move the setting of the flag into bgp_zebra_announce
and _withdraw.  In _announce set the flag to TRUE when suppress-fib
is enabled.  In _withdraw just always unset the flag as that a withdrawal
does not need to wait for rib removal before announcing.  This will
cover the case when a network statement is added after the route has
been learned from a peer.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Set TCP_MD5 for outgoing connections when `password` is set
Donatas Abraitis [Wed, 22 Mar 2023 13:17:30 +0000 (15:17 +0200)]
bgpd: Set TCP_MD5 for outgoing connections when `password` is set

If configuring `neighbor password` under VRF (not default), the session
will never be established.

Before setting TCP_MD5 for the connection fd, we need to enable this on the
accept direction as well (listener).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agotests: Check if BGP peering with MD5 per-VRF works correctly
Donatas Abraitis [Wed, 22 Mar 2023 12:15:13 +0000 (14:15 +0200)]
tests: Check if BGP peering with MD5 per-VRF works correctly

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #13075 from donaldsharp/bgp_route_debugs
Donatas Abraitis [Wed, 22 Mar 2023 10:47:35 +0000 (12:47 +0200)]
Merge pull request #13075 from donaldsharp/bgp_route_debugs

bgpd: Add vrf name and peer name to some bgp debugs

13 months agoMerge pull request #13080 from chiragshah6/fdev2
Donatas Abraitis [Wed, 22 Mar 2023 07:23:10 +0000 (09:23 +0200)]
Merge pull request #13080 from chiragshah6/fdev2

zebra: add evpn isDetectionFreeze to json output

13 months agolib: mgmtd: fix build warnings (as error)
Christian Hopps [Mon, 20 Mar 2023 23:28:42 +0000 (19:28 -0400)]
lib: mgmtd: fix build warnings (as error)

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agotests: apply frrbot style requirements
Christian Hopps [Mon, 20 Mar 2023 19:12:56 +0000 (15:12 -0400)]
tests: apply frrbot style requirements

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agolib: staticd: vtysh: apply frrbot style requirements
Christian Hopps [Mon, 20 Mar 2023 19:07:44 +0000 (15:07 -0400)]
lib: staticd: vtysh: apply frrbot style requirements

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agolib, mgmtd: Add few fixes for commit-check and rollback
Pushpasis Sarkar [Tue, 14 Mar 2023 10:36:06 +0000 (03:36 -0700)]
lib, mgmtd: Add few fixes for commit-check and rollback

This commit contains fixes for the following issues found
- 'mgmt commit check' issued through 'vtysh -f' was actually commtting the changeset.
- On config validation failure backend, mgmtd was not passing the correct error-reason
  to frontend.
- 'mgmt rollback ...' was reverting the change on backend, but config on mgmtd daemon
  remains intact

Signed-off-by: Pushpasis Sarkar <pushpasis@gmail.com>
13 months agomgmtd: lib: utilize msglib constructed from the removed code
Christian Hopps [Wed, 8 Mar 2023 22:11:43 +0000 (17:11 -0500)]
mgmtd: lib: utilize msglib constructed from the removed code

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agolib: new message library for mgmtd client and adapters
Christian Hopps [Wed, 8 Mar 2023 22:11:00 +0000 (17:11 -0500)]
lib: new message library for mgmtd client and adapters

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agostaticd: handle `distance` value
Christian Hopps [Tue, 28 Feb 2023 04:57:17 +0000 (23:57 -0500)]
staticd: handle `distance` value

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agotests: Add topotests for MGMT daemon
nguggarigoud [Fri, 29 Oct 2021 11:14:33 +0000 (04:14 -0700)]
tests: Add topotests for MGMT daemon

1. MGMT daemon support in topotests.
2. Sanity tests for MGMTd.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
13 months agozebra: add evpn isDetectionFreeze to json output
Sindhu Parvathi Gopinathan [Sat, 18 Mar 2023 18:48:34 +0000 (11:48 -0700)]
zebra: add evpn isDetectionFreeze to json output

Added "isDetectionFreeze" for show evpn json output to identify the
default and freeze permanent config.

Before fix:-
```
tor-2(config)# router bgp 65561
tor-2(config-router)# address-family l2vpn evpn
  <cr>
tor-2(config-router)# address-family l2vpn evpn
tor-2(config-router-af)# dup-addr-detection freeze permanent

tor-2(config-router-af)# do show evpn
L2 VNIs: 21
L3 VNIs: 5
Advertise gateway mac-ip: No
Advertise svi mac-ip: No
Advertise svi mac: No
Duplicate address detection: Enable
  Detection max-moves 5, time 180
  Detection freeze permanent
EVPN MH:
  mac-holdtime: 1080s, neigh-holdtime: 1080s
  startup-delay: 180s, start-delay-timer: --:--:--
  uplink-cfg-cnt: 0, uplink-active-cnt: 0
tor-2(config-router-af)#

tor-2(config-router-af)# do show evpn json
{
  "advertiseGatewayMacip":"No",
  "advertiseSviMacip":"No",
  "advertiseSviMac":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0,
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"--:--:--",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0
}
tor-2(config-router-af)#
```

After fix:-
```
cumulus@tor-1:mgmt:~$ sudo vtysh -c "show evpn json"
{
  "advertiseGatewayMacip":"No",
  "advertiseSviMacip":"No",
  "advertiseSviMac":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0,  ==> default case , i.e dad_freeze duration is 0
  "isDetectionFreeze":false, ==> default case, i.e. dad_freeze disabled
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"--:--:--",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0
}
cumulus@tor-1:mgmt:~$

tor-1(config-router-af)# dup-addr-detection freeze permanent
tor-1(config-router-af)# do show evpn json
{
  "advertiseGatewayMacip":"No",
  "advertiseSviMacip":"No",
  "advertiseSviMac":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0, ==> dad_freeze with duration permanent
  "isDetectionFreeze":true, ==> dad_freeze enabled
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"00:00:08",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0,
  "protodownReasons":[
    "startupDelay"
  ]
}
tor-1(config-router-af)#

tor-1(config-router-af)# dup-addr-detection freeze 400
tor-1(config-router-af)#
tor-1(config-router-af)# do show evpn json
{
  "advertiseGatewayMacip":"No",
  "advertiseSviMacip":"No",
  "advertiseSviMac":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":400, ==> dad_freeze duration with numeric value
  "isDetectionFreeze":true, ==> dad_freeze enabled
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"00:00:47",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0,
  "protodownReasons":[
    "startupDelay"
  ]
}

tor-1(config-router-af)# no dup-addr-detection freeze permanent
tor-1(config-router-af)# do show evpn json
{
  "advertiseGatewayMacip":"No",
  "advertiseSviMacip":"No",
  "advertiseSviMac":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0, ==> no dad_freeze duration
  "isDetectionFreeze":false, ==> no dad_freeze enabled
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"--:--:--",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0
}
tor-1(config-router-af)#

```

Ticket:#3404283

Issue:3404283

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
13 months agodoc: Add documentation for MGMT daemon
Pushpasis Sarkar [Fri, 29 Oct 2021 17:22:42 +0000 (10:22 -0700)]
doc: Add documentation for MGMT daemon

This commit adds user documentation for the new MGMT daemon and
new FRR Management Framework.

Co-authored-by: Yash Ranjan <ranjany@vmware.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Pushpasis Sarkar <pushpasis@gmail.com>
13 months agomgmtd: Enroll Staticd as a backend client for MGMTD
Christian Hopps [Tue, 28 Feb 2023 09:08:41 +0000 (04:08 -0500)]
mgmtd: Enroll Staticd as a backend client for MGMTD

This commmit introduces Staticd as a backend client for the MGMTd
framework. All the static commands will be diverted to the MGMT
daemon and will use the transactional model to make changes to the
internal state. Similar mechanism can be used by other daemons to use
the MGMT framework in the future.

This commit includes the following functionalities in the changeset:
1. Diverts all the staticd (config only) commands to MGMTd.
2. Enrolls staticd as a backend client to use the MGMT framework.
3. Modify the staticd NB config handlers so that they can be compiled
   into a library and loaded in the MGMTd process context.

Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
13 months agomgmtd: nb library for client front-end code
Christian Hopps [Tue, 28 Feb 2023 03:00:32 +0000 (22:00 -0500)]
mgmtd: nb library for client front-end code

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agomgmtd: Add MGMT Transaction Framework
Yash Ranjan [Thu, 28 Oct 2021 07:07:11 +0000 (00:07 -0700)]
mgmtd: Add MGMT Transaction Framework

This commit introduces the MGMT Transaction framework that takes
management requests from one (or more) frontend client sessions,
translates them into transactions and drives them to completion
in co-oridination with one (or more) backend client daemons
involved in the request.

This commit includes the following functionalities in the changeset:
1. Introduces the actual Transaction module. Commands added related to
   transaction are:
   a. show mgmt transaction all
2. Adds support for commit rollback feature which stores upto the 10
   commit buffers. Each commit has a commit-id which can be used to
   rollback to the exact configuration state.
   Commands supported for this feature are:
   a. show mgmt commit-history
   b. mgmt rollback commit-id COMMIT_ID
3. Add hidden commands to enable record various performance metrics:
   a. mgmt performance-measurement
   b. mgmt reset-statistic

Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
13 months agomgmtd: Add MGMT Backend Interface Framework
Christian Hopps [Tue, 28 Feb 2023 15:00:19 +0000 (10:00 -0500)]
mgmtd: Add MGMT Backend Interface Framework

This commit introduces the MGMT Backend Interface which can be used
by back-end management client daemons like BGPd, Staticd, Zebra to
connect with new FRR Management daemon (MGMTd) and utilize the new
FRR Management Framework to let any Frontend clients to retrieve any
operational data or manipulate any configuration data owned by the
individual Backend daemon component.

This commit includes the following functionalities in the changeset:
1. Add new Backend server for Backend daemons connect to.
2. Add a C-based Backend client library which can be used by daemons
   to communicate with MGMTd via the Backend interface.
3. Maintain a backend adapter for each connection from an appropriate
   Backend client to facilitate client requests and track one or more
   transactions initiated from Frontend client sessions that involves
   the backend client component.
4. Add the following commands to inspect various Backend client
   related information
a. show mgmt backend-adapter all
b. show mgmt backend-yang-xpath-registry
        c. show mgmt yang-xpath-subscription

Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
13 months agomgmtd: Add MGMT Frontend Interface Framework
Christian Hopps [Wed, 8 Mar 2023 22:26:38 +0000 (17:26 -0500)]
mgmtd: Add MGMT Frontend Interface Framework

This commit introduces the Frontend Interface which can be used
by front-end management clients like Netconf server, Restconf
Server and CLI to interact with new FRR Management daemon (MGMTd)
to access and sometimes modify FRR management data.

This commit includes the following functionalities in the changeset:
1. Add new Frontend server for clients connect to.
2. Add a C-based Frontend client library which can be used by Frontend
   clients to communicate with MGMTd via the Frontend interface.
3. Maintain a frontend adapter for each connection from an appropriate
   Frontend client to facilitate client requests and track one or more
   client sessions across it.
4. Define the protobuf message format for messages to be exchanged
   between MGMTd Frontend module and the Frontend client.
5. This changeset also introduces an instance of MGMT Frontend client
   embedded within the lib/vty module that can be leveraged by any FRR
   daemon to connect to MGMTd's Frontend interface. The same has been
   integrated with and initialized within the MGMTd daemon's process
   context to implement a bunch of 'set-config', 'commit-apply',
   'get-config' and 'get-data' commands via VTYSH

Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
13 months agomgmtd: Bringup MGMTD daemon and datastore module support
Christian Hopps [Wed, 8 Mar 2023 22:22:09 +0000 (17:22 -0500)]
mgmtd: Bringup MGMTD daemon and datastore module support

Features added in this commit:
1. Bringup/shutdown new management daemon 'mgmtd' along with FRR.
2. Support for Startup, Candidate and Running DBs.
3. Lock/Unlock DS feature using pthread lock.
4. Load config from a JSON file onto candidate DS.
5. Save config to a JSON file from running/candidate DS.
6. Dump candidate or running DS contents on the terminal or a file in
   JSON/XML format.
7. Maintaining commit history (Full rollback support to be added in
   future commits).
8. Addition of debug commands.

Co-authored-by: Yash Ranjan <ranjany@vmware.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Pushpasis Sarkar <pushpasis@gmail.com>
13 months agobgpd: Do not allow setting `set distance` via route-maps to zero
Donatas Abraitis [Tue, 21 Mar 2023 20:08:16 +0000 (22:08 +0200)]
bgpd: Do not allow setting `set distance` via route-maps to zero

It's not allowed to install routes with zero distance, let's disallow this
for route-maps as well.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #13073 from donaldsharp/static_use_after_free
Rafael Zalamena [Tue, 21 Mar 2023 19:37:06 +0000 (16:37 -0300)]
Merge pull request #13073 from donaldsharp/static_use_after_free

staticd: Tell bfd that we are shutting down

13 months agobgpd: Add vrf name and peer name to some bgp debugs
Donald Sharp [Tue, 21 Mar 2023 19:06:00 +0000 (15:06 -0400)]
bgpd: Add vrf name and peer name to some bgp debugs

Some debugs were especially hard to figure out in bgp_route.c

a) If using a %p pointer to print the bgp_path_info this
is pretty useless.  Print where it came from instead
b) Use A.B.C.D/M(VRFNAME) when outputing the prefix

Just basically give more useful information.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #12997 from opensourcerouting/fix/free_duped_bgp_stuff_for_aggregate
Russ White [Tue, 21 Mar 2023 14:27:19 +0000 (10:27 -0400)]
Merge pull request #12997 from opensourcerouting/fix/free_duped_bgp_stuff_for_aggregate

bgpd: Free dup'ed attributes for aggregate routes with route-maps

13 months agoMerge pull request #12968 from pguibert6WIND/asn_aggregator_counter_prop
Russ White [Tue, 21 Mar 2023 14:12:01 +0000 (10:12 -0400)]
Merge pull request #12968 from pguibert6WIND/asn_aggregator_counter_prop

yang: Fix "aggregator-asn" to support asdot

13 months agostaticd: Tell bfd that we are shutting down
Donald Sharp [Tue, 21 Mar 2023 12:55:35 +0000 (08:55 -0400)]
staticd: Tell bfd that we are shutting down

Prevent a use after free and tell the bfd subsystem
we are shutting down in staticd.

./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460:==2264460==ERROR: AddressSanitizer: heap-use-after-free on address 0x61f000004698 at pc 0x7f65d1eb11b2 bp 0x7ffdbface490 sp 0x7ffdbface488
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-READ of size 4 at 0x61f000004698 thread T0
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #0 0x7f65d1eb11b1 in zclient_bfd_command lib/bfd.c:307
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #1 0x7f65d1eb20f5 in _bfd_sess_send lib/bfd.c:507
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #2 0x7f65d20510aa in thread_call lib/thread.c:1989
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #3 0x7f65d2051f0a in _thread_execute lib/thread.c:2081
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #4 0x7f65d1eb271b in _bfd_sess_remove lib/bfd.c:544
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #5 0x7f65d1eb278d in bfd_sess_free lib/bfd.c:553
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #6 0x7f65d1eb5400 in bfd_protocol_integration_finish lib/bfd.c:1029
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #7 0x7f65d1f42f77 in hook_call_frr_fini lib/libfrr.c:41
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #8 0x7f65d1f494a1 in frr_fini lib/libfrr.c:1199
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #9 0x563b7abefd76 in sigint staticd/static_main.c:70
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #10 0x7f65d200ef91 in frr_sigevent_process lib/sigevent.c:115
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #11 0x7f65d204fac6 in thread_fetch lib/thread.c:1758
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #12 0x7f65d1f49377 in frr_run lib/libfrr.c:1184
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #13 0x563b7abefed1 in main staticd/static_main.c:160
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #14 0x7f65d1b92d09 in __libc_start_main ../csu/libc-start.c:308
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #15 0x563b7abefa99 in _start (/usr/lib/frr/staticd+0x15a99)
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months ago*: Add a hash_clean_and_free() function
Donald Sharp [Tue, 21 Mar 2023 12:54:21 +0000 (08:54 -0400)]
*: Add a hash_clean_and_free() function

Add a hash_clean_and_free() function as well as convert
the code to use it.  This function also takes a double
pointer to the hash to set it NULL.  Also it cleanly
does nothing if the pointer is NULL( as a bunch of
code tested for ).

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #12816 from gpnaveen/stc_rte_err_msg
Donatas Abraitis [Tue, 21 Mar 2023 11:30:08 +0000 (13:30 +0200)]
Merge pull request #12816 from gpnaveen/stc_rte_err_msg

tests: Enhance error msgs for static route automation.

13 months agoMerge pull request #13062 from Pdoijode/evpn-use-after-free-fix
Donatas Abraitis [Tue, 21 Mar 2023 11:04:25 +0000 (13:04 +0200)]
Merge pull request #13062 from Pdoijode/evpn-use-after-free-fix

zebra: Fix for heap-use-after-free in EVPN

13 months agoMerge pull request #13031 from opensourcerouting/ospf-show-database
Donald Sharp [Tue, 21 Mar 2023 11:03:05 +0000 (07:03 -0400)]
Merge pull request #13031 from opensourcerouting/ospf-show-database

ospfd: Improve the "show ip ospf database" command

13 months agoMerge pull request #13061 from donaldsharp/bfd_use_after_free
Donatas Abraitis [Tue, 21 Mar 2023 06:59:45 +0000 (08:59 +0200)]
Merge pull request #13061 from donaldsharp/bfd_use_after_free

lib: on bfd peer shutdown actually stop event

13 months agoMerge pull request #13064 from chiragshah6/fdev1
Donatas Abraitis [Tue, 21 Mar 2023 06:58:51 +0000 (08:58 +0200)]
Merge pull request #13064 from chiragshah6/fdev1

lib: fix clear route-map command

13 months agoMerge pull request #13063 from qlyoung/update-docker-build-info
Donatas Abraitis [Tue, 21 Mar 2023 06:56:20 +0000 (08:56 +0200)]
Merge pull request #13063 from qlyoung/update-docker-build-info

doc: add release instructions for docker images

13 months agoospfd: Fixing Summary origination after range configuration
rgirada [Mon, 20 Mar 2023 11:22:26 +0000 (11:22 +0000)]
ospfd: Fixing Summary origination after range configuration

Description:
After area range config, summary lsas are aggerated to configured
route but later it was being flushed instead of the actual summary
lsa. This was seen when prefix-id of the aggregated route is same
as one of the actual summary route.
Here, aggregated summary lsa need to be returned to set the flag
SUMMARY_APPROVE after originating aggregated summary lsa but its not.
Which is being cleaned up as part of unapproved summary cleanup.
Corrected this now.

Issue: #13028

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
13 months agolib:fix clear route-map cmd using DEFPY
Sindhu Parvathi Gopinathan [Mon, 20 Mar 2023 12:15:03 +0000 (05:15 -0700)]
lib:fix clear route-map cmd using DEFPY

Due to the wrong input argv id, "argv[idx_word]->arg"
fetched in-correctly and it clears all the route-maps instead of
specific one.

Now correct argv id is passed to clear the given route-map counters.

Also, use RMAP_NAME which allows to show list of configured
route-maps in the system.

After Fix:-

Ticket:#3407773
Issue:3407773

Testing: UT done

Before:
TORC11# clear route-map counters
  <cr>
  WORD  route-map name

After:

TORC11# clear route-map counters
  <cr>
  RMAP_NAME  route-map name
     my-as

Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
13 months agodoc: add release instructions for docker images
Quentin Young [Mon, 20 Mar 2023 20:54:20 +0000 (16:54 -0400)]
doc: add release instructions for docker images

Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
13 months agoMerge pull request #12688 from dorDiogo/isis_hello_padding_sometimes
Russ White [Mon, 20 Mar 2023 21:00:57 +0000 (17:00 -0400)]
Merge pull request #12688 from dorDiogo/isis_hello_padding_sometimes

isisd: Add support for IS-IS hello padding during-adjacency-formation