]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 years agozebra: zrouter.in_shutdown is an atomic variable 11744/head
Donald Sharp [Thu, 4 Aug 2022 11:36:51 +0000 (07:36 -0400)]
zebra: zrouter.in_shutdown is an atomic variable

So let's treat the variable like it is atomic and
properly load it when we need to look at it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Fix memory leaks and use after frees in nhg's on shutdown
Donald Sharp [Thu, 4 Aug 2022 11:05:46 +0000 (07:05 -0400)]
zebra: Fix memory leaks and use after frees in nhg's on shutdown

Fixup both memory leaks as well as use after free's in nhg's
on shutdown.

This approach is effectively just iterating through all the
hash items and directly just freeing the memory instead
of handling ref counts or cross references.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: When saving nhg for later stop processing
Donald Sharp [Tue, 2 Aug 2022 19:43:46 +0000 (15:43 -0400)]
zebra: When saving nhg for later stop processing

Commit 35729f38fa5713b introduced the idea of
holding a nexthop group for a small amount of time
before removing it from the system.  When this code
was introduced the nexthop group entry was saved
and a timer started, except instead of stopping
processing at that point in time, zebra was
continuing on and deleting nexthop group entries
that that entry depended on as well.  This
should not be done until the timer pops.

Fixes: #11596
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11636 from AbhishekNR/clear_cmd
Donald Sharp [Fri, 5 Aug 2022 11:45:47 +0000 (07:45 -0400)]
Merge pull request #11636 from AbhishekNR/clear_cmd

pim6d: Implementing "clear ipv6 pim interface traffic" command.

2 years agoMerge pull request #11559 from patrasar/fix_clear_ipv6_mroute
Donald Sharp [Fri, 5 Aug 2022 11:43:12 +0000 (07:43 -0400)]
Merge pull request #11559 from patrasar/fix_clear_ipv6_mroute

pim6d: fix clear ipv6 mroute

2 years agoMerge pull request #11741 from Pdoijode/bgp-evpn-flood-op-chg-master
Donatas Abraitis [Fri, 5 Aug 2022 11:41:17 +0000 (14:41 +0300)]
Merge pull request #11741 from Pdoijode/bgp-evpn-flood-op-chg-master

bgpd: addition of vxlanFlooding field in show output

2 years agoMerge pull request #11749 from ad8-bdl/patch-1
Donald Sharp [Fri, 5 Aug 2022 11:37:44 +0000 (07:37 -0400)]
Merge pull request #11749 from ad8-bdl/patch-1

doc/user/ripd: clarify unicast behaviour

2 years agodoc/user/ripd: clarify unicast behaviour 11749/head
Ben [Fri, 5 Aug 2022 07:02:55 +0000 (17:02 +1000)]
doc/user/ripd: clarify unicast behaviour

Current wording _implies_ `neighbor` updates are sent unicast; this makes it explicit.

Signed-off-by: Ben L <47653825+ad8-bdl@users.noreply.github.com>
2 years agoMerge pull request #11716 from mobash-rasool/fixes2
Donald Sharp [Fri, 5 Aug 2022 02:06:49 +0000 (22:06 -0400)]
Merge pull request #11716 from mobash-rasool/fixes2

pimd, pim6d: Send register msg via reg socket, solve FHR/RP same node issue

2 years agoMerge pull request #11705 from Jafaral/pim-static
Donald Sharp [Fri, 5 Aug 2022 02:04:02 +0000 (22:04 -0400)]
Merge pull request #11705 from Jafaral/pim-static

pimd: fix static mroute to also take into account the input interface

2 years agoMerge pull request #11730 from SaiGomathiN/ttable
Donald Sharp [Thu, 4 Aug 2022 20:40:14 +0000 (16:40 -0400)]
Merge pull request #11730 from SaiGomathiN/ttable

pimd, pim6d: Using ttable for displaying purpose

2 years agobgpd: addition of vxlanFlooding field to show output 11741/head
Pdoijode [Thu, 4 Aug 2022 18:28:33 +0000 (11:28 -0700)]
bgpd: addition of vxlanFlooding field to show output

Instead of changing the value of 'BUM flooding' field in
'show bgp l2vpn evpn vni' vty and JSON command from
'Head-end replication' to 'enabled', adding a new field named
'vxlanFlooding' to 'show bgp l2vpn evpn vni' vty and JSON output.

This is done to maintain backward compatibility.'BUM flooding' field
in vty and JSON output will be deprecated later.

Signed-off-by: Pooja Doijode <pdoijode@nvidia.com>
2 years agoMerge pull request #11745 from mjstapp/fix_a_dot_py
Donald Sharp [Thu, 4 Aug 2022 17:24:50 +0000 (13:24 -0400)]
Merge pull request #11745 from mjstapp/fix_a_dot_py

*: remove test python file

2 years ago*: remove test python file 11745/head
Mark Stapp [Thu, 4 Aug 2022 15:06:59 +0000 (11:06 -0400)]
*: remove test python file

Looks like a test script was added recently; remove it.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agopimd, pim6d: Using ttable for displaying 11730/head
Sai Gomathi N [Wed, 3 Aug 2022 09:22:28 +0000 (02:22 -0700)]
pimd, pim6d: Using ttable for displaying

Using termtable for show ip|ipv6 pim interface
for dynamic space alignments

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agoMerge pull request #11739 from opensourcerouting/fix/bgp_best_path_select_defer
Donald Sharp [Thu, 4 Aug 2022 11:18:47 +0000 (07:18 -0400)]
Merge pull request #11739 from opensourcerouting/fix/bgp_best_path_select_defer

bgpd: bgp_best_path_select_defer never returns negative

2 years agolib: Add errno details to the sockopt_reuseaddr api 11716/head
Mobashshera Rasool [Thu, 4 Aug 2022 07:50:36 +0000 (00:50 -0700)]
lib: Add errno details to the sockopt_reuseaddr api

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopimd, pim6d: Send register msg via register socket
Mobashshera Rasool [Tue, 2 Aug 2022 06:12:53 +0000 (23:12 -0700)]
pimd, pim6d: Send register msg via register socket

The problem here is when the same node is FHR as well as RP,
then the node keeps on sending the register packet.
Register-stop is not sent as well.

This problem has occurred because the RP is the same node
and there is no socket created on loopback interface, so the
packet is never send out and never received back on the same
node, so register recv could not be processed on the node and
hence no register-stop is sent.

Since register packets are unicast packets, its better to handle
the send of register packet via a separate register socket.
This fixes the problem mentioned above as well.

Fixes: #11331
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11742 from taspelund/evpn_rd_crash
Donatas Abraitis [Thu, 4 Aug 2022 07:36:38 +0000 (10:36 +0300)]
Merge pull request #11742 from taspelund/evpn_rd_crash

bgpd: fix show bgp l2vpn evpn route rd crashes

2 years agobgpd: fix show bgp l2vpn evpn route rd crashes 11742/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>
2 years agobgpd: bgp_best_path_select_defer never returns negative 11739/head
Donatas Abraitis [Wed, 3 Aug 2022 15:43:01 +0000 (18:43 +0300)]
bgpd: bgp_best_path_select_defer never returns negative

Just drop the test and convert to void.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopim6d: fix clear ipv6 mroute 11559/head
Sarita Patra [Thu, 7 Jul 2022 15:03:45 +0000 (08:03 -0700)]
pim6d: fix clear ipv6 mroute

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agoMerge pull request #11731 from opensourcerouting/feature/show_bgp_access-list
Donald Sharp [Wed, 3 Aug 2022 14:29:30 +0000 (10:29 -0400)]
Merge pull request #11731 from opensourcerouting/feature/show_bgp_access-list

bgpd: Add `show bgp access-list` command

2 years agoMerge pull request #11713 from anlancs/fix/evpn-mh-bond-redirect
Stephen Worley [Wed, 3 Aug 2022 14:11:08 +0000 (10:11 -0400)]
Merge pull request #11713 from anlancs/fix/evpn-mh-bond-redirect

zebra: fix bond down for evpn-mh

2 years agodoc: Add `show bgp access-list` command 11731/head
Donatas Abraitis [Wed, 3 Aug 2022 10:27:07 +0000 (13:27 +0300)]
doc: Add `show bgp access-list` command

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11722 from donaldsharp/qdb
Donatas Abraitis [Wed, 3 Aug 2022 10:24:10 +0000 (13:24 +0300)]
Merge pull request #11722 from donaldsharp/qdb

qpb: Tell coverity the actual size we are copying

2 years agobgpd: Add `show bgp access-list` command to filter routes by ACL
Donatas Abraitis [Wed, 3 Aug 2022 09:53:16 +0000 (12:53 +0300)]
bgpd: Add `show bgp access-list` command to filter routes by ACL

The same as with prefix-list/route-maps/etc.

```
donatas-pc# show ip access-list spine
ZEBRA:
Zebra IP access list spine
    seq 5 permit 200.200.200.200/32
BGP:
Zebra IP access list spine
    seq 5 permit 200.200.200.200/32
PIM:
Zebra IP access list spine
    seq 5 permit 200.200.200.200/32
BABELD:
Zebra IP access list spine
    seq 5 permit 200.200.200.200/32
donatas-pc# show bgp ipv4 unicast access-list
  ACCESSLIST_NAME  Access-list name
     spine
donatas-pc# show bgp ipv4 unicast access-list spine
BGP table version is 9, local router ID is 172.17.0.3, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

   Network          Next Hop            Metric LocPrf Weight Path
*> 200.200.200.200/32
                    enp3s0                   0             0 65000 3456 ?

Displayed  1 routes and 10 total paths
donatas-pc#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11710 from donaldsharp/split_up_test_multicast_pim_static_rp
Donatas Abraitis [Wed, 3 Aug 2022 08:11:37 +0000 (11:11 +0300)]
Merge pull request #11710 from donaldsharp/split_up_test_multicast_pim_static_rp

some test fixes and a coverity fix

2 years agozebra: fix bond down for evpn-mh 11713/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>
2 years agoMerge pull request #11723 from anlancs/fix/minor-10
mobash-rasool [Wed, 3 Aug 2022 06:23:47 +0000 (11:53 +0530)]
Merge pull request #11723 from anlancs/fix/minor-10

ospf6d: combine two conditions for lsa prefix

2 years agoospf6d: combine two conditions for lsa prefix 11723/head
anlan_cs [Mon, 1 Aug 2022 11:37:51 +0000 (07:37 -0400)]
ospf6d: combine two conditions for lsa prefix

For both router and network LSAs, combine the two conditions and process lsa
prefix uniformly.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #11715 from Orange-OpenSource/link_state
Donald Sharp [Wed, 3 Aug 2022 00:20:06 +0000 (20:20 -0400)]
Merge pull request #11715 from Orange-OpenSource/link_state

lib: Correct valgrind errors

2 years agobgpd: BUM flooding display change
Pooja [Tue, 2 Aug 2022 22:16:14 +0000 (15:16 -0700)]
bgpd: BUM flooding display change

Changed BUM flooding output in 'show bgp l2vpn evpn vni'
command from 'Head-end replication' to 'Enabled'

Signed-off-by: Pooja Doijode <pdoijode@nvidia.com>
2 years agoqpb: Tell coverity the actual size we are copying 11722/head
Donald Sharp [Tue, 2 Aug 2022 19:34:43 +0000 (15:34 -0400)]
qpb: Tell coverity the actual size we are copying

`struct prefix` is a superset of `struct prefix_ipv4` and
`struct prefix_ipv6`.  Let's let coverity figure it out

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11721 from donaldsharp/build_checks
Russ White [Tue, 2 Aug 2022 18:35:31 +0000 (14:35 -0400)]
Merge pull request #11721 from donaldsharp/build_checks

build: unconditionally enable format checks

2 years agobuild: unconditionally enable format checks 11721/head
David Lamparter [Tue, 26 Jul 2022 19:46:33 +0000 (15:46 -0400)]
build: unconditionally enable format checks

The format message checks done by clippy/xrelfo were still guarded
behind `--enable-dev-build`.  They've been clean and reliable, so it's
time to enable them unconditionally.

Fixes: #11680
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: Remove usage of inet_ntop in lib/sockopt.c
Donald Sharp [Tue, 2 Aug 2022 14:37:11 +0000 (10:37 -0400)]
lib: Remove usage of inet_ntop in lib/sockopt.c

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11684 from donaldsharp/cleanup_for_dev_builds
Russ White [Tue, 2 Aug 2022 13:02:55 +0000 (09:02 -0400)]
Merge pull request #11684 from donaldsharp/cleanup_for_dev_builds

Cleanup for dev builds

2 years agopim6d: Implementing "clear ipv6 pim interface traffic" command. 11636/head
Abhishek N R [Mon, 18 Jul 2022 13:08:19 +0000 (06:08 -0700)]
pim6d: Implementing "clear ipv6 pim interface traffic" command.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agolib: Correct valgrind errors 11715/head
Olivier Dugeon [Mon, 1 Aug 2022 15:26:36 +0000 (17:26 +0200)]
lib: Correct valgrind errors

In CSPF topo test, valgrind detects uninitialized bytes when exporting TE
Opaque information through ZEBRA. This is due to C pragma compilation directive
__attribute__(aligned(8)) in struct ls_node_id in link_state.h. Valgrind
consideris that struct ls_node_id nid = {} doesn't initialized the padding
bytes introduced by gcc.

This patch simply removes the C pragma compilation directive and also takes
opportunity to remove the transmission of remote node id for vertices and
subnets which is not known. Indeed, remote node id is only pertinent for
edges.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2 years agoMerge pull request #11691 from mxyns/bmp-vpnv4monupd-fix
Donald Sharp [Mon, 1 Aug 2022 11:49:18 +0000 (07:49 -0400)]
Merge pull request #11691 from mxyns/bmp-vpnv4monupd-fix

bgpd: fixed bmp vpnv4 monitoring sending withdraws instead of updates

2 years agoMerge pull request #11692 from opensourcerouting/fix/bgpd_as_override
Donald Sharp [Mon, 1 Aug 2022 11:19:11 +0000 (07:19 -0400)]
Merge pull request #11692 from opensourcerouting/fix/bgpd_as_override

bgpd: Override ASN without checking if an entire as-path is from a single ASN

2 years agoMerge pull request #11712 from mobash-rasool/fixes2
Donald Sharp [Mon, 1 Aug 2022 11:18:10 +0000 (07:18 -0400)]
Merge pull request #11712 from mobash-rasool/fixes2

pimd: Simply the code a bit, reduce code complexity

2 years agopimd: Simply the code a bit, reduce code complexity 11712/head
Mobashshera Rasool [Mon, 1 Aug 2022 06:37:56 +0000 (23:37 -0700)]
pimd: Simply the code a bit, reduce code complexity

Combine all the if conditions in api pim_if_addr_add_all to
reduce nested loops.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agolib: Use pI4 instead of inet_ntop in sockopt.c 11684/head
Donald Sharp [Tue, 26 Jul 2022 20:59:20 +0000 (16:59 -0400)]
lib: Use pI4 instead of inet_ntop in sockopt.c

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Remove usage of newline in zlog_X message
Donald Sharp [Tue, 26 Jul 2022 20:58:14 +0000 (16:58 -0400)]
zebra: Remove usage of newline in zlog_X message

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: use pI4
Donald Sharp [Tue, 26 Jul 2022 20:56:18 +0000 (16:56 -0400)]
bgpd: use pI4

The bgp_path_info_to_ipv6_nexthop will correctly set
the nexthop value. There is no need to test this to
display something that won't be used in debug

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospfd: Remove usage of inet_ntop
Donald Sharp [Tue, 26 Jul 2022 20:23:46 +0000 (16:23 -0400)]
ospfd: Remove usage of inet_ntop

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: Coverity wants strlen to include null character 11710/head
Donald Sharp [Fri, 29 Jul 2022 19:55:01 +0000 (15:55 -0400)]
lib: Coverity wants strlen to include null character

Ensure that the string has the null terminating character available
as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Fix test_ospf_topo1 as that it sometimes fails
Donald Sharp [Fri, 29 Jul 2022 17:40:36 +0000 (13:40 -0400)]
tests: Fix test_ospf_topo1 as that it sometimes fails

This test is sometimes failing when it looks at the
v6 routes in the fib.  Since the step before is
ensuring that v3 ospf has just converged let's
give it a bit of time to find and see if things
have had a chance to install the routes too.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Split up test_multicast_pim_static_rp.py into 3 test suites
Donald Sharp [Fri, 29 Jul 2022 12:01:03 +0000 (08:01 -0400)]
tests: Split up test_multicast_pim_static_rp.py into 3 test suites

This test directory takes almost 7 minutes to complete splitting
this up into 3 test files drops it down to just over 3 minutes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: fixed bmp vpnv4 monitoring are withdraws instead of updates 11691/head
mxyns [Tue, 26 Jul 2022 16:38:08 +0000 (18:38 +0200)]
bgpd: fixed bmp vpnv4 monitoring are withdraws instead of updates

fixes the recent support bmp monitor of VPNv4 afi/safi
the bmp updates messages (MP_REACH_NLRI) are never sent for VPNv4 and bmp withdraws (MP_UNREACH_NRLI) are sent instead
this is caused by bgp_node_lookup which fails to find VPNv4 bgp_node in the rib which results in NULL path info attributes passed to bmp_monitor
using bgp_afi_node_lookup instead of bgp_node_lookup solves the problem

Signed-off-by: Maxence Younsi <mx.yns@outlook.fr>
2 years agobgpd: Do not check if the whole as-path has target ASN when using as-override 11692/head
Donatas Abraitis [Wed, 27 Jul 2022 10:33:48 +0000 (13:33 +0300)]
bgpd: Do not check if the whole as-path has target ASN when using as-override

as-override didn't work if the entire as-path is not a single ASN (as a target).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11707 from kuldeepkash/pim_v6
Donald Sharp [Fri, 29 Jul 2022 14:10:26 +0000 (10:10 -0400)]
Merge pull request #11707 from kuldeepkash/pim_v6

doc: Update /doc/topotests.rst documentation

2 years agoMerge pull request #11706 from donaldsharp/safi_hate
Donatas Abraitis [Fri, 29 Jul 2022 12:30:03 +0000 (15:30 +0300)]
Merge pull request #11706 from donaldsharp/safi_hate

bgpd: Safi can be SAFI_MAX which would allow a write beyond alloced

2 years agoMerge pull request #11702 from patrasar/pim_11675
Donald Sharp [Fri, 29 Jul 2022 11:05:50 +0000 (07:05 -0400)]
Merge pull request #11702 from patrasar/pim_11675

pimd: Update mroute IIF based on Nexthop received from Zebra

2 years agodoc: Update /doc/topotests.rst documentation 11707/head
Kuldeep Kashyap [Fri, 29 Jul 2022 04:54:29 +0000 (21:54 -0700)]
doc: Update /doc/topotests.rst documentation

Updated /doc/topotests.rst with socat details,
which is needed to run PIMv6 tests. Socat tool
is used to send PIMv6 join and traffic.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agoMerge pull request #11703 from donaldsharp/blimey
mobash-rasool [Fri, 29 Jul 2022 04:53:17 +0000 (10:23 +0530)]
Merge pull request #11703 from donaldsharp/blimey

isisd: Prevent leak of global_ipv6_addrs

2 years agobgpd: Safi can be SAFI_MAX which would allow a write beyond alloced 11706/head
Donald Sharp [Thu, 28 Jul 2022 22:01:09 +0000 (18:01 -0400)]
bgpd: Safi can be SAFI_MAX which would allow a write beyond alloced

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: fix static mroute to also take into account the input interface 11705/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>
2 years agopimd: Update mroute IIF based on Nexthop received from Zebra 11702/head
Sarita Patra [Thu, 28 Jul 2022 17:40:52 +0000 (10:40 -0700)]
pimd: Update mroute IIF based on Nexthop received from Zebra

Topology:
R1(LHR) ---- R2 ----R4(FHR)
        ---- R3 ----

R2 = RP

Steps to reproduce:
1. R1(LHR) sends IGMP join, R4(FHR) sends multicast traffic.
   Verify traffic is flowing from FHR to LHR.
2. Restart R1(LHR).
3. Below sequence of events are happening after FRR restart in R1(LHR).
4. R1(LHR) Register RP address to Zebra.
5. R1(LHR) Receive update from Zebra that R2(RP) is reachable via R3.
6. R1(LHR) Receive IGMP join for group 225.1.1.1, will create pim upstream
   and (*,G) mroute with IIF towards R3.
7. R1(LHR) Receive update from Zebra that RP is reachable via R2(RP).
8. R1(LHR) Update the PIM upstream IIF, but not updating the (*,G) IIF
   even there is RPF change.
9. R1(LHR) receives IGMP join for group 225.1.1.2, will create (*,G) with
   IIF towards R2(RP), both upstream and (,G) created with IIF towards R2(RP).

Root Cause:
Mroute IIF is not getting updated when better route update
received. It is still pointing to the older nexthop.

Fix:
Update the mroute IIF when there is change in nexthop.

Fixing Issue #11675

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agoisisd: Prevent leak of global_ipv6_addrs 11703/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>
2 years agoMerge pull request #11685 from sri-mohan1/sri-ospf
Jafar Al-Gharaibeh [Thu, 28 Jul 2022 16:59:53 +0000 (11:59 -0500)]
Merge pull request #11685 from sri-mohan1/sri-ospf

ospfclient: condition optimization

2 years agoMerge pull request #11695 from donaldsharp/afi_max
Donatas Abraitis [Thu, 28 Jul 2022 15:32:24 +0000 (18:32 +0300)]
Merge pull request #11695 from donaldsharp/afi_max

bgpd: Ensure we are not using AFI_MAX

2 years agoMerge pull request #11693 from opensourcerouting/fix/unlock_bgp_dest
Donald Sharp [Thu, 28 Jul 2022 15:30:11 +0000 (11:30 -0400)]
Merge pull request #11693 from opensourcerouting/fix/unlock_bgp_dest

bgpd: Unlock bgp_node after bgp_node_lookup

2 years agoMerge pull request #11697 from donaldsharp/bgp_work
mobash-rasool [Thu, 28 Jul 2022 11:37:06 +0000 (17:07 +0530)]
Merge pull request #11697 from donaldsharp/bgp_work

two things

2 years agobgpd: Unlock bgp_node after bgp_node_lookup 11693/head
Donatas Abraitis [Wed, 27 Jul 2022 11:51:15 +0000 (14:51 +0300)]
bgpd: Unlock bgp_node after bgp_node_lookup

bgp_node_lookup increments lock, we should decrement it after use.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11701 from kuldeepkash/pim_v6
Donatas Abraitis [Thu, 28 Jul 2022 11:33:04 +0000 (14:33 +0300)]
Merge pull request #11701 from kuldeepkash/pim_v6

tests: [PIMv6] Updated topology for static rp suite

2 years agotests: [PIMv6] Update topology for static rp suite 11701/head
Kuldeep Kashyap [Thu, 28 Jul 2022 02:51:43 +0000 (19:51 -0700)]
tests: [PIMv6] Update topology for static rp suite

Updated topology for static rp suite as per testcase.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agoMerge pull request #11696 from sri-mohan1/sri-debug
Mark Stapp [Wed, 27 Jul 2022 19:17:23 +0000 (15:17 -0400)]
Merge pull request #11696 from sri-mohan1/sri-debug

ospf6d: corrected the debug string

2 years agoospf6d: corrected the debug string 11696/head
sri-mohan1 [Wed, 27 Jul 2022 16:51:06 +0000 (22:21 +0530)]
ospf6d: corrected the debug string

Corrected the gramatical error for debug string

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2 years agoospfd: Coverity warns that we could possibly use unininted data 11697/head
Donald Sharp [Wed, 27 Jul 2022 16:17:50 +0000 (12:17 -0400)]
ospfd: Coverity warns that we could possibly use unininted data

In ospf_handle_exnl_lsa_lsId_chg there is a code path
where that we may be using uninitialized data for decisions.
Doubtful that this happens but let's make it less likely to
even more.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Improve indentation in bgp_updgrp_adv.c
Donald Sharp [Wed, 27 Jul 2022 16:17:16 +0000 (12:17 -0400)]
bgpd: Improve indentation in bgp_updgrp_adv.c

This file was hard to read due to heavy indentation.
Let's fix it up some.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11682 from opensourcerouting/frr-format-gcc-12
Donald Sharp [Wed, 27 Jul 2022 15:44:39 +0000 (11:44 -0400)]
Merge pull request #11682 from opensourcerouting/frr-format-gcc-12

tools/gcc-plugins: make GCC 12 compatible

2 years agoMerge pull request #11689 from opensourcerouting/fix/port_for_unnumbered
Donald Sharp [Wed, 27 Jul 2022 15:42:09 +0000 (11:42 -0400)]
Merge pull request #11689 from opensourcerouting/fix/port_for_unnumbered

bgpd: Allow setting custom port for unnumbered sessions

2 years agobgpd: Ensure we are not using AFI_MAX 11695/head
Donald Sharp [Wed, 27 Jul 2022 13:36:17 +0000 (09:36 -0400)]
bgpd: Ensure we are not using AFI_MAX

When using bgp_vty_afi_from_str it can
return AFI_MAX( but in practice never will with
our cli ).  In bgp_default_afi_safi_cmd the code
directly references:
bgp->default_afi[afi][safi] = TRUE;

and if afi is AFI_MAX FRRR would be accessing
memory where it should not be.

Let's just provide some assurances for coverity
that this never happens.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Check if BGP as-override works correctly
Donatas Abraitis [Wed, 27 Jul 2022 10:33:11 +0000 (13:33 +0300)]
tests: Check if BGP as-override works correctly

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoospfclient: condition optimization 11685/head
sri-mohan1 [Wed, 27 Jul 2022 06:44:46 +0000 (12:14 +0530)]
ospfclient: condition optimization

Its better to check the length and then the type of the LSA

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2 years agobgpd: Reset BGP sessions when changing the port 11689/head
Donatas Abraitis [Wed, 27 Jul 2022 08:44:07 +0000 (11:44 +0300)]
bgpd: Reset BGP sessions when changing the port

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Allow setting custom port for BGP unnumbered peers
Donatas Abraitis [Wed, 27 Jul 2022 08:32:49 +0000 (11:32 +0300)]
bgpd: Allow setting custom port for BGP unnumbered peers

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11164 from kuldeepkash/pim_v6
Martin Winter [Wed, 27 Jul 2022 08:05:25 +0000 (10:05 +0200)]
Merge pull request #11164 from kuldeepkash/pim_v6

2 years agoMerge pull request #11681 from donaldsharp/valgrind_issues
Donatas Abraitis [Wed, 27 Jul 2022 07:51:25 +0000 (10:51 +0300)]
Merge pull request #11681 from donaldsharp/valgrind_issues

pimd: Fix a couple coverity issues with mtracebis_netlink.c

2 years agoMerge pull request #11678 from donaldsharp/valgrind_me
Donatas Abraitis [Wed, 27 Jul 2022 07:29:29 +0000 (10:29 +0300)]
Merge pull request #11678 from donaldsharp/valgrind_me

Valgrind me

2 years agotools/gcc-plugins: make GCC 12 compatible 11682/head
David Lamparter [Sun, 24 Jul 2022 18:52:24 +0000 (14:52 -0400)]
tools/gcc-plugins: make GCC 12 compatible

check_function_arguments_recurse() has received a new function argument
in GCC 12.  Fill it in and add a compatibility wrapper.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopimd: Fix a couple coverity issues with mtracebis_netlink.c 11681/head
Donald Sharp [Tue, 26 Jul 2022 16:37:16 +0000 (12:37 -0400)]
pimd: Fix a couple coverity issues with mtracebis_netlink.c

Coverity is complaining that buf has not been initialized.
It has and coverity appears to be confused so let's help it
find the initialization.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11679 from donaldsharp/fix_compilation_bgp_vty
Christian Hopps [Tue, 26 Jul 2022 16:48:40 +0000 (12:48 -0400)]
Merge pull request #11679 from donaldsharp/fix_compilation_bgp_vty

bgpd: Remove newlines from zlog, they are not allowed

2 years agotests: Fixup more missing pytestmark annotations 11678/head
Donald Sharp [Tue, 26 Jul 2022 13:53:22 +0000 (09:53 -0400)]
tests: Fixup more missing pytestmark annotations

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Fix lost memory on lsp free
Donald Sharp [Tue, 26 Jul 2022 11:53:48 +0000 (07:53 -0400)]
zebra: Fix lost memory on lsp free

When cleaning up memory associated with a lsp the
nhlfe is lost in some cases.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Fixup pbr rule changes that were missed
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 agobgpd: Remove newlines from zlog, they are not allowed 11679/head
Donald Sharp [Tue, 26 Jul 2022 14:06:38 +0000 (10:06 -0400)]
bgpd: Remove newlines from zlog, they are not allowed

commit: a486300b2679ff80a13d800ed76e1236edfcaa2b
introduced newlines in zlog_XX messaging.  Not allowed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11582 from liwg06/master
Russ White [Tue, 26 Jul 2022 13:20:45 +0000 (09:20 -0400)]
Merge pull request #11582 from liwg06/master

bgpd: Fixup some MAC address token cli syntax

2 years agoMerge pull request #11523 from pguibert6WIND/bgp_no_retain
Russ White [Tue, 26 Jul 2022 12:50:59 +0000 (08:50 -0400)]
Merge pull request #11523 from pguibert6WIND/bgp_no_retain

Bgp no retain

2 years agoMerge pull request #11674 from opensourcerouting/fix/cleanup_subgrpoup_hash_on_update...
Donald Sharp [Mon, 25 Jul 2022 20:50:03 +0000 (16:50 -0400)]
Merge pull request #11674 from opensourcerouting/fix/cleanup_subgrpoup_hash_on_update_group_delete

bgpd: Cleanup subgroup hash when we delete/merge a subgroup

2 years agobgpd: Rename baa_new/baa_free/etc functions to be human-readable 11674/head
Donatas Abraitis [Mon, 25 Jul 2022 13:37:17 +0000 (16:37 +0300)]
bgpd: Rename baa_new/baa_free/etc functions to be human-readable

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Cleanup subgroup hash when we delete/merge a subgroup
Donatas Abraitis [Sat, 23 Jul 2022 17:47:27 +0000 (20:47 +0300)]
bgpd: Cleanup subgroup hash when we delete/merge a subgroup

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotests: [PIMv6] Add test_multicast_pimv6_static_rp suite 11164/head
Kuldeep Kashyap [Fri, 15 Jul 2022 08:01:23 +0000 (01:01 -0700)]
tests: [PIMv6] Add test_multicast_pimv6_static_rp suite

Adding supporting multicast PIMv6 static rp test
suite.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agotests: [PIMv6] APIs for multicast PIMv6 config
Kuldeep Kashyap [Sun, 8 May 2022 09:31:01 +0000 (02:31 -0700)]
tests: [PIMv6] APIs for multicast PIMv6 config

Enhanced few exsiting PIM APIs to support both
IPv4 and IPv6 configuration. Added few new APIs
for PIMv6. Tested all existing tests with new
API changes.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agoMerge pull request #11666 from opensourcerouting/fix/memory_leak_for_regexp_bgp_aspath
Donald Sharp [Sat, 23 Jul 2022 11:40:30 +0000 (07:40 -0400)]
Merge pull request #11666 from opensourcerouting/fix/memory_leak_for_regexp_bgp_aspath

bgpd: Free memory for as-path filter if regexp is wrong

2 years agoMerge pull request #11661 from donaldsharp/bnc_debugs
Donatas Abraitis [Sat, 23 Jul 2022 10:11:32 +0000 (13:11 +0300)]
Merge pull request #11661 from donaldsharp/bnc_debugs

bgpd: LL peers need bnc's per peer

2 years agoMerge pull request #11656 from donaldsharp/some_memory
Donatas Abraitis [Sat, 23 Jul 2022 10:10:59 +0000 (13:10 +0300)]
Merge pull request #11656 from donaldsharp/some_memory

Some memory