]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 years agotopotests: ospfapi - enahnce test to cover explicit delete and 0 len opaque LSAs 12174/head
Lou Berger [Wed, 19 Oct 2022 13:07:02 +0000 (13:07 +0000)]
topotests: ospfapi - enahnce test to cover explicit delete and 0 len opaque LSAs

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 0b242b118fb8db6397d186f62d7f912abeb620ac)

2 years agoospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing
Lou Berger [Wed, 19 Oct 2022 11:52:30 +0000 (11:52 +0000)]
ospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 20d26a9e08aa2e104bef1e4dd0cb347c9a2ab912)

2 years agoospfd: allow for zero length opaque LSAs (which is permitted per RFC 5250)
Lou Berger [Wed, 19 Oct 2022 11:50:41 +0000 (11:50 +0000)]
ospfd: allow for zero length opaque LSAs (which is permitted per RFC 5250)

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 0b91fce78b0bcd601e1c9eff44dbac1e847038cc)

2 years agoMerge pull request #12132 from FRRouting/mergify/bp/stable/8.3/pr-12113
Donatas Abraitis [Fri, 14 Oct 2022 11:17:53 +0000 (14:17 +0300)]
Merge pull request #12132 from FRRouting/mergify/bp/stable/8.3/pr-12113

bgpd: Allow `network XXX` to work with bgp suppress-fib-pending (backport #12113)

2 years agobgpd: Allow `network XXX` to work with bgp suppress-fib-pending 12132/head
Donald Sharp [Wed, 12 Oct 2022 18:53:21 +0000 (14:53 -0400)]
bgpd: Allow `network XXX` to work with bgp suppress-fib-pending

When bgp is using `bgp suppress-fib-pending` and the end
operator is using network statements, bgp was not sending
the network'ed prefix'es to it's peers.  Fix this.

Also update the test cases for bgp_suppress_fib to test
this new corner case( I am sure that there are going to
be others that will need to be added ).

Fixes: #12112
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 4801fc4670020406fc609dedabc7482d88e3b656)

2 years agoMerge pull request #12120 from FRRouting/mergify/bp/stable/8.3/pr-12108
Donatas Abraitis [Thu, 13 Oct 2022 09:41:36 +0000 (12:41 +0300)]
Merge pull request #12120 from FRRouting/mergify/bp/stable/8.3/pr-12108

General mayhem (backport #12108)

2 years agozebra: Cleanup memory leaks on shutdown 12120/head
Donald Sharp [Tue, 11 Oct 2022 20:26:42 +0000 (16:26 -0400)]
zebra: Cleanup memory leaks on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 54fcc739b8a605c56540bc3ac478d1a15bf0a8c9)

2 years agoripngd: Cleanup memory allocations on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:21:44 +0000 (16:21 -0400)]
ripngd: Cleanup memory allocations on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit b1d29673ca16e558aea5d632da181555c83980cf)

2 years agoripd: Cleanup memory allocations on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:21:30 +0000 (16:21 -0400)]
ripd: Cleanup memory allocations on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 3d1588d8ed537e3dbf120e1b2a5ad5b3c00c7897)

2 years agozebra: zrouter.mh_info is leaked on shutdown
Donald Sharp [Tue, 11 Oct 2022 19:22:04 +0000 (15:22 -0400)]
zebra: zrouter.mh_info is leaked on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 823d80d15553ee15777242d3e6185d3dcf0cf04d)

2 years agolib: Free some memory in scripting subsystem at shutdown
Donald Sharp [Tue, 11 Oct 2022 17:21:03 +0000 (13:21 -0400)]
lib: Free some memory in scripting subsystem at shutdown

Pre:
staticd: showing active allocations in memory group libfrr
staticd: memstats:  Scripting                     :     16 * (variably sized)
staticd: memstats:  Hash                          :      2 * (variably sized)
staticd: memstats:  Hash Bucket                   :      8 *         32
staticd: memstats:  Hash Index                    :      1 * (variably sized)
staticd: memstats:  Link List                     :      1 *         40
staticd: memstats:  Link Node                     :      1 *         24
staticd: showing active allocations in memory group logging subsystem
staticd: memstats:  log file target               :      1 *         88
staticd: showing active allocations in memory group staticd

Post:
staticd: showing active allocations in memory group libfrr
staticd: showing active allocations in memory group logging subsystem
staticd: memstats:  log file target               :      1 *         88
staticd: showing active allocations in memory group staticd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit ca28a0f6faef1e0b547966fef49d6987903684b0)

2 years agostaticd: Clean up zclient on shutdown
Donald Sharp [Tue, 11 Oct 2022 16:57:57 +0000 (12:57 -0400)]
staticd: Clean up zclient on shutdown

The zclient data structure was not being cleaned up on shutdown.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 08040409cce0f64b9c78e34584b9b915b2620fb5)

2 years agoMerge pull request #12111 from FRRouting/mergify/bp/stable/8.3/pr-12105
Donatas Abraitis [Wed, 12 Oct 2022 20:16:53 +0000 (23:16 +0300)]
Merge pull request #12111 from FRRouting/mergify/bp/stable/8.3/pr-12105

tools: Handle sequence numbers for BGP community (large/ext) in frr-reload.py (backport #12105)

2 years agotools: Apply black formatting for frr-reload.py 12111/head
Donatas Abraitis [Tue, 11 Oct 2022 19:38:30 +0000 (22:38 +0300)]
tools: Apply black formatting for frr-reload.py

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 63f99a91c8371bb5e03d5dc59d4ec0f197aefc90)

2 years agotools: Handle sequence numbers for BGP community (large/ext) in frr-reload.py
Donatas Abraitis [Tue, 11 Oct 2022 19:36:26 +0000 (22:36 +0300)]
tools: Handle sequence numbers for BGP community (large/ext) in frr-reload.py

If we add/modify community/large/ext lists without sequence numbers, and
doing frr-reload.py, then rules with sequence numbers (show running-config
always adds sequence numbers) will be deleted and new ones will be re-added.

This could lead to blackholing for some time.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 8bcbee1999176a46cd82b80002e4111c2cdd5084)

2 years agoMerge pull request #12102 from FRRouting/mergify/bp/stable/8.3/pr-12087
Donatas Abraitis [Wed, 12 Oct 2022 11:03:04 +0000 (14:03 +0300)]
Merge pull request #12102 from FRRouting/mergify/bp/stable/8.3/pr-12087

bgpd: fix "no match rpki" in route-map (backport #12087)

2 years agoMerge pull request #12077 from FRRouting/mergify/bp/stable/8.3/pr-11656
Donatas Abraitis [Tue, 11 Oct 2022 15:00:40 +0000 (18:00 +0300)]
Merge pull request #12077 from FRRouting/mergify/bp/stable/8.3/pr-11656

Some memory (backport #11656)

2 years agobgpd: fix "no match rpki" in route-map 12102/head
Alexander Chernavin [Mon, 10 Oct 2022 13:17:54 +0000 (13:17 +0000)]
bgpd: fix "no match rpki" in route-map

With this fix, make "no match rpki" in a route-map actually remove the
node in the candidate configuration instead of creating it.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 87c3ed1bf82ae84eae6c9848b4c53de721671401)

2 years agobgpd: Make sure hdr length is at a minimum of what is expected 12077/head
Donald Sharp [Thu, 21 Jul 2022 12:11:58 +0000 (08:11 -0400)]
bgpd: Make sure hdr length is at a minimum of what is expected

Ensure that if the capability length specified is enough data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit ff6db1027f8f36df657ff2e5ea167773752537ed)

2 years agoisisd: Ensure rcap is freed in error case
Donald Sharp [Wed, 20 Jul 2022 20:49:09 +0000 (16:49 -0400)]
isisd: Ensure rcap is freed in error case

unpack_tlv_router_cap allocates memory that in the error
case is not being freed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 49efc80d342d8e8373c8af040580bd7940808730)

2 years agoospfclient: Ensure ospf_apiclient_lsa_originate cannot accidently write into stack
Donald Sharp [Wed, 20 Jul 2022 20:43:17 +0000 (16:43 -0400)]
ospfclient: Ensure ospf_apiclient_lsa_originate cannot accidently write into stack

Even though OSPF_MAX_LSA_SIZE is quite large and holds the upper bound
on what can be written into a lsa, let's add a small check to ensure
it is not possible to do a bad thing.

This wins one of the long standing bug awards.  2003!

Fixes: #11602
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit d2aeac38708d93fb028d6a53e6eea317f0c06d1b)

2 years agoMerge pull request #12093 from FRRouting/mergify/bp/stable/8.3/pr-12084
Donatas Abraitis [Tue, 11 Oct 2022 09:58:43 +0000 (12:58 +0300)]
Merge pull request #12093 from FRRouting/mergify/bp/stable/8.3/pr-12084

bgpd: fix display bgp large-community exact-match (backport #12084)

2 years agobgpd: fix display bgp large-community exact-match 12093/head
Your Name [Mon, 10 Oct 2022 10:51:27 +0000 (13:51 +0300)]
bgpd: fix display bgp large-community exact-match

Before patch:
frr# show bgp large-community 1:1:1 exact-match
% Large-community malformed

After patch:
frr# show bgp large-community 1:1:1 exact-match

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
(cherry picked from commit 1857760c1ed38250d6be0d92502f9dc816d4e4cc)

2 years agoMerge pull request #12079 from FRRouting/mergify/bp/stable/8.3/pr-12043
Donald Sharp [Fri, 7 Oct 2022 23:46:02 +0000 (19:46 -0400)]
Merge pull request #12079 from FRRouting/mergify/bp/stable/8.3/pr-12043

Bgp hate (backport #12043)

2 years agobgpd: Ensure FRR has enough data to read 2 bytes in bgp_open_option_parse 12079/head
Donald Sharp [Fri, 30 Sep 2022 12:57:43 +0000 (08:57 -0400)]
bgpd: Ensure FRR has enough data to read 2 bytes in bgp_open_option_parse

In bgp_open_option_parse the code is checking that the
stream has at least 2 bytes to read ( the opt_type and
the opt_length).  However if BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(peer)
is configured then FRR is reading 3 bytes.  Which is not good
since the packet could be badly formateed.  Ensure that
FRR has the appropriate data length to read the data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 1117baca3c592877a4d8a13ed6a1d9bd83977487)

2 years agobgpd: Ensure FRR has enough data to read 2 bytes in peek_for_as4_capability
Donald Sharp [Fri, 30 Sep 2022 12:51:45 +0000 (08:51 -0400)]
bgpd: Ensure FRR has enough data to read 2 bytes in peek_for_as4_capability

In peek_for_as4_capability the code is checking that the
stream has at least 2 bytes to read ( the opt_type and the
opt_length ).  However if BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(peer)
is configured then FRR is reading 3 bytes.  Which is not good
since the packet could be badly formated.  Ensure that
FRR has the appropriate data length to read the data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 3e46b43e3788f0f87bae56a86b54d412b4710286)

2 years agoMerge pull request #12033 from FRRouting/mergify/bp/stable/8.3/pr-12006
Donald Sharp [Wed, 28 Sep 2022 12:28:05 +0000 (08:28 -0400)]
Merge pull request #12033 from FRRouting/mergify/bp/stable/8.3/pr-12006

doc: Add `neighbor PEER extended-optional-parameters` command (backport #12006)

2 years agoMerge pull request #11978 from opensourcerouting/fix/docker_alpine_apk_8.3
Jafar Al-Gharaibeh [Tue, 27 Sep 2022 15:32:44 +0000 (10:32 -0500)]
Merge pull request #11978 from opensourcerouting/fix/docker_alpine_apk_8.3

docker: [8.3] Keep and copy .apk files after they are built

2 years agodoc: Add `neighbor PEER extended-optional-parameters` command 12033/head
Donatas Abraitis [Sun, 25 Sep 2022 18:02:06 +0000 (21:02 +0300)]
doc: Add `neighbor PEER extended-optional-parameters` command

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 13111667513a0f91a8e875cdf12c940ea2b60b05)

2 years agodocker: Keep and copy .apk files after they are built 11978/head
Donatas Abraitis [Tue, 20 Sep 2022 20:23:55 +0000 (23:23 +0300)]
docker: Keep and copy .apk files after they are built

For debugging purposes and/or to distribute them somewhere else.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoFRRouting Release 8.3.1 docker/8.3.1 frr-8.3.1
Donatas Abraitis [Tue, 30 Aug 2022 17:53:45 +0000 (20:53 +0300)]
FRRouting Release 8.3.1

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11881 from FRRouting/mergify/bp/stable/8.3/pr-11866
Donatas Abraitis [Tue, 30 Aug 2022 17:36:05 +0000 (20:36 +0300)]
Merge pull request #11881 from FRRouting/mergify/bp/stable/8.3/pr-11866

zebra: fix missing vni transition (backport #11866)

2 years agoMerge pull request #11880 from FRRouting/mergify/bp/stable/8.3/pr-11870
Donatas Abraitis [Tue, 30 Aug 2022 15:51:42 +0000 (18:51 +0300)]
Merge pull request #11880 from FRRouting/mergify/bp/stable/8.3/pr-11870

ospfd: crash when router acts as GR helper upon a topo change (backport #11870)

2 years agozebra: fix missing vni transition 11881/head
anlan_cs [Fri, 26 Aug 2022 10:53:03 +0000 (06:53 -0400)]
zebra: fix missing vni transition

`show evpn vni detail` doesn't reflect any change in vni transition.
Need to add processing in command of `[no] vni (1-16777215)`.

With the config:
```
!
vni 66
!
vrf vrf1
 vni 88
 exit-vrf
!
```

Before:
```
(config-vrf)# no vni 88
(config-vrf)# do show evpn vni detail
VNI: 66
  Type: L3
  Tenant VRF: default
  L2 VNIs: <- Empty
```

After:
```
(config-vrf)# no vni 88
(config-vrf)# do show evpn vni detail
VNI: 66
  Type: L3
  Tenant VRF: default
  L2 VNIs: 88 <-
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
(cherry picked from commit df78d91d8aab3bdb5b7fc8db6c451aa1d9be7b78)

2 years agoospfd: crash when router acts as GR helper upon a topo change 11880/head
rgirada [Mon, 29 Aug 2022 10:51:39 +0000 (03:51 -0700)]
ospfd: crash when router acts as GR helper upon a topo change

Description:
ospf process is crashing when  the current router acts
as GR helper and it received a new lsa.

Here, ospf_lsa_different() is being called without checking
'old' pointer. It is asserted in ospf_lsa_different() api
if the 'old' pointer is NULL.

corrected this by validaing old pointer before calling
ospf_lsa_different() api.

back tarce:
Program terminated with signal SIGABRT, Aborted.
0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
[Current thread is 1 (Thread 0x6b84348827c0 (LWP 3155))]
0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1  0x00006b8433aa4801 in __GI_abort () at abort.c:79
2  0x00006b8433a9439a in __assert_fail_base (fmt=0x6b8433c1b7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x162ffc0630bc "l1", file=file@entry=0x162ffc062ff7 "ospfd/ospf_lsa.c", line=line@entry=3520, function=function@entry=0x162ffc0646f0 <__PRETTY_FUNCTION__.18732> "ospf_lsa_different") at assert.c:92
3  0x00006b8433a94412 in __GI___assert_fail (assertion=assertion@entry=0x162ffc0630bc "l1", file=file@entry=0x162ffc062ff7 "ospfd/ospf_lsa.c", line=line@entry=3520, function=function@entry=0x162ffc0646f0 <__PRETTY_FUNCTION__.18732> "ospf_lsa_different") at assert.c:101
4  0x0000162ffc008c25 in ospf_lsa_different (l1=l1@entry=0x0, l2=l2@entry=0x162ffe535c60, ignore_rcvd_flag=ignore_rcvd_flag@entry=true) at ospfd/ospf_lsa.c:3520
5  0x0000162ffc00a8e8 in ospf_lsa_install (ospf=ospf@entry=0x162ffe513650, oi=oi@entry=0x162ffe531c30, lsa=lsa@entry=0x162ffe535c60) at ospfd/ospf_lsa.c:2892
6  0x0000162ffc059d16 in ospf_flood (ospf=0x162ffe513650, nbr=nbr@entry=0x162ffe52cc90, current=current@entry=0x0, new=new@entry=0x162ffe535c60) at ospfd/ospf_flood.c:429
7  0x0000162ffc01838f in ospf_ls_upd (size=<optimized out>, oi=0x162ffe531c30, s=<optimized out>, ospfh=<optimized out>, iph=<optimized out>, ospf=<optimized out>) at ospfd/ospf_packet.c:2162
8  ospf_read_helper (ospf=<optimized out>) at ospfd/ospf_packet.c:3241
9  ospf_read (thread=<optimized out>) at ospfd/ospf_packet.c:3272
10 0x00006b843450139c in thread_call (thread=thread@entry=0x7780f42c7480) at lib/thread.c:1692
11 0x00006b84344cfb18 in frr_run (master=0x162ffe34d130) at lib/libfrr.c:1068

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
(cherry picked from commit ef151af79b90aaa0b9637e0280e0a9d1eb408523)

2 years agoMerge pull request #11876 from opensourcerouting/fix/backport_4cc5d80965f7be32cc481ed...
Donald Sharp [Tue, 30 Aug 2022 11:54:42 +0000 (07:54 -0400)]
Merge pull request #11876 from opensourcerouting/fix/backport_4cc5d80965f7be32cc481ed4e1df18c6a67dbae9_8.3

pimd, pim6d: deleting the memory malloced for json.

2 years agopimd, pim6d: deleting the memory malloced for json. 11876/head
Abhishek N R [Mon, 29 Aug 2022 11:50:26 +0000 (04:50 -0700)]
pimd, pim6d: deleting the memory malloced for json.

Problem Statement:
=================
2022-08-18 04:57:32,376 - ERROR: Found memory leak in daemon pimd
2022-08-18 04:57:32,377 - ERROR: ==12100== 18,978 (144 direct, 18,834 indirect) bytes in 2 blocks are definitely lost in loss record 45 of 45
2022-08-18 04:57:32,377 - ERROR: ==12100==    at 0x4C31FAC: calloc (vg_replace_malloc.c:762)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x532F51F: json_object_new_object (in /lib/x86_64-linux-gnu/libjson-c.so.3.0.1)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x128B5C: pim_show_interfaces (pim_cmd_common.c:3395)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x15A86B: show_ip_pim_interface_magic (pim_cmd.c:3127)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x15A86B: show_ip_pim_interface (pim_cmd_clippy.c:324)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x4E672B2: cmd_execute_command_real.isra.2 (command.c:1005)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x4E696FE: cmd_execute_command (command.c:1064)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x4E698F1: cmd_execute (command.c:1227)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x4EBC814: vty_command (vty.c:530)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x4EBC9EF: vty_execute (vty.c:1295)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x4EBF1F7: vtysh_read (vty.c:2142)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x4EB739B: thread_call (thread.c:1692)
2022-08-18 04:57:32,377 - ERROR: ==12100==    by 0x4E85B17: frr_run (libfrr.c:1068)
2022-08-18 04:57:32,377 - ERROR: ==12100==

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agoMerge pull request #11873 from opensourcerouting/fix/backport_2bf9780b268d29161154e90...
Mark Stapp [Mon, 29 Aug 2022 15:46:09 +0000 (11:46 -0400)]
Merge pull request #11873 from opensourcerouting/fix/backport_2bf9780b268d29161154e90af3fd6929298eef7e_8.3

bgpd: Do not print new line for EVPN CLI outputs if it's a JSON

2 years agobgpd: Do not print new line for EVPN CLI outputs if it's a JSON 11873/head
Donatas Abraitis [Thu, 25 Aug 2022 10:15:27 +0000 (13:15 +0300)]
bgpd: Do not print new line for EVPN CLI outputs if it's a JSON

Before:

```
$ vtysh -c 'show bgp l2vpn evpn route detail json'
<<<<<<<<<<<<<<<<<<<< empty line
<<<<<<<<<<<<<<<<<<<< empty line
<<<<<<<<<<<<<<<<<<<< empty line
<<<<<<<<<<<<<<<<<<<< empty line
{
...
"numPrefix":4,
"numPaths":4 <<<<< four paths = four empty lines
}
```

Contain as much "empty lines" before the JSON string as the number
of paths displayed.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11794 from opensourcerouting/fix/backport_zebra_crash_8.3
Donald Sharp [Sat, 13 Aug 2022 00:28:46 +0000 (20:28 -0400)]
Merge pull request #11794 from opensourcerouting/fix/backport_zebra_crash_8.3

zebra: Fix crash in shutdown w/ pw thread still running

2 years agozebra: Fix crash in shutdown w/ pw thread still running 11794/head
Donald Sharp [Thu, 11 Aug 2022 18:59:17 +0000 (14:59 -0400)]
zebra: Fix crash in shutdown w/ pw thread still running

I am seeing the zebra_pw_install_retry timer thread crashing
on shutdown

The shutdown of the timer is only in an
if () {
   ...
} else if

Let's just always shut it down.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11788 from opensourcerouting/fix/backport_cond_advertisements
Jafar Al-Gharaibeh [Fri, 12 Aug 2022 05:23:47 +0000 (00:23 -0500)]
Merge pull request #11788 from opensourcerouting/fix/backport_cond_advertisements

bgpd: [8.3] conditional advertisements fixes (backports)

2 years agobgpd: rename update_type enum values 11788/head
Quentin Young [Fri, 11 Jun 2021 23:00:15 +0000 (19:00 -0400)]
bgpd: rename update_type enum values

These values were named WITHDRAW and UPDATE. Yeah, you guessed it, those
are already #define's elsewhere (bgp_debug.h). Hilarity ensues.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agobgpd: don't adv conditionally withdrawn routes
Quentin Young [Fri, 11 Jun 2021 23:01:42 +0000 (19:01 -0400)]
bgpd: don't adv conditionally withdrawn routes

If we have conditional advertisement enabled, and conditionally withdrew
some prefixes, and then we do a 'clear bgp', those routes were getting
advertised again, and then withdrawn the next time the conditional
advertisement scanner executed.

When we go to advertise check the prefix against the conditional
advertisement status so we don't do that.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agobgpd: apply cond-adv policy to update group
Quentin Young [Tue, 15 Jun 2021 23:49:19 +0000 (19:49 -0400)]
bgpd: apply cond-adv policy to update group

The new outbound filter to apply conditional advertisement policy was
not working properly due to complications with update groups. The two
routemaps were properly copied into the update group peer filter but not
the conditional advertisement state.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agoMerge pull request #11779 from FRRouting/mergify/bp/stable/8.3/pr-11776
Donald Sharp [Wed, 10 Aug 2022 21:44:27 +0000 (17:44 -0400)]
Merge pull request #11779 from FRRouting/mergify/bp/stable/8.3/pr-11776

vtysh: Handle SIGTSTP (C-z) without exiting the vty shell (backport #11776)

2 years agovtysh: Handle SIGTSTP (C-z) without exiting the vty shell 11779/head
Donatas Abraitis [Wed, 10 Aug 2022 10:43:11 +0000 (13:43 +0300)]
vtysh: Handle SIGTSTP (C-z) without exiting the vty shell

After 4c92dd90d3d15cff640de063ff14eec950402d25 switching to poll-based I/O,
vtysh prompt exits on C-z signal.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 149a3fffe0d713e4c78edd908f4ebf3fd99cb397)

2 years agoMerge pull request #11748 from FRRouting/mergify/bp/stable/8.3/pr-11705
Donatas Abraitis [Fri, 5 Aug 2022 10:13:29 +0000 (13:13 +0300)]
Merge pull request #11748 from FRRouting/mergify/bp/stable/8.3/pr-11705

pimd: fix static mroute to also take into account the input interface (backport #11705)

2 years agopimd: fix static mroute to also take into account the input interface 11748/head
Jafar Al-Gharaibeh [Thu, 28 Jul 2022 20:38:50 +0000 (15:38 -0500)]
pimd: fix static mroute to also take into account the input interface

Allow the same group/source route to be configured on more than one interface.
Currently FRR doesn't allow adding the same mroute on different input interfaces.

Current behavior, if we have the following config:

```
interface eth1
   ip mroute eth0 239.0.0.1

interface eth2
   ip mroute eth0 239.0.0.1
```

Only one multicast route will be installed with an input interface of the last
interface configured.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
(cherry picked from commit 90937e420c9a02f61dfb43ce426b573186b2e591)

2 years agoMerge pull request #11743 from FRRouting/mergify/bp/stable/8.3/pr-11742
Donald Sharp [Thu, 4 Aug 2022 11:18:25 +0000 (07:18 -0400)]
Merge pull request #11743 from FRRouting/mergify/bp/stable/8.3/pr-11742

bgpd: fix show bgp l2vpn evpn route rd crashes (backport #11742)

2 years agoMerge pull request #11735 from FRRouting/mergify/bp/stable/8.3/pr-11713
Donatas Abraitis [Thu, 4 Aug 2022 07:37:32 +0000 (10:37 +0300)]
Merge pull request #11735 from FRRouting/mergify/bp/stable/8.3/pr-11713

zebra: fix bond down for evpn-mh (backport #11713)

2 years agobgpd: fix show bgp l2vpn evpn route rd crashes 11743/head
Trey Aspelund [Thu, 4 Aug 2022 01:43:31 +0000 (01:43 +0000)]
bgpd: fix show bgp l2vpn evpn route rd crashes

bgpd was crashing every time `show bgp l2vpn evpn route rd` was issued
with an RD that didn't match "all".  This was introduced by 9b01d289883
which changed how argv_find() is handled in various vtysh commands, but
the new changes forgot a "!".  So let's re-add the "!".

Before:
```
ub20# show bgp l2vpn evpn route rd 399672:100
vtysh: error reading from bgpd: Resource temporarily unavailable (11)Warning: closing connection to bgpd because of an I/O error!
ub20#

ub20# show bgp l2vpn evpn route rd 399672:100 mac 11:11:11:11:11:11
vtysh: error reading from bgpd: Resource temporarily unavailable (11)Warning: closing connection to bgpd because of an I/O error!
ub20#
```

After:
```
ub20# show bgp l2vpn evpn route rd 399672:100
ub20#

ub20# show bgp l2vpn evpn route rd 399672:100 mac 11:11:11:11:11:11
% Network not in table
ub20#
```

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
(cherry picked from commit 8923315db481f2a9f45e76405480edb339738677)

2 years agoMerge pull request #11728 from FRRouting/mergify/bp/stable/8.3/pr-11703
Donald Sharp [Wed, 3 Aug 2022 14:30:34 +0000 (10:30 -0400)]
Merge pull request #11728 from FRRouting/mergify/bp/stable/8.3/pr-11703

isisd: Prevent leak of global_ipv6_addrs (backport #11703)

2 years agozebra: fix bond down for evpn-mh 11735/head
anlan_cs [Mon, 1 Aug 2022 07:30:07 +0000 (03:30 -0400)]
zebra: fix bond down for evpn-mh

The test case is with `redirect-off` in evpn multi-homing environment:
```
evpn mh redirect-off
```

After the environment is setup, do the following steps:
1) Let one member of ES learn one mac:
```
2e:52:bb:bb:2f:46 dev ae1 vlan 100 master bridge0 static
```
Now everything is ok and the mac can be synced to other ES peers.

2) Shutdown bond1. At this time, zebra will get three netlink messages,
not one as current code expected. Like:
```
e4:f0:04:89:b6:46 dev vxlan10030 vlan 30 master bridge0 static <-A
e4:f0:04:89:b6:46 dev vxlan10030 nhid 536870913 self extern_learn <-B
e4:f0:04:89:b6:46 dev vxlan10030 vlan 30 self <-C
```

With A), zebra will wrongly remove this mac again:
```
ZEBRA: dpAdd remote MAC e4:f0:04:89:b6:46 VID 30
ZEBRA: Add/update remote MAC e4:f0:04:89:b6:46 intf vxlan10030(26) VNI 10030 flags 0xa01 - del local
ZEBRA: Send MACIP Del f None  MAC e4:f0:04:89:b6:46 IP (null) seq 0 L2-VNI 10030 ESI - to bgp
```

With C), zebra will wrongly add this mac again:
```
ZEBRA: Rx RTM_NEWNEIGH AF_BRIDGE IF 26 VLAN 30 st 0x2 fl 0x2 MAC e4:f0:04:89:b6:46 nhg 0
ZEBRA: dpAdd remote MAC e4:f0:04:89:b6:46 VID 30
```

zebra should skip the two messages with `vid`. Otherwise, it will send many
*wrong* messages to bgpd, and the logic is wrong.

`nhg/dst` is in 2nd message without `vid`, it is useful to call
`zebra_evpn_add_update_local_mac()`. But it will fail with "could not find EVPN"
warning for no `vid`, can't call `zebra_evpn_add_update_local_mac()`:
With B):
```
ZEBRA: Rx RTM_NEWNEIGH AF_BRIDGE IF 26 st 0x2 fl 0x12 MAC e4:f0:04:89:b6:46 nhg 536870913
ZEBRA: dpAdd local-nw-MAC e4:f0:04:89:b6:46 VID 0
ZEBRA:         Add/Update MAC e4:f0:04:89:b6:46 intf ae1(18) VID 0, could not find EVPN
```
Here, we can get `vid` from vxlan interface instead of from netlink message.

In summary, `zebra_vxlan_dp_network_mac_add()` will process the three messages
wrongly expecting only one messsage, so its logic is wrong. Just skip the two
unuseful messages with `vid`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
(cherry picked from commit df6c1982691df0f7a4712f1618fac2e15d076335)

2 years agoisisd: Prevent leak of global_ipv6_addrs 11728/head
Donald Sharp [Thu, 28 Jul 2022 16:21:24 +0000 (12:21 -0400)]
isisd: Prevent leak of global_ipv6_addrs

adj->global_ipv6_addrs was not being freed on deletion
of the adjacency.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 27383c1c8eee5069a012ce81c80c1c91084bf972)

2 years agoMerge pull request #11687 from opensourcerouting/fix/backport_62bf6b42000d0ecf8a92de0...
Donatas Abraitis [Wed, 27 Jul 2022 10:48:56 +0000 (13:48 +0300)]
Merge pull request #11687 from opensourcerouting/fix/backport_62bf6b42000d0ecf8a92de03797a3eebe9f48545_8.3

bgpd: Fixup pbr rule changes that were missed

2 years agobgpd: Fixup pbr rule changes that were missed 11687/head
Donald Sharp [Fri, 22 Jul 2022 18:49:06 +0000 (14:49 -0400)]
bgpd: Fixup pbr rule changes that were missed

In commit: d70a31a3ef2b60d978b336d5cc9ee5e1ec079dfc

the Zapi ZEBRA_RULE_ADD message was modified but
the bgp version was not updated appropriately and
when zebra received the message it did not properly
read it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11671 from FRRouting/mergify/bp/stable/8.3/pr-11661
Donald Sharp [Sun, 24 Jul 2022 12:07:49 +0000 (08:07 -0400)]
Merge pull request #11671 from FRRouting/mergify/bp/stable/8.3/pr-11661

bgpd: LL peers need bnc's per peer (backport #11661)

2 years agobgpd: LL peers need bnc's per peer 11671/head
Donald Sharp [Thu, 21 Jul 2022 19:42:51 +0000 (15:42 -0400)]
bgpd: LL peers need bnc's per peer

FRR should create a bnc per peer.  Not have
one's that write over others.  Currently when
FRR has multiple Interface based peering, BGP wa
creating a single BNC.  This is insufficient in that
we were accidently overwriting the one LL with other
data.  This causes issues when there are multiple and
there is weird starting issues with those interfaces
that you are peering over.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 35aae5c9bcf91703b74464d2b0dca6504bd37e39)

2 years agoMerge pull request #11664 from FRRouting/mergify/bp/stable/8.3/pr-11662
Donald Sharp [Fri, 22 Jul 2022 17:07:15 +0000 (13:07 -0400)]
Merge pull request #11664 from FRRouting/mergify/bp/stable/8.3/pr-11662

bgpd: Call a hook when as-path filter is replaced (backport #11662)

2 years agobgpd: Call a hook when as-path filter is replaced 11664/head
Donatas Abraitis [Fri, 22 Jul 2022 11:16:02 +0000 (14:16 +0300)]
bgpd: Call a hook when as-path filter is replaced

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit f709b31b88b76bf2c0e10eb2a2647bbfbd880ba3)

2 years agoMerge pull request #11659 from FRRouting/mergify/bp/stable/8.3/pr-11655
Jafar Al-Gharaibeh [Thu, 21 Jul 2022 23:13:37 +0000 (18:13 -0500)]
Merge pull request #11659 from FRRouting/mergify/bp/stable/8.3/pr-11655

vtysh: Ignore `end` when parsing frr.conf (backport #11655)

2 years agovtysh: Ignore `end` when parsing frr.conf 11659/head
Donatas Abraitis [Wed, 20 Jul 2022 19:57:33 +0000 (22:57 +0300)]
vtysh: Ignore `end` when parsing frr.conf

If we have `end` at the end of the frr.conf, then we never execute
XFRR_end_configuration command, and start/end markers do not work.

This leads to for example waiting BGP configuration parsing thread to hang,
and the peers are in shutdown state until the timer expires.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit ce2e1a0ed852a6d22385afba7ca44f9ec7f1454e)

2 years agoMerge pull request #11642 from FRRouting/mergify/bp/stable/8.3/pr-11635 docker/8.3.0 frr-8.3
Jafar Al-Gharaibeh [Mon, 18 Jul 2022 22:58:02 +0000 (17:58 -0500)]
Merge pull request #11642 from FRRouting/mergify/bp/stable/8.3/pr-11635

zebra: Cleanup the memory from the hash for MPLS stuff (backport #11635)

2 years agoMerge pull request #11640 from FRRouting/mergify/bp/stable/8.3/pr-11631
Jafar Al-Gharaibeh [Mon, 18 Jul 2022 19:19:34 +0000 (14:19 -0500)]
Merge pull request #11640 from FRRouting/mergify/bp/stable/8.3/pr-11631

ldpd: Check if the thread is scheduled before calling for remained time (backport #11631)

2 years agoMerge pull request #11639 from FRRouting/mergify/bp/stable/8.3/pr-11626
Jafar Al-Gharaibeh [Mon, 18 Jul 2022 19:19:19 +0000 (14:19 -0500)]
Merge pull request #11639 from FRRouting/mergify/bp/stable/8.3/pr-11626

zebra: Avoid buffer overflow using netlink_parse_rtattr_nested() (backport #11626)

2 years agoMerge pull request #11641 from FRRouting/mergify/bp/stable/8.3/pr-11627
Jafar Al-Gharaibeh [Mon, 18 Jul 2022 19:04:18 +0000 (14:04 -0500)]
Merge pull request #11641 from FRRouting/mergify/bp/stable/8.3/pr-11627

Update Alpine packaging foo + change docker images back over to Alpine-provided libyang (backport #11627)

2 years agozebra: Cleanup the memory from the hash for MPLS stuff 11642/head
Donatas Abraitis [Mon, 18 Jul 2022 11:26:29 +0000 (14:26 +0300)]
zebra: Cleanup the memory from the hash for MPLS stuff

==1595641== 280 (80 direct, 200 indirect) bytes in 1 blocks are definitely lost in loss record 30 of 38
==1595641== at 0x483AB65: calloc (vg_replace_malloc.c:760)
==1595641== by 0x493C89C: qcalloc (memory.c:116)
==1595641== by 0x1E8426: lsp_alloc (zebra_mpls.c:1116)
==1595641== by 0x49147F1: hash_get (hash.c:162)
==1595641== by 0x1EC880: mpls_lsp_install (zebra_mpls.c:3192)
==1595641== by 0x1C51BB: zread_vrf_label (zapi_msg.c:3197)
==1595641== by 0x1C6F11: zserv_handle_commands (zapi_msg.c:3863)
==1595641== by 0x24D0F4: zserv_process_messages (zserv.c:523)
==1595641== by 0x498F4CC: thread_call (thread.c:2002)
==1595641== by 0x49253A2: frr_run (libfrr.c:1198)
==1595641== by 0x1A28BA: main (main.c:475)
==1595641==
==1595641== 1,400 (400 direct, 1,000 indirect) bytes in 5 blocks are definitely lost in loss record 35 of 38
==1595641== at 0x483AB65: calloc (vg_replace_malloc.c:760)
==1595641== by 0x493C89C: qcalloc (memory.c:116)
==1595641== by 0x1E8426: lsp_alloc (zebra_mpls.c:1116)
==1595641== by 0x49147F1: hash_get (hash.c:162)
==1595641== by 0x1EBD7C: mpls_zapi_labels_process (zebra_mpls.c:2915)
==1595641== by 0x1C35D9: zread_mpls_labels_add (zapi_msg.c:2513)
==1595641== by 0x1C6F11: zserv_handle_commands (zapi_msg.c:3863)
==1595641== by 0x24D0F4: zserv_process_messages (zserv.c:523)
==1595641== by 0x498F4CC: thread_call (thread.c:2002)
==1595641== by 0x49253A2: frr_run (libfrr.c:1198)
==1595641== by 0x1A28BA: main (main.c:475)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 912b6a5b5c4351b5386dc267db46797f3ffc33d4)

2 years agodocker: use Alpine-provided libyang 11641/head
Quentin Young [Sun, 17 Jul 2022 23:10:45 +0000 (19:10 -0400)]
docker: use Alpine-provided libyang

looks like libyang(2) is back in the upstream alpine repos, so we can
use that instead

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
(cherry picked from commit 0bbc787cd3714d4e2521e969bf67b93462321c0f)

2 years agoalpine, docker: Update APKBUILD for libyang
Quentin Young [Sun, 17 Jul 2022 21:37:14 +0000 (17:37 -0400)]
alpine, docker: Update APKBUILD for libyang

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
(cherry picked from commit d782b117d0d00d7177b438c5ebdae7bd8f8b07b1)

2 years agoldpd: Check if the thread is scheduled before calling for remained time 11640/head
Donatas Abraitis [Mon, 18 Jul 2022 06:53:08 +0000 (09:53 +0300)]
ldpd: Check if the thread is scheduled before calling for remained time

LDPD crashes when hold time is configured to 65535:
(gdb) bt
0  0x00007f8c3fc224bb in raise () from /lib64/libpthread.so.0
1  0x00007f8c4138a3dd in core_handler () from /lib64/libfrr.so.0
2  <signal handler called>
3  0x00007f8c3fc1ccc0 in pthread_mutex_lock () from /lib64/libpthread.so.0
4  0x00007f8c4139914b in thread_timer_remain_msec () from /lib64/libfrr.so.0
5  0x00007f8c41399209 in thread_timer_remain_second () from /lib64/libfrr.so.0
6  0x000000000040eb19 in adj_to_ctl ()
7  0x0000000000427b38 in ldpe_nbr_ctl ()
8  0x000000000042fd68 in control_dispatch_imsg ()
9  0x00007f8c4139a628 in thread_call () from /lib64/libfrr.so.0
10 0x00000000004265fc in ldpe ()
11 0x000000000040a68f in main ()

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit f8e44af8c9160391a883510c49f99802dd07ced1)

2 years agozebra: Avoid buffer overflow using netlink_parse_rtattr_nested() 11639/head
Donatas Abraitis [Sun, 17 Jul 2022 19:31:48 +0000 (22:31 +0300)]
zebra: Avoid buffer overflow using netlink_parse_rtattr_nested()

memset(tb, 0, sizeof(struct rtattr *) * (max + 1)); in netlink_parse_rtattr()
seems a good candidate to buffer overflow.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit ce39ca16dd9ab7233e13171e08c35b2e1c196493)

2 years agoFRR Release 8.3
Jafar Al-Gharaibeh [Sun, 17 Jul 2022 04:27:53 +0000 (23:27 -0500)]
FRR Release 8.3

Changelog
---------

**General**
   - Add camelcase json keys in addition to pascalcase (Wrong JSON keys will be depracated)
   - Fix corruption when route-map delete/add sequence happens (fast re-add)
   - Reworked gRPC
   - RFC5424 & journald extended syslog target

**bfdd**
   - Fix broken FSM in active/passive modes

**bgpd**
   - Notification Message Support for BGP Graceful Restart (rfc8538)
   - BGP Cease Notification Subcode For BFD
   - Send Hold Timer for BGP (own implementation without an additional knob)
   - New `set as-path replace` command for BGP route-map
   - New `match peer` command for BGP route-map
   - New `ead-es-frag evi-limit` command for EVPN
   - New `match evpn route-type` command for EVPN route-map to match Type-1/Type-4
   - JSON outputs for all RPKI show commands
   - Set attributes via route-map for BGP conditional advertisements
   - Pass non-transitive extended communities between RS and RS-clients
   - Send MED attribute when aggregate prefix is created
   - Require librtr >= 0.8.0 for RPKI to fix connection handling (failover)
   - Fix aspath memory leak in aggr_suppress_map_test
   - Fix crash for `show ip bgp vrf all all neighbors 192.168.0.1 ...`
   - Fix crash for `show ip bgp vrf all all`
   - Fix memory leak for BGP Community Alias in CLI
   - Fix memory leak when setting BGP community at egress
   - Fix memory leak when setting BGP large-community at egress
   - Fix SR color nexthop processing in BGP
   - Fix setting local-preference in route-map using +/-
   - Fix crash using Lua and route-map to set attributes via scripts
   - Fix crash when issuing various forms of `bgp no-rib`

**isisd**
   - JSON output for show summary command
   - Fix crash when MTU mismatch occurs
   - Fix crash with xfrm interface type
   - Fix infinite loop when parsing LSPs
   - Fix router capability TLV parsing issues

**vtysh**
   - New `show thread timers` command

**ospfd6**
   - Add LSA statistics to LSA database
   - Add LSA stats to `show area json` output
   - Show time left in hello timer for `show ipv6 ospf6 int`
   - Permit route deletion without nexthops
   - Restart SPF when distance is updated
   - Stop refreshing Type-5 from NSSA
   - Support keychain for ospf6 authentication

**ospfd**
   - New `show ip ospf reachable-routers` command
   - Restart SPF when distance is updated
   - Use consistent JSON keys for `show ip ospf neighbor` and detail version

**pimd**
   - Add additional IGMP stats
   - Add IGMP join sent/failed statistics
   - Add IGMP total groups and total source groups to statistics
   - New `debug igmp trace detail` command
   - New `ip pim passive` command
   - JSON support added for command `show ip igmp sources`
   - Allow the LPM match work properly with prefix lists and normal RP's
   - Do not allow 224.0.0.0/24 range in IGMP join
   - Fix IGMP packet/query check
   - Handle PIM join/prune receive flow for IPv6
   - Handle receive of (*,G) register stop with source address as 0
   - Handle of exclude mode IGMPv3 report messages for SSM-aware group
   - Handle of IGMPv2 report message for SSM-aware group range
   - Send immediate join with possible sg rpt prune bit set
   - Show group-type under `show ip pim rp-info`
   - Show total received messages IGMP stats

**staticd**
   - Capture zebra's advertised ECMP limit
   - Don't register existing nexthop to Zebra
   - Reject route config with too many nexthops
   - Track nexthops per-safi

**watchfrr**
   - Add some more information to `show watchfrr`
   - Send operational state to systemd

**zebra**
   - Add ability to know when FRR is not ASIC offloaded
   - Add command for setting protodown bit
   - Add dplane type for netconf data
   - Add ECMP supported to `show zebra`
   - Add EVPN status to `show zebra`
   - Add if v4/v6 forwarding is turned on/off to `show zebra`
   - Add initial zebra tracepoint support
   - Add kernel nexthop group support to `show zebra`
   - Add knowledge about ra and rfc 5549 to `show zebra`
   - Add mpls status to `show zebra`
   - Add netlink debug dump for netconf messages
   - Add netlink debugs for ip rules
   - Add OS and version to `show zebra`
   - Add support for end.dt4
   - Add to `show zebra` the type of vrf devices being used
   - Allow *BSD to specify a receive buffer size
   - Allow multiple connected routes to be choosen for kernel routes
   - Allow system routes to recurse through themselves
   - Don't send RAs w/o link-local v6 or on bridge-ports
   - Evpn disable remove l2vni from l3vni list
   - Evpn-mh bonds protodown check for set
   - Evpn-mh use protodown update reason api
   - Fix cleanup of meta queues on vrf disable
   - Fix crash in evpn neigh cleanup all
   - Fix missing delete vtep during vni transition
   - Fix missing vrf change of l2vni on vxlan interface
   - Fix rtadv startup when config read in is before interface up
   - Fix use after deletion event in FreeBSD
   - Fix v6 route replace failure turned into success
   - Get zebra graceful restart working when restarting on *BSD
   - Handle FreeBSD routing socket enobufs
   - Handle protodown netlink for vxlan device
   - Include mpls enabled status in interface output
   - Include old reason in evpn-mh bond update
   - Keep the interface flags safe on multiple ioctl calls
   - Let /32 host route with same ip cross vrf
   - Make router advertisement warnings show up once every 6 hours
   - Prevent crash if zebra_route_all is used for a route type
   - Prevent installation of connected multiple times
   - Protodown-up event trigger interface up
   - Register nht nexthops with proper safi
   - Update advertise-svi-ip macips w/ new mac
   - When handling unprocessed messages from kernel print usable string
   - New `show ip nht mrib` command
   - Handle ENOBUFS errors for FreeBSD

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agodebian, redhat: updating changelog for new release
Jafar Al-Gharaibeh [Sun, 17 Jul 2022 04:27:20 +0000 (23:27 -0500)]
debian, redhat: updating changelog for new release

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agoMerge pull request #11619 from FRRouting/mergify/bp/stable/8.3/pr-11604
Donald Sharp [Sun, 17 Jul 2022 00:58:32 +0000 (20:58 -0400)]
Merge pull request #11619 from FRRouting/mergify/bp/stable/8.3/pr-11604

ospfd: free unreachable router LSA node so that it is not left unreachable (backport #11604)

2 years agoMerge pull request #11620 from FRRouting/mergify/bp/stable/8.3/pr-11615
Donald Sharp [Sun, 17 Jul 2022 00:56:38 +0000 (20:56 -0400)]
Merge pull request #11620 from FRRouting/mergify/bp/stable/8.3/pr-11615

bgpd: Fix memory leak for community stuff (backport #11615)

2 years agoMerge pull request #11616 from FRRouting/mergify/bp/stable/8.3/pr-11614
Donald Sharp [Sun, 17 Jul 2022 00:56:12 +0000 (20:56 -0400)]
Merge pull request #11616 from FRRouting/mergify/bp/stable/8.3/pr-11614

bgpd: Fix memory leak for community alias (backport #11614)

2 years agobgpd: Fix memory leak for community stuff 11620/head
Donatas Abraitis [Sat, 16 Jul 2022 13:26:13 +0000 (16:26 +0300)]
bgpd: Fix memory leak for community stuff

Do not forget to cleanup after we are done:

==395247== 8,268 (32 direct, 8,236 indirect) bytes in 1 blocks are definitely lost in loss record 199 of 205
==395247==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==395247==    by 0x492EB8E: qcalloc (in /usr/local/lib/libfrr.so.0.0.0)
==395247==    by 0x490BB12: hash_get (in /usr/local/lib/libfrr.so.0.0.0)
==395247==    by 0x1FBF63: community_intern (in /usr/lib/frr/bgpd)
==395247==    by 0x1FC0C5: community_parse (in /usr/lib/frr/bgpd)
==395247==    by 0x1F0B66: bgp_attr_community (in /usr/lib/frr/bgpd)
==395247==    by 0x1F4185: bgp_attr_parse (in /usr/lib/frr/bgpd)
==395247==    by 0x26BC29: bgp_update_receive (in /usr/lib/frr/bgpd)
==395247==    by 0x26E887: bgp_process_packet (in /usr/lib/frr/bgpd)
==395247==    by 0x4985380: thread_call (in /usr/local/lib/libfrr.so.0.0.0)
==395247==    by 0x491D521: frr_run (in /usr/local/lib/libfrr.so.0.0.0)
==395247==    by 0x1EBEE8: main (in /usr/lib/frr/bgpd)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 9571a61a12c063a5c8ae2b05d5ec189eb84f18d6)

2 years agoospfd: free unreachable router LSA node so that it is not left unreachable 11619/head
Lou Berger [Thu, 14 Jul 2022 11:40:39 +0000 (07:40 -0400)]
ospfd: free unreachable router LSA node so that it is not left unreachable

       allows for an LSA to be unreachable via one link and reachable via another

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit b976af1b093faf2723257a185070c48cb5de6813)

2 years agobgpd: Fix memory leak for community alias 11616/head
Donatas Abraitis [Sat, 16 Jul 2022 13:18:07 +0000 (16:18 +0300)]
bgpd: Fix memory leak for community alias

==361630== 24,780 (96 direct, 24,684 indirect) bytes in 3 blocks are definitely lost in loss record 94 of 97
==361630==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==361630==    by 0x492EB8E: qcalloc (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x490BB12: hash_get (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x1FD3CC: bgp_ca_alias_insert (in /usr/lib/frr/bgpd)
==361630==    by 0x2CF8E5: bgp_community_alias_magic (in /usr/lib/frr/bgpd)
==361630==    by 0x2C980B: bgp_community_alias (in /usr/lib/frr/bgpd)
==361630==    by 0x48E3556: cmd_execute_command_real (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x48E384B: cmd_execute_command_strict (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x48E3D41: command_config_read_one_line (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x48E3EBA: config_from_file (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x499065C: vty_read_file (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x4990FF4: vty_read_config (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x491CB95: frr_config_read_in (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x4985380: thread_call (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x491D521: frr_run (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x1EBEE8: main (in /usr/lib/frr/bgpd)
==361630==
==361630== 24,780 (96 direct, 24,684 indirect) bytes in 3 blocks are definitely lost in loss record 95 of 97
==361630==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==361630==    by 0x492EB8E: qcalloc (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x490BB12: hash_get (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x1FD39C: bgp_ca_community_insert (in /usr/lib/frr/bgpd)
==361630==    by 0x2CF8F4: bgp_community_alias_magic (in /usr/lib/frr/bgpd)
==361630==    by 0x2C980B: bgp_community_alias (in /usr/lib/frr/bgpd)
==361630==    by 0x48E3556: cmd_execute_command_real (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x48E384B: cmd_execute_command_strict (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x48E3D41: command_config_read_one_line (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x48E3EBA: config_from_file (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x499065C: vty_read_file (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x4990FF4: vty_read_config (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x491CB95: frr_config_read_in (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x4985380: thread_call (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x491D521: frr_run (in /usr/local/lib/libfrr.so.0.0.0)
==361630==    by 0x1EBEE8: main (in /usr/lib/frr/bgpd)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 176d7beabc26b4494261d82f656f6b024cbfece4)

2 years agoMerge pull request #11608 from FRRouting/mergify/bp/stable/8.3/pr-11606
Jafar Al-Gharaibeh [Fri, 15 Jul 2022 15:06:55 +0000 (10:06 -0500)]
Merge pull request #11608 from FRRouting/mergify/bp/stable/8.3/pr-11606

zebra: free neighbor state before exit to avoid memleaks (backport #11606)

2 years agozebra: free neighbor state before exit to avoid memleaks 11608/head
Christian Hopps [Thu, 14 Jul 2022 16:20:01 +0000 (12:20 -0400)]
zebra: free neighbor state before exit to avoid memleaks

Signed-off-by: Christian Hopps <chopps@labn.net>
(cherry picked from commit 11c9ab3202b2cefca0daca2ca1883e6772524a73)

# Conflicts:
# zebra/zebra_neigh.c

2 years agoMerge pull request #11607 from FRRouting/mergify/bp/stable/8.3/pr-11536
Jafar Al-Gharaibeh [Thu, 14 Jul 2022 20:03:39 +0000 (15:03 -0500)]
Merge pull request #11607 from FRRouting/mergify/bp/stable/8.3/pr-11536

pimd: During prune pending, behave as NOINFO state (conformance issue) (backport #11536)

2 years agopimd: During prune pending, behave as NOINFO state 11607/head
Mobashshera Rasool [Wed, 6 Jul 2022 06:08:52 +0000 (23:08 -0700)]
pimd: During prune pending, behave as NOINFO state

Fixed ANVL Conformance PIM-SM 16.3 test case.

When (S,G,rpt) prune is received, we were installing
the mroute immediately with none as OIF.
This leads to dropping the (S,G) traffic during prune
pending time as well.

Also we should not install the mroute if there is no
change in the rpf update.

These 2 things lead to the failure of the test case.

Fixed it by blocking the installation in this scenario.
When prune pending timer pops, it will take care of
installing the mroute with  none as OIF.

Fixes: #11535
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
(cherry picked from commit 8d0f0b02f3322b13c33fb215cf78ceedc685c950)

2 years agoMerge pull request #11599 from FRRouting/mergify/bp/dev/8.3/pr-11577
Jafar Al-Gharaibeh [Wed, 13 Jul 2022 14:10:09 +0000 (09:10 -0500)]
Merge pull request #11599 from FRRouting/mergify/bp/dev/8.3/pr-11577

bgpd: Free ->raw_data from Hard Notification message after we use it (backport #11577)

2 years agobgpd: Free ->raw_data from Hard Notification message after we use it 11599/head
Donatas Abraitis [Sun, 10 Jul 2022 09:42:46 +0000 (12:42 +0300)]
bgpd: Free ->raw_data from Hard Notification message after we use it

==175785== 0 bytes in 1 blocks are definitely lost in loss record 1 of 88
==175785==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==175785==    by 0x492EB8E: qcalloc (in /usr/local/lib/libfrr.so.0.0.0)
==175785==    by 0x269823: bgp_notify_decapsulate_hard_reset (in /usr/lib/frr/bgpd)
==175785==    by 0x26C85D: bgp_notify_receive (in /usr/lib/frr/bgpd)
==175785==    by 0x26E94E: bgp_process_packet (in /usr/lib/frr/bgpd)
==175785==    by 0x4985349: thread_call (in /usr/local/lib/libfrr.so.0.0.0)
==175785==    by 0x491D521: frr_run (in /usr/local/lib/libfrr.so.0.0.0)
==175785==    by 0x1EBEE8: main (in /usr/lib/frr/bgpd)
==175785==

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit c73d236383779498034abaa1a759a784750f46da)

2 years agoMerge pull request #11591 from FRRouting/mergify/bp/dev/8.3/pr-11588
Russ White [Tue, 12 Jul 2022 14:10:18 +0000 (10:10 -0400)]
Merge pull request #11591 from FRRouting/mergify/bp/dev/8.3/pr-11588

babeld: Install route to RIB if parse_update_subtlv() is false (backport #11588)

2 years agobabeld: Install route to RIB if parse_update_subtlv() is false 11591/head
Donatas Abraitis [Mon, 11 Jul 2022 17:26:06 +0000 (20:26 +0300)]
babeld: Install route to RIB if parse_update_subtlv() is false

We installed the route only if the type was SUBTLV_MANDATORY.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit d5260dc1231922c713555ab4bc77c0b4d0e8d8e6)

2 years agoMerge pull request #11573 from FRRouting/mergify/bp/dev/8.3/pr-11568
Jafar Al-Gharaibeh [Fri, 8 Jul 2022 22:20:37 +0000 (16:20 -0600)]
Merge pull request #11573 from FRRouting/mergify/bp/dev/8.3/pr-11568

bgpd: fix missing rmac value in debug (backport #11568)

2 years agobgpd: fix missing rmac value in debug 11573/head
anlan_cs [Fri, 8 Jul 2022 04:09:56 +0000 (00:09 -0400)]
bgpd: fix missing rmac value in debug

`attr.rmac` is not set in debug as expected for its wrong place in code.

Just move the debug process (`bgp_debug_zebra(NULL)`) after possible `rmac`
value is set.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
(cherry picked from commit 2304139a62c667cad734becc43ace87826be397e)

2 years agoMerge pull request #11561 from FRRouting/mergify/bp/dev/8.3/pr-11545
Donald Sharp [Fri, 8 Jul 2022 14:56:38 +0000 (10:56 -0400)]
Merge pull request #11561 from FRRouting/mergify/bp/dev/8.3/pr-11545

bgpd: Free memory for BMP listeners when deleting BGP instance (backport #11545)

2 years agoMerge pull request #11554 from FRRouting/mergify/bp/dev/8.3/pr-11552
Donald Sharp [Thu, 7 Jul 2022 20:26:40 +0000 (16:26 -0400)]
Merge pull request #11554 from FRRouting/mergify/bp/dev/8.3/pr-11552

Package build fixes (backport #11552)

2 years agoMerge pull request #11557 from FRRouting/mergify/bp/dev/8.3/pr-11549
Donald Sharp [Thu, 7 Jul 2022 20:25:30 +0000 (16:25 -0400)]
Merge pull request #11557 from FRRouting/mergify/bp/dev/8.3/pr-11549

tools: Add missing bfdd to logrotate config (backport #11549)

2 years agobgpd: Free memory for BMP listeners when deleting BGP instance 11561/head
Donatas Abraitis [Wed, 6 Jul 2022 14:26:05 +0000 (17:26 +0300)]
bgpd: Free memory for BMP listeners when deleting BGP instance

When using `no router bgp` we MUST free the memory for the listeners too.

Replicate with:
```
router bgp 100
bmp targets server1
bmp listener 0.0.0.0 port 65535
no router bgp
router bgp 100
bmp targets server1
bmp listener 0.0.0.0 port 65535
no router bgp
router bgp 100
bmp targets server1
bmp listener 0.0.0.0 port 65535
no router bgp
```

Before:
```
Type                          : Current#   Size       Total     Max#  MaxBytes
BMP targets                   :        0    240           0        1       248
BMP targets name              :        0      8           0        1        24
BMP listener                  :       12    152        1824       12      1824
BMP instance state            :        0     88           0        1        88
```

After:
```
Type                          : Current#   Size       Total     Max#  MaxBytes
BMP targets                   :        0    240           0        1       248
BMP targets name              :        0      8           0        1        24
BMP listener                  :        0    152           0        1       152
BMP instance state            :        0     88           0        1        88
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 5cb3a15300749a0bdc0eb391c822ee2473f0caec)

2 years agotools: Add missing bfdd to logrotate config 11557/head
Donatas Abraitis [Thu, 7 Jul 2022 06:49:21 +0000 (09:49 +0300)]
tools: Add missing bfdd to logrotate config

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 97634742788475cd4a8581f8d37e29ffa2e6280b)

2 years agoMerge pull request #11550 from FRRouting/mergify/bp/dev/8.3/pr-11548
Jafar Al-Gharaibeh [Thu, 7 Jul 2022 14:55:58 +0000 (08:55 -0600)]
Merge pull request #11550 from FRRouting/mergify/bp/dev/8.3/pr-11548

lib: check hostname in resolver_resolve (backport #11548)

2 years agosnapcraft: Version must be quoted in snap store 11554/head
Martin Winter [Thu, 7 Jul 2022 10:10:54 +0000 (12:10 +0200)]
snapcraft: Version must be quoted in snap store

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
(cherry picked from commit d2b48927bb885611c46bd377a7f649847185ac07)

2 years agodebian: Fix version requirement for rtrlib to allow distro specific names
Martin Winter [Thu, 7 Jul 2022 09:19:34 +0000 (11:19 +0200)]
debian: Fix version requirement for rtrlib to allow distro specific names

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
(cherry picked from commit b78535682c4cd3d7e24b526fd4a2e222683f0b16)

2 years agolib: check hostname in resolver_resolve 11550/head
kevinshen [Thu, 7 Jul 2022 04:10:03 +0000 (12:10 +0800)]
lib: check hostname in resolver_resolve

resolver_resolve should check hostname is null or not.

if ares_gethostbyname() get null hostname string, the hostname string will access a null pointer and crash.

Signed-off-by: kevinshen <kevinshen@inspur.com>
(cherry picked from commit 30220d1e35a92bbf3e6694d81b308630c7db27c3)

2 years agoMerge pull request #11531 from FRRouting/mergify/bp/dev/8.3/pr-11508
Donatas Abraitis [Tue, 5 Jul 2022 16:52:08 +0000 (19:52 +0300)]
Merge pull request #11531 from FRRouting/mergify/bp/dev/8.3/pr-11508

isisd: fix infinite loop when parsing LSPs (backport #11508)