]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 years agoMerge pull request #13192 from anlancs/fix/ripd-wrong-routemap
Russ White [Tue, 4 Apr 2023 13:50:02 +0000 (09:50 -0400)]
Merge pull request #13192 from anlancs/fix/ripd-wrong-routemap

ripd: Fix malformed route-map

2 years agoMerge pull request #13199 from pguibert6WIND/isis_ipv4_linklocal
Russ White [Tue, 4 Apr 2023 13:48:11 +0000 (09:48 -0400)]
Merge pull request #13199 from pguibert6WIND/isis_ipv4_linklocal

isisd: consider link local ipv4 addresses as valid

2 years agoMerge pull request #13131 from LabNConsulting/chopps/no-startup-file
Jafar Al-Gharaibeh [Tue, 4 Apr 2023 13:42:04 +0000 (08:42 -0500)]
Merge pull request #13131 from LabNConsulting/chopps/no-startup-file

mgmtd: remove startup config feature for now

2 years agoMerge pull request #12969 from opensourcerouting/ospfd-nssa
Russ White [Tue, 4 Apr 2023 13:38:55 +0000 (09:38 -0400)]
Merge pull request #12969 from opensourcerouting/ospfd-nssa

ospfd: implement NSSA default routes & ranges

2 years agoMerge pull request #12837 from donaldsharp/unlikely_routemap
Russ White [Tue, 4 Apr 2023 12:20:25 +0000 (08:20 -0400)]
Merge pull request #12837 from donaldsharp/unlikely_routemap

Unlikely routemap

2 years agoMerge pull request #13198 from mxyns/bmp-fix-peerup-port
Donatas Abraitis [Tue, 4 Apr 2023 07:49:09 +0000 (10:49 +0300)]
Merge pull request #13198 from mxyns/bmp-fix-peerup-port

bgpd: bmp fix peer-up ports byte order

2 years agoMerge pull request #13181 from taspelund/route_origin_extcom_parse_fix
Donatas Abraitis [Tue, 4 Apr 2023 07:24:44 +0000 (10:24 +0300)]
Merge pull request #13181 from taspelund/route_origin_extcom_parse_fix

bgpd: fix ecommunity parsing for AS4

2 years agoisisd: consider link local ipv4 addresses as valid 13199/head
Philippe Guibert [Mon, 3 Apr 2023 16:06:48 +0000 (18:06 +0200)]
isisd: consider link local ipv4 addresses as valid

It is not possible to create an adjacency by using interface
addresses within the `169.254.0.0/24` pool.

When forging the IIH messages, the interface addresses from
that pool are not appended:

> Neither IPv4 nor IPv6 considered usable. Ignoring IIH

Using this network pool is possible on other IS-IS
implementations. Let us authorize to use such network
addresses.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agoMerge pull request #13191 from opensourcerouting/fix/add_missing_rfc9384
Jafar Al-Gharaibeh [Tue, 4 Apr 2023 04:16:08 +0000 (23:16 -0500)]
Merge pull request #13191 from opensourcerouting/fix/add_missing_rfc9384

doc: Add missing rfc9384 to BGP supported RFC list

2 years agotests: add test to validate 4-byte ecomm parsing 13181/head
Trey Aspelund [Mon, 3 Apr 2023 21:03:40 +0000 (21:03 +0000)]
tests: add test to validate 4-byte ecomm parsing

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agobgpd: fix ecommunity parsing for AS4
Trey Aspelund [Fri, 31 Mar 2023 21:46:21 +0000 (17:46 -0400)]
bgpd: fix ecommunity parsing for AS4

The parser for extended communities was incorrectly disallowing an
operator from configuring "Route Origin" extended communities
(e.g. RD/RT/SoO) with a 4-byte value matching BGP_AS4_MAX (UINT32_MAX)
and allowed the user to overflow UINT32_MAX. This updates the parser to
read the value as a uint64_t so that we can do proper checks on the
upper bounds (> BGP_AS4_MAX || errno).

before:
```
TORC11(config-router-af)# neighbor uplink-1 soo 4294967296:65
TORC11(config-router-af)# do sh run | include soo
  neighbor uplink-1 soo 0:65
TORC11(config-router-af)# neighbor uplink-1 soo 4294967295:65
% Malformed SoO extended community
TORC11(config-router-af)#
```

after:
```
TORC11(config-router-af)# neighbor uplink-1 soo 4294967296:65
% Malformed SoO extended community
TORC11(config-router-af)# neighbor uplink-1 soo 4294967295:65
TORC11(config-router-af)# do sh run | include soo
  neighbor uplink-1 soo 4294967295:65
TORC11(config-router-af)#
```

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agobgpd: bmp fix peer-up ports byte order 13198/head
Maxence Younsi [Mon, 3 Apr 2023 15:19:32 +0000 (17:19 +0200)]
bgpd: bmp fix peer-up ports byte order

added htons to ports in the peer-up message to fix byte order

Signed-off-by: Maxence Younsi <mx.yns@outlook.fr>
2 years agoripd: Fix malformed route-map 13192/head
anlan_cs [Sun, 2 Apr 2023 00:33:25 +0000 (08:33 +0800)]
ripd: Fix malformed route-map

Currently the process of the `route-map` configuration for `per-vrf-rip`
is wrong.

There are two problems:
1. `ctx->name` for `if_rmap_ctx`  is not initialized in `if_rmap_ctx_create()`.
2.  The global `if_rmap_ctx_list` is wrongly used for `per-vrf-rip`.

So, two changes for it:
1. Correctly initializes `ctx->name`.
2. Use specific `if_rmap_ctx` for `per-vrf-rip`, not global one.

Note, this related implementation for `route-map` is only for `ripd`.

Before:
```
anlan(config)# route rip vrf vrf1
anlan(config-router)# route-map aa in lan
anlan(config-router)# do show run
!
router rip
 route-map aa in lan
exit
!
```

After:
```
anlan(config)# route rip vrf vrf1
anlan(config-router)# route-map aa in lan
anlan(config-router)# do show run
!
router rip vrf vrf1
 route-map aa in lan
exit
!
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #13182 from taspelund/add_bgp_json_comments
Donatas Abraitis [Sun, 2 Apr 2023 17:33:56 +0000 (20:33 +0300)]
Merge pull request #13182 from taspelund/add_bgp_json_comments

bgpd: add comments for 'json detail' show cmd code

2 years agoMerge pull request #13179 from donaldsharp/array_size
Christian Hopps [Sat, 1 Apr 2023 23:21:41 +0000 (08:21 +0900)]
Merge pull request #13179 from donaldsharp/array_size

isisd, zebra: Use array_size instead of ARRAY_SIZE

2 years agoMerge pull request #13175 from donaldsharp/msdp_topo1_memleak
Jafar Al-Gharaibeh [Sat, 1 Apr 2023 23:13:58 +0000 (18:13 -0500)]
Merge pull request #13175 from donaldsharp/msdp_topo1_memleak

zebra: Cleanup ctx leak on shutdown and turn off event

2 years agomgmtd: lib: read transitioned daemons split config files in mgmtd 13131/head
Christian Hopps [Fri, 31 Mar 2023 16:34:49 +0000 (16:34 +0000)]
mgmtd: lib: read transitioned daemons split config files in mgmtd

When daemons transition to mgmtd they should stop reading their split config
files, and let mgmtd do that, otherwise things can get out of sync.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agodoc: Add missing rfc9384 to BGP supported RFC list 13191/head
Donatas Abraitis [Sat, 1 Apr 2023 18:56:37 +0000 (21:56 +0300)]
doc: Add missing rfc9384 to BGP supported RFC list

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #13171 from manojvn/13154_fix
Donald Sharp [Sat, 1 Apr 2023 13:18:10 +0000 (09:18 -0400)]
Merge pull request #13171 from manojvn/13154_fix

mgmtd: Fix for issue 13154.

2 years agobgpd: add comments for 'json detail' show cmd code 13182/head
Trey Aspelund [Fri, 31 Mar 2023 22:34:48 +0000 (22:34 +0000)]
bgpd: add comments for 'json detail' show cmd code

The json structure changes used for 'json detail' show commands are not
very straightforward and might require code analysis to understand.
This addscommentary to the flow to explain the change in structure.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agotests: add OSPF NSSA topotest 12969/head
Renato Westphal [Thu, 2 Mar 2023 22:38:52 +0000 (19:38 -0300)]
tests: add OSPF NSSA topotest

At this point OSPF NSSA deserves a dedicated topotest given the
latest nerd knobs that were added :)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospfd: add support for NSSA Type-7 address ranges
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: add support for NSSA Type-7 address ranges

Implement NSSA address ranges as specified by RFC 3101:

   NSSA border routers may be configured with Type-7 address ranges.
   Each Type-7 address range is defined as an [address,mask] pair.  Many
   separate Type-7 networks may fall into a single Type-7 address range,
   just as a subnetted network is composed of many separate subnets.
   NSSA border routers may aggregate Type-7 routes by advertising a
   single Type-5 LSA for each Type-7 address range.  The Type-5 LSA
   resulting from a Type-7 address range match will be distributed to
   all Type-5 capable areas.

Syntax:
  area A.B.C.D nssa range A.B.C.D/M [<not-advertise|cost (0-16777215)>]

Example:
  router ospf
   router-id 1.1.1.1
   area 1 nssa
   area 1 nssa range 172.16.0.0/16
   area 1 nssa range 10.1.0.0/16
  !

Since regular area ranges and NSSA ranges have a lot in common,
this commit reuses the existing infrastructure for area ranges as
much as possible to avoid code duplication.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospfd: do not install blackhole routes for ranges with "not-advertise"
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: do not install blackhole routes for ranges with "not-advertise"

Adding blackhole routes is unnecessary in that case.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospfd: refactor range commands
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: refactor range commands

* Update the "range" helpers to accept an area pointer instead of
  an area ID;
* Always call ospf_area_display_format_set() after every "range"
  command to ensure consistency.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospfd: use the ospf_area_range_active() helper function more consistently
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: use the ospf_area_range_active() helper function more consistently

A small change to improve code readability.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospfd: remove duplicated code
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: remove duplicated code

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospfd: implement Type-7 default routes for NSSA areas
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: implement Type-7 default routes for NSSA areas

Add the "default-information-originate" option to the "area X nssa"
command. That option allows the origination of Type-7 default routes
on NSSA ABRs and ASBRs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospfd: refactor the "area nssa" command using DEFPY
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: refactor the "area nssa" command using DEFPY

Combine all variation of the "area nssa" command into a single
DEFPY to improve code maintainability.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoMerge pull request #12454 from donaldsharp/bgp_getc
Donatas Abraitis [Fri, 31 Mar 2023 21:23:12 +0000 (00:23 +0300)]
Merge pull request #12454 from donaldsharp/bgp_getc

bgpd: Ensure stream received has enough data

2 years agoMerge pull request #13139 from ribarroetavena/master
Donatas Abraitis [Fri, 31 Mar 2023 20:44:00 +0000 (23:44 +0300)]
Merge pull request #13139 from ribarroetavena/master

bgpd: trim long neighbor description with no whitespace

2 years agomgmtd: remove startup config feature for now
Christian Hopps [Tue, 28 Mar 2023 17:08:01 +0000 (13:08 -0400)]
mgmtd: remove startup config feature for now

The startup config and how it interacts with explicit commits,
commit databases and implicit commits needs to be worked out
in design first. For now remove the offending code.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agotests: when verifying a route is missing use expected=False
Christian Hopps [Fri, 31 Mar 2023 16:39:11 +0000 (16:39 +0000)]
tests: when verifying a route is missing use expected=False

Prior to this the full retry cycle was run with a "passing" negative
result each time through

Previous runtime ~5 minutes
New runtime ~20 seconds.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoisisd, zebra: Use array_size instead of ARRAY_SIZE 13179/head
Donald Sharp [Fri, 31 Mar 2023 17:58:47 +0000 (13:58 -0400)]
isisd, zebra: Use array_size instead of ARRAY_SIZE

Use the FRR provided array_size.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Cleanup ctx leak on shutdown and turn off event 13175/head
Donald Sharp [Fri, 31 Mar 2023 13:08:23 +0000 (09:08 -0400)]
zebra: Cleanup ctx leak on shutdown and turn off event

two things:

On shutdown cleanup any events associated with the update walker.
Also do not allow new events to be created.

Fixes this mem-leak:

./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790:Direct leak of 8 byte(s) in 1 object(s) allocated from:
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #0 0x7f0dd0b08037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #1 0x7f0dd06c19f9 in qcalloc lib/memory.c:105
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #2 0x55b42fb605bc in rib_update_ctx_init zebra/zebra_rib.c:4383
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #3 0x55b42fb6088f in rib_update zebra/zebra_rib.c:4421
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #4 0x55b42fa00344 in netlink_link_change zebra/if_netlink.c:2221
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #5 0x55b42fa24622 in netlink_information_fetch zebra/kernel_netlink.c:399
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #6 0x55b42fa28c02 in netlink_parse_info zebra/kernel_netlink.c:1183
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #7 0x55b42fa24951 in kernel_read zebra/kernel_netlink.c:493
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #8 0x7f0dd0797f0c in event_call lib/event.c:1995
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #9 0x7f0dd0684fd9 in frr_run lib/libfrr.c:1185
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #10 0x55b42fa30caa in main zebra/main.c:465
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #11 0x7f0dd01b5d09 in __libc_start_main ../csu/libc-start.c:308
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-SUMMARY: AddressSanitizer: 8 byte(s) leaked in 1 allocation(s).

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #13155 from opensourcerouting/fix/bgp_addpath_labeled_unicast_topotest
Donald Sharp [Fri, 31 Mar 2023 11:55:23 +0000 (07:55 -0400)]
Merge pull request #13155 from opensourcerouting/fix/bgp_addpath_labeled_unicast_topotest

tests: Check received routes count for labeled-unicast with addpath

2 years agoMerge pull request #13017 from SaiGomathiN/12744
Donald Sharp [Fri, 31 Mar 2023 11:50:20 +0000 (07:50 -0400)]
Merge pull request #13017 from SaiGomathiN/12744

pim6d: Do not use interfaces with ifindex as 0

2 years agoMerge pull request #13161 from Orange-OpenSource/isis_te
Donald Sharp [Fri, 31 Mar 2023 11:48:26 +0000 (07:48 -0400)]
Merge pull request #13161 from Orange-OpenSource/isis_te

isisd: Correction of subnets creation in the TED

2 years agoMerge pull request #13164 from LabNConsulting/bad-file-bad
Mark Stapp [Fri, 31 Mar 2023 11:15:28 +0000 (07:15 -0400)]
Merge pull request #13164 from LabNConsulting/bad-file-bad

mgmtd: remove errant git added file

2 years agomgmtd: Fix for issue 13154. 13171/head
Manoj Naragund [Fri, 31 Mar 2023 10:47:17 +0000 (03:47 -0700)]
mgmtd: Fix for issue 13154.

The changes involve adding show debuggin command for MGMTd which resolves
command incomplete issue.

issue #13154

Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
2 years agoMerge pull request #13148 from samanvithab/bgp_mem_leak_fix
Donatas Abraitis [Fri, 31 Mar 2023 06:25:44 +0000 (09:25 +0300)]
Merge pull request #13148 from samanvithab/bgp_mem_leak_fix

bgpd : memory leak fix for aggregate-address on cleanup

2 years agoMerge pull request #13153 from jeclarke/dump_buf_size
Donatas Abraitis [Fri, 31 Mar 2023 06:24:30 +0000 (09:24 +0300)]
Merge pull request #13153 from jeclarke/dump_buf_size

bgpd: increase buffer size used for dumping BGP to MRT files

2 years agoMerge pull request #13082 from inspurSDN/bugfix_zebra_crash_rebooting
Jafar Al-Gharaibeh [Fri, 31 Mar 2023 05:17:19 +0000 (00:17 -0500)]
Merge pull request #13082 from inspurSDN/bugfix_zebra_crash_rebooting

zebra: move vrf deleting handle to zebra final state handle

2 years agoMerge pull request #13060 from opensourcerouting/feature/allow_peering_with_127.0.0.1
Jafar Al-Gharaibeh [Fri, 31 Mar 2023 05:14:27 +0000 (00:14 -0500)]
Merge pull request #13060 from opensourcerouting/feature/allow_peering_with_127.0.0.1

bgpd: Allow peering via 127.0.0.0/8

2 years agoMerge pull request #13142 from donaldsharp/cleanup_debugs
Jafar Al-Gharaibeh [Fri, 31 Mar 2023 05:09:55 +0000 (00:09 -0500)]
Merge pull request #13142 from donaldsharp/cleanup_debugs

tests: Turn off debug logging

2 years agomgmtd: remove errant git added file 13164/head
Christian Hopps [Fri, 31 Mar 2023 00:16:23 +0000 (00:16 +0000)]
mgmtd: remove errant git added file

fixes #13156

Signed-off-by: Christian Hopps <chopps@gmail.com>
2 years agosharpd: Adjust TED builder 13161/head
Olivier Dugeon [Thu, 30 Mar 2023 16:15:57 +0000 (18:15 +0200)]
sharpd: Adjust TED builder

Following correction of IS-IS subnet creation, this patch adjust the way the
TED is created in sharpd to automatically adjust subnet deletion.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2 years agoisisd: Correction of subnets creation in the TED
Olivier Dugeon [Thu, 30 Mar 2023 15:53:33 +0000 (17:53 +0200)]
isisd: Correction of subnets creation in the TED

Subnets may be incorrectly created in the IS-IS Traffic Engineering Database
(TED). Indeed, to be usable, the subnets advertised by IS-IS peers must be
adjusted to avoid misinterpretation. For example, consider R1 which is
connected to R2 with IP addresses 10.0.0.1/24 (R1) and 10.0.0.2/24 (R2).
R1 and R2 will advertize the prefix 10.0.0.0/24. By leaving the subnet with the
prefix 10.0.0.0/24 in the TED, it is not possible to determine whether
10.0.0.1 is attached to R1 or R2 or whether 10.0.0.3 exists.

So to avoid this, the subnet prefixes are adjusted with the IP addresses of the
local interface. But IS-IS can start to advertise the subnet when not all
adjacencies are up, especially when IPv4 and IPv6 are configured on the same
interface. This results in an uncorrected prefix, e.g. 10.0.0.0/24, remaining
in the TED when it should be removed.

This problem affects some isis-related tests such as the CSPF test.

This patch fixes this bug by removing the uncorrected prefix before adding the
the corrected version.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2 years agobgpd: Trim long neighbor description with no whitespace 13139/head
rbarroetavena [Thu, 23 Mar 2023 19:19:48 +0000 (16:19 -0300)]
bgpd: Trim long neighbor description with no whitespace

Fix for missing neighbor description in "show bgp summary [wide]"
when its length exceeds 20[64] chars and it doesn't contain
withespaces.
Existing behavior remains if description contains whitespaces
before size limit.

Signed-off-by: rbarroetavena <rbarroetavena@gmail.com>
2 years agotests: Check received routes count for labeled-unicast with addpath 13155/head
Donatas Abraitis [Thu, 30 Mar 2023 13:50:15 +0000 (16:50 +0300)]
tests: Check received routes count for labeled-unicast with addpath

Test failed time to time, let's try this way:

```
$ for x in $(seq 1 20); do cp test_bgp_labeled_unicast_addpath.py test_$x.py; done
$ sudo pytest -s -n 20
```

Ran 10 times using this pattern, no failure :shrug:

Before this change, we checked advertised routes, and at some point `=` was
missing from the output, but advertised correctly. Receiving router gets as
much routes as expected to receive.

I reversed checking received routes, not advertised.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #13004 from donaldsharp/vtysh_fork
Jafar Al-Gharaibeh [Thu, 30 Mar 2023 13:44:18 +0000 (08:44 -0500)]
Merge pull request #13004 from donaldsharp/vtysh_fork

Vtysh fork

2 years agobgpd: increase buffer size used for dumping BGP to MRT files 13153/head
jeclarke [Thu, 30 Mar 2023 13:23:48 +0000 (14:23 +0100)]
bgpd: increase buffer size used for dumping BGP to MRT files

Signed-off-by: James Clarke (jamclar2) <jamclar2@cisco.com>
2 years agobgpd : aggregate-address memory leak fix 13148/head
Samanvitha B Bhargav [Thu, 30 Mar 2023 05:35:44 +0000 (22:35 -0700)]
bgpd : aggregate-address memory leak fix

Memory leaks are observed in the cleanup code. When â€œno router bgp" is executed,
cleanup in that flow for aggregate-address command is not taken care.

fixes the below leak:
    --
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444:Direct leak of 152 byte(s) in 1 object(s) allocated from:
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #0 0x7f163e911037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #1 0x7f163e4b9259 in qcalloc lib/memory.c:105
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #2 0x562bf42ebbd5 in bgp_aggregate_new bgpd/bgp_route.c:7239
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #3 0x562bf42f14e8 in bgp_aggregate_set bgpd/bgp_route.c:8421
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #4 0x562bf42f1e55 in aggregate_addressv6_magic bgpd/bgp_route.c:8592
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #5 0x562bf42be3f5 in aggregate_addressv6 bgpd/bgp_route_clippy.c:341
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #6 0x7f163e3f1e1b in cmd_execute_command_real lib/command.c:988
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #7 0x7f163e3f219c in cmd_execute_command lib/command.c:1048
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #8 0x7f163e3f2df4 in cmd_execute lib/command.c:1215
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #9 0x7f163e5a2d73 in vty_command lib/vty.c:544
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #10 0x7f163e5a79c8 in vty_execute lib/vty.c:1307
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #11 0x7f163e5ad299 in vtysh_read lib/vty.c:2216
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #12 0x7f163e593f16 in event_call lib/event.c:1995
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #13 0x7f163e47c839 in frr_run lib/libfrr.c:1185
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #14 0x562bf414e58d in main bgpd/bgp_main.c:505
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #15 0x7f163de66d09 in __libc_start_main ../csu/libc-start.c:308
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444:Direct leak of 152 byte(s) in 1 object(s) allocated from:
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #0 0x7f163e911037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #1 0x7f163e4b9259 in qcalloc lib/memory.c:105
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #2 0x562bf42ebbd5 in bgp_aggregate_new bgpd/bgp_route.c:7239
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #3 0x562bf42f14e8 in bgp_aggregate_set bgpd/bgp_route.c:8421
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #4 0x562bf42f1cde in aggregate_addressv4_magic bgpd/bgp_route.c:8543
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #5 0x562bf42bd258 in aggregate_addressv4 bgpd/bgp_route_clippy.c:255
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #6 0x7f163e3f1e1b in cmd_execute_command_real lib/command.c:988
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #7 0x7f163e3f219c in cmd_execute_command lib/command.c:1048
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #8 0x7f163e3f2df4 in cmd_execute lib/command.c:1215
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #9 0x7f163e5a2d73 in vty_command lib/vty.c:544
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #10 0x7f163e5a79c8 in vty_execute lib/vty.c:1307
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #11 0x7f163e5ad299 in vtysh_read lib/vty.c:2216
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #12 0x7f163e593f16 in event_call lib/event.c:1995
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #13 0x7f163e47c839 in frr_run lib/libfrr.c:1185
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #14 0x562bf414e58d in main bgpd/bgp_main.c:505
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #15 0x7f163de66d09 in __libc_start_main ../csu/libc-start.c:308
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-SUMMARY: AddressSanitizer: 304 byte(s) leaked in 2 allocation(s).

Signed-off-by: Samanvitha B Bhargav <bsamanvitha@vmware.com>
2 years agoMerge pull request #12916 from donaldsharp/clang_15_warnings
mobash-rasool [Thu, 30 Mar 2023 03:11:40 +0000 (08:41 +0530)]
Merge pull request #12916 from donaldsharp/clang_15_warnings

freebsd 14, clang 15

2 years agoMerge pull request #13133 from isabelladeleon12/add_drop_counter
Donald Sharp [Thu, 30 Mar 2023 00:30:00 +0000 (20:30 -0400)]
Merge pull request #13133 from isabelladeleon12/add_drop_counter

isisd: Add PDU drop counter to "show isis summary"

2 years agoMerge pull request #13146 from opensourcerouting/fix/drop_double_soft_reconfig_in
Donald Sharp [Thu, 30 Mar 2023 00:13:43 +0000 (20:13 -0400)]
Merge pull request #13146 from opensourcerouting/fix/drop_double_soft_reconfig_in

bgpd: Do not call bgp_soft_reconfig_in() twice in a row on policy change

2 years agotests: Turn off debug logging 13142/head
Donald Sharp [Wed, 29 Mar 2023 18:03:28 +0000 (14:03 -0400)]
tests: Turn off debug logging

Tests are taking up too much space, turn off debug logging
for normal runs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Do not call bgp_soft_reconfig_in() twice in a row on policy change 13146/head
Donatas Abraitis [Wed, 29 Mar 2023 20:21:35 +0000 (23:21 +0300)]
bgpd: Do not call bgp_soft_reconfig_in() twice in a row on policy change

Just realized it was a stupid copy/paste.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12645 from gpnaveen/ospf_error_msg_enhancements
Russ White [Wed, 29 Mar 2023 15:05:30 +0000 (11:05 -0400)]
Merge pull request #12645 from gpnaveen/ospf_error_msg_enhancements

tests: [topojson] Update assert/error messages for ospf scripts

2 years agobgpd: Ensure stream received has enough data 12454/head
Donald Sharp [Tue, 6 Dec 2022 15:23:11 +0000 (10:23 -0500)]
bgpd: Ensure stream received has enough data

BGP_PREFIX_SID_SRV6_L3_SERVICE attributes must not
fully trust the length value specified in the nlri.
Always ensure that the amount of data we need to read
can be fullfilled.

Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #13124 from opensourcerouting/fix/unsupress_map_delay_timer
Donald Sharp [Wed, 29 Mar 2023 11:51:31 +0000 (07:51 -0400)]
Merge pull request #13124 from opensourcerouting/fix/unsupress_map_delay_timer

bgpd: Do not announce routes immediatelly on prefix/distribute/filter changes

2 years 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

2 years 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

2 years agoisisd: Add PDU drop counter to "show isis summary" 13133/head
Isabella de Leon [Tue, 28 Mar 2023 23:18:59 +0000 (16:18 -0700)]
isisd: Add PDU drop counter to "show isis summary"

Adding a new drop counters section to "show isis summary".

New output:

Drop counters per PDU type:
  P2P IIH: <count>
  L2 LSP: <count>
  L2 CSNP: <count>
  L2 PSNP: <count>
  ...

Before:
r1# show isis summary
vrf             : default
Process Id      : 972
System Id       : 0000.0000.0001
Up time         : 00:00:48 ago
Number of areas : 1
Area TE:
  Net: 49.0000.0000.0000.0001.00
  TX counters per PDU type:
    P2P IIH: 36
     L2 LSP: 8
    L2 CSNP: 12
    L2 PSNP: 11
  RX counters per PDU type:
    P2P IIH: 37
     L2 LSP: 17
    L2 CSNP: 12
    L2 PSNP: 6
Advertise high metrics: Disabled
...

After:
r1# show isis summary
vrf             : default
Process Id      : 972
System Id       : 0000.0000.0001
Up time         : 00:00:19 ago
Number of areas : 1
Area TE:
  Net: 49.0000.0000.0000.0001.00
  TX counters per PDU type:
    P2P IIH: 16
     L2 LSP: 2
    L2 CSNP: 4
    L2 PSNP: 6
   LSP RXMT: 0
  RX counters per PDU type:
    P2P IIH: 16
     L2 LSP: 5
    L2 CSNP: 4
    L2 PSNP: 2
  Drop counters per PDU type:
    P2P IIH: 2
  Advertise high metrics: Disabled
...

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2 years agozebra: Use zebra_vrf_lookup_by_id when we can 13132/head
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>
2 years 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

2 years agobgpd: Do not announce routes immediatelly on filter updates 13124/head
Donatas Abraitis [Tue, 28 Mar 2023 13:18:47 +0000 (16:18 +0300)]
bgpd: Do not announce routes immediatelly on filter updates

If we set `bgp route-map delay-timer X`, we should ignore starting to announce
routes immediately, and wait for delay timer to expire (or ignore at all if set
to zero).

f1aa49293a4a8302b70989aaa9ceb715385c3a7e broke this because we always sent
route refresh and on receiving BoRR before sending back EoRR.

Let's get fix this.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years 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()

2 years 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

2 years 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

2 years agovtysh: Exit with first received error code when forking 13004/head
Donald Sharp [Mon, 27 Feb 2023 23:28:59 +0000 (18:28 -0500)]
vtysh: Exit with first received error code when forking

vtysh -f forks.  Gather the return codes and report the first
failed return code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agovtysh: use fork() workflow for -f too
Quentin Young [Fri, 19 Nov 2021 21:03:02 +0000 (16:03 -0500)]
vtysh: use fork() workflow for -f too

It was being used for -b only; we should be able to use it for -f as
well.

This also merges the codepaths for -b and -f since they have no real
functional difference.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agovtysh: use daemon type and handle multi-instance types
Mark Stapp [Thu, 21 Oct 2021 13:21:35 +0000 (13:21 +0000)]
vtysh: use daemon type and handle multi-instance types

To handle multi-instance daemons (ospf, e.g.), each forked
vtysh handles all of the instances of a daemon type.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agovtysh, doc: add doc & help text for -t/--timestamp
Quentin Young [Wed, 15 Sep 2021 23:00:41 +0000 (19:00 -0400)]
vtysh, doc: add doc & help text for -t/--timestamp

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agovtysh: fork() on boot
Quentin Young [Tue, 14 Sep 2021 17:14:25 +0000 (13:14 -0400)]
vtysh: fork() on boot

When using -b flag to apply config to all running daemons, fork a copy
of vtysh for each daemon we need to configure instead of doing them one
at a time. This is about N times faster when you have N daemons.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
mergeme

2 years agolib: Remove getopt.c and getopt1.c 12916/head
Donald Sharp [Tue, 28 Feb 2023 18:26:10 +0000 (18:26 +0000)]
lib: Remove getopt.c and getopt1.c

Why do we need getopt code that is standard in everything
that we compile against?

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Remove set but unused variables
Donald Sharp [Tue, 28 Feb 2023 18:19:52 +0000 (18:19 +0000)]
bgpd: Remove set but unused variables

Found by clang 15.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Fix debug output for route-map names when using a unsuppress-map 13123/head
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>
2 years 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

2 years agoospfd: Fix for vitual-link crash in signal handler 13120/head
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>
2 years agobuild: clean up mgmtd lib protobuf make syntax 13119/head
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>
2 years agobgpd: Copy the password from the previous peer on peer_xfer_config() 13118/head
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>
2 years 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

2 years agomgmtd: Remove unnecessary asserts 13117/head
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>
2 years 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>
2 years 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

2 years agoldpd: changes for code maintainability 13113/head
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>
2 years agotests: [topojson] Update assert/error messages 12645/head
nguggarigoud [Tue, 17 Jan 2023 06:34:06 +0000 (22:34 -0800)]
tests: [topojson] Update assert/error messages

Few assert/error messages are updated for test
scripts for better debugging.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2 years 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

2 years 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

2 years 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

2 years agolib/clippy: bail out on newline inside string 13108/head
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>
2 years 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>
2 years 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

2 years agotools: Set correct directory of vtysh for frr-reload.py 13101/head
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>
2 years 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.

2 years 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

2 years agobgpd: Check 7 bytes for Long-lived Graceful-Restart capability 13100/head
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>
2 years 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

2 years agobgpd: Allow self next-hop if `bgp allow-martian-nexthop` is enabled 13060/head
Donatas Abraitis [Fri, 24 Mar 2023 12:38:47 +0000 (14:38 +0200)]
bgpd: Allow self next-hop if `bgp allow-martian-nexthop` is enabled

For instance, if we receive the routes from the peer with the next-hop as me,
but those routes shares the same network, we can fake the next-hop.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years 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.