]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 years agoisisd: using argv as a string name is categorically wrong
Donald Sharp [Tue, 22 Jun 2021 16:44:24 +0000 (12:44 -0400)]
isisd: using argv as a string name is categorically wrong

We are passing around the system id using the variable name
of `argv`.  Let's name the variable correctly and pass it around
correctly named.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoisisd: already checked for NULL
Donald Sharp [Tue, 22 Jun 2021 16:36:16 +0000 (12:36 -0400)]
isisd: already checked for NULL

in lsp_for_arg we have already checked for NULL and returned
if argv is null.  We do not need to check for it again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8878 from idryzhov/fix-ospf6-neighbor-detail
Russ White [Tue, 22 Jun 2021 15:27:17 +0000 (11:27 -0400)]
Merge pull request #8878 from idryzhov/fix-ospf6-neighbor-detail

ospf6d: fix "show ipv6 ospf6 neighbor" command

3 years agoMerge pull request #8725 from pjdruddy/ospfv3_fair_socket
Russ White [Tue, 22 Jun 2021 14:58:33 +0000 (10:58 -0400)]
Merge pull request #8725 from pjdruddy/ospfv3_fair_socket

OSPFv3 socket rework

3 years agoMerge pull request #8820 from anlancs/master-vtysh-hostname
Russ White [Tue, 22 Jun 2021 14:06:05 +0000 (10:06 -0400)]
Merge pull request #8820 from anlancs/master-vtysh-hostname

doc: add a note of hostname/domainname for vtysh

3 years agoMerge pull request #8869 from leonshaw/master
Russ White [Tue, 22 Jun 2021 13:57:06 +0000 (09:57 -0400)]
Merge pull request #8869 from leonshaw/master

bgpd: Force process networks on VRF creation

3 years agoMerge pull request #8891 from idryzhov/no-vrf-interface
Russ White [Tue, 22 Jun 2021 13:55:11 +0000 (09:55 -0400)]
Merge pull request #8891 from idryzhov/no-vrf-interface

lib: remove vrf-interface config when removing the VRF

3 years agoMerge pull request #8557 from rgirada/ospf_type5_fix
Russ White [Tue, 22 Jun 2021 13:45:27 +0000 (09:45 -0400)]
Merge pull request #8557 from rgirada/ospf_type5_fix

ospfd: External lsa handling in opaque capabilities enable/disable

3 years agoMerge pull request #8334 from ranjanyash54/last_dbdesc
Russ White [Tue, 22 Jun 2021 13:38:21 +0000 (09:38 -0400)]
Merge pull request #8334 from ranjanyash54/last_dbdesc

ospf6d: Release last dbdesc packet after router dead interval

3 years agoMerge pull request #8867 from wesleycoakley/pbr-table-range-single-line
Mark Stapp [Tue, 22 Jun 2021 13:12:02 +0000 (09:12 -0400)]
Merge pull request #8867 from wesleycoakley/pbr-table-range-single-line

tools: make frr-reload recognize `pbr table range` lines as single-line contexts

3 years agoMerge pull request #8892 from idryzhov/fabric-no-instance
Donald Sharp [Tue, 22 Jun 2021 12:09:05 +0000 (08:09 -0400)]
Merge pull request #8892 from idryzhov/fabric-no-instance

fabricd: fix running config

3 years agoospf6d: fix "show ipv6 ospf6 neighbor" command
Igor Ryzhov [Fri, 18 Jun 2021 19:42:49 +0000 (22:42 +0300)]
ospf6d: fix "show ipv6 ospf6 neighbor" command

Simplify the logic and fix processing of "detail" and "drchoice"
arguments.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agofabricd: fix running config
Igor Ryzhov [Mon, 21 Jun 2021 15:12:45 +0000 (18:12 +0300)]
fabricd: fix running config

Daemons should not output warnings into the running config.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: remove vrf-interface config when removing the VRF
Igor Ryzhov [Mon, 21 Jun 2021 15:04:46 +0000 (18:04 +0300)]
lib: remove vrf-interface config when removing the VRF

If we have the following configuration:
```
vrf red
 smth
 exit-vrf
!
interface red vrf red
 smth
```
And we delete the VRF using "no vrf red" command, we end up with:
```
interface red
 smth
```
Interface config is preserved but moved to the default VRF.

This is not an expected behavior. We should remove the interface config
when the VRF is deleted.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: External lsa handling in opaque capabilities enable/disable
rgirada [Sun, 25 Apr 2021 05:40:33 +0000 (22:40 -0700)]
ospfd: External lsa handling in opaque capabilities enable/disable

Description:
When opaque capability disabled/enabled , all the self-originated lsa will be
flushed and it will make the neighbours to renegotiate.
But here, external lsas are not being re-originated after negotiation
Fix:
Refresh/re-originate external lsas(Type-5 and Type-7) explicitly after
re-negotiation.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospf6d: Release last dbdesc packet after router dead interval
Yash Ranjan [Tue, 16 Mar 2021 07:45:23 +0000 (00:45 -0700)]
ospf6d: Release last dbdesc packet after router dead interval

During the database description exchange process, the slave
releases the last dbdesc packet after router_dead_interval.
This was not implemented in the code.
I have written the function ospf6_neighbor_last_dbdesc_release,
which releases the last dbdesc packet after router_dead_interval.
This change was required as per the conformance test 13.11:

In state Full reception of a Database Description packet from
the master after this interval (RouterDeadInterval) will
generate a SeqNumberMismatch neighbor event.

Associated Parameters
  ICMPv6 Packet Listen Time
  ICMPv6 Packet Tolerance Factor
  ICMPv6 Packet Tolerance Time
  OSPFV3 DUT Interface Transmit Delay
  OSPF Reset Adjacencies Timeout
Test Actions
1.
2. 3.
ANVL: Establish full adjacency with DUT for neighbor Rtr-0-A on DIface-0, with DUT as slave.
ANVL: Wait (for <RouterDeadInterval> seconds).
ANVL: Send <OSPF-DD> packet from neighbor Rtr-0-A to DIface-0 con- taining:
• •
I-bit field not set M-bit field not set
MS-bit field set
DD sequence number same as the one last sent by ANVL.

. ANVL: Listen (for upto 2 * <RxmtInterval> seconds) on DIface-0.
5. DUT: Trigger the event SeqNumberMismatch and set the neighbor state for neighbor Rtr-0-A to ExStart.
6. DUT: Send <OSPF-DD> packet.
7. ANVL: Verify that the received <OSPF-DD> packet contains:
• I-bit field set
• M-bit field set
• MS-bit field set.

Test Reference
• RFC 5340, s4.2.1.2 p19 Sending Database Description Packets
  RFC 2328, s10.8 p104 Sending Database Description Packets.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoMerge pull request #8841 from volta-networks/fix_ospf6_bad_seqnum
Donald Sharp [Sat, 19 Jun 2021 16:21:26 +0000 (12:21 -0400)]
Merge pull request #8841 from volta-networks/fix_ospf6_bad_seqnum

ospf6: Drop LSA with bad seqnumber

3 years agoMerge pull request #8868 from ranjanyash54/redistribute_fix
Donald Sharp [Sat, 19 Jun 2021 16:20:04 +0000 (12:20 -0400)]
Merge pull request #8868 from ranjanyash54/redistribute_fix

ospf6d: redistribute command minor fixes

3 years agoMerge pull request #8749 from pjdruddy/bitfield_mtype
Renato Westphal [Sat, 19 Jun 2021 15:16:48 +0000 (12:16 -0300)]
Merge pull request #8749 from pjdruddy/bitfield_mtype

lib: add an MTYPE for bitfields

3 years agoMerge pull request #8822 from dslicenc/frr-reload-mac-acl
Renato Westphal [Sat, 19 Jun 2021 15:16:25 +0000 (12:16 -0300)]
Merge pull request #8822 from dslicenc/frr-reload-mac-acl

tools: add mac access-list context to frr-reload.py

3 years agoMerge pull request #8864 from idryzhov/fix-vtysh-vrf-change
Renato Westphal [Sat, 19 Jun 2021 15:15:40 +0000 (12:15 -0300)]
Merge pull request #8864 from idryzhov/fix-vtysh-vrf-change

lib: fix interface configuration after vrf change

3 years agoMerge pull request #8876 from idryzhov/remove-pure
David Lamparter [Sat, 19 Jun 2021 12:32:43 +0000 (14:32 +0200)]
Merge pull request #8876 from idryzhov/remove-pure

lib: remove pure attribute from functions that modify memory

3 years agobgpd: Force process networks on VRF creation
Xiao Liang [Thu, 17 Jun 2021 04:33:59 +0000 (12:33 +0800)]
bgpd: Force process networks on VRF creation

Force the processing of existing network configurations when VRF is
created, otherwise will be skipped in bgp_static_update().

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
3 years agoMerge pull request #8829 from donaldsharp/last_command
Mark Stapp [Fri, 18 Jun 2021 21:38:44 +0000 (17:38 -0400)]
Merge pull request #8829 from donaldsharp/last_command

zebra: We already store the last command as part of zserv_write

3 years agolib: remove pure attribute from functions that modify memory
Igor Ryzhov [Fri, 18 Jun 2021 10:06:13 +0000 (13:06 +0300)]
lib: remove pure attribute from functions that modify memory

Almost all functions currently marked with pure attribute acquire a
route_node lock. By marking them pure we allow compiler to optimize the
code and not call them when it already knows the return value. This is
completely incorrect.

Only two of eleven functions can be marked as pure. And they still won't
be optimized because they are never called from the same function twice.
Let's remove the ext_pure macro completely to reduce the chance of
repeating this mistake in the future.

Fixes #8866, #8809, #8595, #6992.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6: Drop LSA with bad seqnumber
lynne [Fri, 11 Jun 2021 14:38:42 +0000 (10:38 -0400)]
ospf6: Drop LSA with bad seqnumber

In RFC 2328 seqnumber 0x80000000 is reserved and not used.   If an LSA
is received with seqnumber the LSA is now dropped and a debug error log
is printed.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
3 years agotools: add mac access-list context to frr-reload.py
Don Slice [Wed, 9 Jun 2021 21:17:21 +0000 (14:17 -0700)]
tools: add mac access-list context to frr-reload.py

Problem reported that frr-reload.py didn't handle the mac access-list
command correctly, causing reloads to fail.  This fix adds the
support for the command as a single line context.

Signed-off-by: Don Slice <dslice@nvidia.com>
3 years agotests: use correct metric type and value for OSPFv3 redistributed routes
Igor Ryzhov [Fri, 18 Jun 2021 13:05:01 +0000 (16:05 +0300)]
tests: use correct metric type and value for OSPFv3 redistributed routes

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8478 from mjstapp/fix_nb_grpc_shutdown
Donald Sharp [Fri, 18 Jun 2021 12:52:44 +0000 (08:52 -0400)]
Merge pull request #8478 from mjstapp/fix_nb_grpc_shutdown

lib: stop grpc pthread at shutdown

3 years agozebra: We already store the last command as part of zserv_write
Donald Sharp [Thu, 10 Jun 2021 15:05:26 +0000 (11:05 -0400)]
zebra: We already store the last command as part of zserv_write

when sending nexthop information.  We do not need to reset the
last_write_cmd since that is taken care of in the send routine.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8861 from wesleycoakley/docker-init-rework
Mark Stapp [Fri, 18 Jun 2021 12:33:03 +0000 (08:33 -0400)]
Merge pull request #8861 from wesleycoakley/docker-init-rework

docker: use tini as entrypoint unilaterally

3 years agoMerge pull request #8828 from idryzhov/bgp-routemap-update
Donald Sharp [Fri, 18 Jun 2021 12:25:50 +0000 (08:25 -0400)]
Merge pull request #8828 from idryzhov/bgp-routemap-update

bgpd: fix routemap update with disabled delay timer

3 years agoMerge pull request #8843 from idryzhov/isis-dyn-hostname-cache
Donald Sharp [Fri, 18 Jun 2021 12:20:25 +0000 (08:20 -0400)]
Merge pull request #8843 from idryzhov/isis-dyn-hostname-cache

isisd: per-instance dynamic hostname cache

3 years agoMerge pull request #8839 from volta-networks/fix_ospf6_flags_for_error_logs
Donald Sharp [Fri, 18 Jun 2021 12:18:25 +0000 (08:18 -0400)]
Merge pull request #8839 from volta-networks/fix_ospf6_flags_for_error_logs

ospf6d: move error logs out from behind debug flags

3 years agoMerge pull request #8846 from ton31337/fix/some_code_cleanups
Donald Sharp [Fri, 18 Jun 2021 12:12:01 +0000 (08:12 -0400)]
Merge pull request #8846 from ton31337/fix/some_code_cleanups

bgpd: A couple of cleanups

3 years agoMerge pull request #8865 from idryzhov/isis-fixes
Donald Sharp [Fri, 18 Jun 2021 12:06:01 +0000 (08:06 -0400)]
Merge pull request #8865 from idryzhov/isis-fixes

a couple of isis fixes

3 years agoospf6d: Set metric from default values when route-map metric not present
Yash Ranjan [Wed, 2 Jun 2021 12:45:18 +0000 (05:45 -0700)]
ospf6d: Set metric from default values when route-map metric not present

For redistribute commands if route map is set, then route takes it's metric
values from the route map. But in the case that routemap is set but the
metric for the route map is not, then the route metric is set to type-1.

Check if the metric is set for the routemap. If not then set it as per
redistributed default values (type 2)

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoospf6d: Change the default metric parameter for redistribute
Yash Ranjan [Mon, 24 May 2021 10:44:12 +0000 (03:44 -0700)]
ospf6d: Change the default metric parameter for redistribute

The default values will be set at the time of ospf6_redist_add
similar to ospfv2. Hence the default values will change as well.
Default metric type = E2
Default metic value = 20

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agotests: Modify topotests to include write-multiplier config
Pat Ruddy [Tue, 25 May 2021 09:39:03 +0000 (10:39 +0100)]
tests: Modify topotests to include write-multiplier config

Modify both the default and vrf ospf6 topologies to include a test
where write-multiplier is configured to a non-default value and
the ospf6 neighbors are reset then checked.
Run black on both test files.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agodoc: add OSPF[6] write-multiplier to docs
Pat Ruddy [Thu, 6 May 2021 11:59:52 +0000 (12:59 +0100)]
doc: add OSPF[6] write-multiplier to docs

Add documentation for write-muliplier to both OSPF and OSPF6 docs

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: add write-multiplier configuration
Pat Ruddy [Thu, 6 May 2021 10:39:58 +0000 (11:39 +0100)]
ospf6d: add write-multiplier configuration

allow amount of work done by read and write threads in a single
invocation to be tuned to between 1 and 100 packets (default 20)

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: add warning log for late hello packets
Pat Ruddy [Tue, 13 Apr 2021 09:37:51 +0000 (10:37 +0100)]
ospf6d: add warning log for late hello packets

On transmit and receive calculate the time since the last hello was seen
and log a warning if it is late by more than the hello period.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: add lsupdate messages to tx fifo
Pat Ruddy [Thu, 18 Mar 2021 14:39:36 +0000 (14:39 +0000)]
ospf6d: add lsupdate messages to tx fifo

queue outgoing lsupdate messages to the interface tx FIFO and schedule
the ospf_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: add lsack messages to tx fifo
Pat Ruddy [Wed, 17 Mar 2021 14:42:01 +0000 (14:42 +0000)]
ospf6d: add lsack messages to tx fifo

queue outgoing lsack messages to the interface tx FIFO and schedule
the ospf_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: add lsreq messages to tx fifo
Pat Ruddy [Mon, 15 Mar 2021 18:17:02 +0000 (18:17 +0000)]
ospf6d: add lsreq messages to tx fifo

queue outgoing lsreq messages to the interface tx FIFO and schedule
the ospf_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: add dbdesc messages to tx FIFO
Pat Ruddy [Fri, 12 Mar 2021 10:58:22 +0000 (10:58 +0000)]
ospf6d: add dbdesc messages to tx FIFO

enqueue outgoing dbdesc messages to the end of the tx FIFO and
schedule the ospf6_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: add hello messages to tx fifo
Pat Ruddy [Fri, 12 Mar 2021 10:56:28 +0000 (10:56 +0000)]
ospf6d: add hello messages to tx fifo

queue outgoing hello messages to the interface tx FIFO and schedule
the ospf_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: add packet apis
Pat Ruddy [Wed, 10 Mar 2021 18:40:14 +0000 (18:40 +0000)]
ospf6d: add packet apis

Add APIs to create, queue and dequeue OSPFv3 packets

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: add tx fifo infrastructure
Pat Ruddy [Wed, 10 Mar 2021 17:59:07 +0000 (17:59 +0000)]
ospf6d: add tx fifo infrastructure

Add per interface fifo and per instance write list as a precursor
to implementing fairer sharing of the ospf6 oscket resources.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: read ospf6 socket until failure
Pat Ruddy [Wed, 3 Mar 2021 11:59:30 +0000 (11:59 +0000)]
ospf6d: read ospf6 socket until failure

To ensure we read all the datagrams availabe from a socket when the
read task is scheduled, make the read helper return and error or
continue enum and loop unitl an error is received.
This requires the read from the socket to be non blocking

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: create an ospf_read_helper function
Pat Ruddy [Wed, 3 Mar 2021 11:17:38 +0000 (11:17 +0000)]
ospf6d: create an ospf_read_helper function

Take the contents of ospf6_receive and split the funtionality that
deals with a single packet receipt and place it in a separate helper
function.
This is the first step in a refactor process to allow the ospf6_read
task to read until failure.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agolib: add an MTYPE for bitfields
Pat Ruddy [Wed, 26 May 2021 11:25:46 +0000 (12:25 +0100)]
lib: add an MTYPE for bitfields

it is handy to be able to see allocated bitfields in the show
memory output.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agolib: fix interface configuration after vrf change
Igor Ryzhov [Wed, 16 Jun 2021 11:07:30 +0000 (14:07 +0300)]
lib: fix interface configuration after vrf change

This commit fixes the following problem:

- enter the interface node
- move the interface to another VRF
- try to continue configuring the interface

It is not possible to continue configuration because the XPath stored in
the vty doesn't correspond with the actual state of the system anymore.

For example:
```
nfware# conf
nfware(config)# interface enp2s0

<-- move the enp2s0 to a different VRF -->

nfware(config-if)# ip router isis 1
% Failed to get iface dnode in candidate DB
```

To fix the issue, go through all connected vty shells and update the
stored XPath.

Suggested-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisis: fix double-adding a circuit to the area
Igor Ryzhov [Wed, 16 Jun 2021 12:54:17 +0000 (15:54 +0300)]
isis: fix double-adding a circuit to the area

isis_circuit_enable can be called for an already enabled circuit. In this
case we would add the circuit to the area multiple times.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix adding a circuit to the wrong area
Igor Ryzhov [Wed, 16 Jun 2021 12:52:14 +0000 (15:52 +0300)]
isisd: fix adding a circuit to the wrong area

When creating a new area, we're adding all circuits in the same VRF to
this area. We should only add circuits configured with the same tag.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8874 from idryzhov/ospf-routemap-fix
Jafar Al-Gharaibeh [Thu, 17 Jun 2021 23:27:23 +0000 (18:27 -0500)]
Merge pull request #8874 from idryzhov/ospf-routemap-fix

ospfd: fix routemap update

3 years agoospfd: fix routemap update
Igor Ryzhov [Thu, 17 Jun 2021 16:31:03 +0000 (19:31 +0300)]
ospfd: fix routemap update

Currently, if the routemap already exists, we delete the pointer to it
when it is updated. We should delete the pointer only if the route-map
is actually deleted.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: Do not double-assign freed pointer to NULL
Donatas Abraitis [Sun, 13 Jun 2021 18:44:06 +0000 (21:44 +0300)]
lib: Do not double-assign freed pointer to NULL

It's already done by XFREE.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Drop return for void bgp_evpn_show_routes_mac_ip_es()
Donatas Abraitis [Fri, 11 Jun 2021 15:58:21 +0000 (18:58 +0300)]
bgpd: Drop return for void bgp_evpn_show_routes_mac_ip_es()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Do not test for bgp_path_info in rfapiCopyUnEncap2VPN()
Donatas Abraitis [Fri, 11 Jun 2021 15:44:01 +0000 (18:44 +0300)]
bgpd: Do not test for bgp_path_info in rfapiCopyUnEncap2VPN()

Already checked.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Remove double test against rfapi which is already checked
Donatas Abraitis [Fri, 11 Jun 2021 15:43:14 +0000 (18:43 +0300)]
bgpd: Remove double test against rfapi which is already checked

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Do not check against aspath `seg` which is already checked before
Donatas Abraitis [Fri, 11 Jun 2021 15:37:50 +0000 (18:37 +0300)]
bgpd: Do not check against aspath `seg` which is already checked before

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Remove redundand check against BGP_EVPNES_EVI_LOCAL flag
Donatas Abraitis [Fri, 11 Jun 2021 15:31:26 +0000 (18:31 +0300)]
bgpd: Remove redundand check against BGP_EVPNES_EVI_LOCAL flag

It's already checked earlier at bgp_evpn_local_es_evi_do_del()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Avoid dereferencing EVPN ES if NULL
Donatas Abraitis [Fri, 11 Jun 2021 15:23:43 +0000 (18:23 +0300)]
bgpd: Avoid dereferencing EVPN ES if NULL

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Remove double check against match_packet_length_num
Donatas Abraitis [Fri, 11 Jun 2021 15:18:59 +0000 (18:18 +0300)]
bgpd: Remove double check against match_packet_length_num

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Do not test against bdc again since we already validated
Donatas Abraitis [Fri, 11 Jun 2021 15:14:27 +0000 (18:14 +0300)]
bgpd: Do not test against bdc again since we already validated

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Remove useless reuselist_node assignment before while loop
Donatas Abraitis [Fri, 11 Jun 2021 15:09:05 +0000 (18:09 +0300)]
bgpd: Remove useless reuselist_node assignment before while loop

Seems really not necessary pointing to initial value before while loop, where
it's assigned anyway.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotools: reload recognizes `pbr table range` as single-line ctx
Wesley Coakley [Thu, 17 Jun 2021 00:34:30 +0000 (20:34 -0400)]
tools: reload recognizes `pbr table range` as single-line ctx

The line `pbr table range ...` does not start a new context so treat it
like a single-line context

Signed-off-by: Wesley Coakley <w@wesleycoakley.com>
3 years agoMerge pull request #8856 from LabNConsulting/chopps/topo-valgrind
Quentin Young [Wed, 16 Jun 2021 18:57:25 +0000 (18:57 +0000)]
Merge pull request #8856 from LabNConsulting/chopps/topo-valgrind

3 years agoMerge pull request #8770 from gpnaveen/ospfv3_basic_functionality
Russ White [Wed, 16 Jun 2021 13:09:57 +0000 (09:09 -0400)]
Merge pull request #8770 from gpnaveen/ospfv3_basic_functionality

tests: Adding ospfv3 basic functionality test cases

3 years agotests: add valgrind memleaks run options and detection
Christian Hopps [Sat, 12 Jun 2021 09:07:24 +0000 (09:07 +0000)]
tests: add valgrind memleaks run options and detection

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agodocker: Use tini unilaterally and stop tailing /dev/null
Wesley Coakley [Wed, 9 Jun 2021 03:50:43 +0000 (23:50 -0400)]
docker: Use tini unilaterally and stop tailing /dev/null

tini is a hyper-minimal PID 0 which spawns a child process (watchfrr.sh
in our case), reaps zombies and forwards signals to the script. Starting
watchfrr.sh directly instead of through the old `tail /dev/null` or
`sleep 365d` helps keep things clean too :)

While tini was previously only used in the Alpine container it is useful
to apply this PID 0 to all containers except the special CI ones.

Fixes: #8788
Signed-off-by: Wesley Coakley <w@wesleycoakley.com>
3 years agotests: Adding ospfv3 basic functionality test cases
nguggarigoud [Tue, 1 Jun 2021 03:22:59 +0000 (20:22 -0700)]
tests: Adding ospfv3 basic functionality test cases

1. Adding  APIs to configure and verify ospfv3.
2. Adding ospfv3 base functionality testcase.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agoMerge pull request #8851 from opensourcerouting/ospf6-linkstateid-json
Quentin Young [Tue, 15 Jun 2021 15:50:38 +0000 (15:50 +0000)]
Merge pull request #8851 from opensourcerouting/ospf6-linkstateid-json

ospf6d: Link state ID in LSA database JSON output

3 years agolib: cleanup and stop grpc pthread
Mark Stapp [Mon, 7 Jun 2021 17:55:11 +0000 (13:55 -0400)]
lib: cleanup and stop grpc pthread

At shutdown, try to stop the grpc module and its
dedicated pthread cleanly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #8833 from donaldsharp/zapi_message_count
Russ White [Tue, 15 Jun 2021 15:05:15 +0000 (11:05 -0400)]
Merge pull request #8833 from donaldsharp/zapi_message_count

Zapi message count

3 years agoMerge pull request #8814 from kuldeepkash/topojson_framework
Martin Winter [Tue, 15 Jun 2021 15:03:57 +0000 (17:03 +0200)]
Merge pull request #8814 from kuldeepkash/topojson_framework

tests: Fixing common pylint error for topojson

3 years agoMerge pull request #8821 from anlancs/master-fix-doc-domainname
Russ White [Tue, 15 Jun 2021 15:03:48 +0000 (11:03 -0400)]
Merge pull request #8821 from anlancs/master-fix-doc-domainname

doc: add a note of domainname

3 years agoMerge pull request #8838 from LabNConsulting/chopps/fix-nb-edit-cli
Igor Ryzhov [Tue, 15 Jun 2021 09:18:29 +0000 (12:18 +0300)]
Merge pull request #8838 from LabNConsulting/chopps/fix-nb-edit-cli

lib: do not attempt to create default nodes from NULL tree node

3 years agoospf6d: move error logs out from behind debug flags
lynne [Fri, 11 Jun 2021 13:53:23 +0000 (09:53 -0400)]
ospf6d: move error logs out from behind debug flags

The logging in ospf6 is very verbose.  If you turn on logging on a scaled
system you get too many logs.   The problem is that there are some errors
that occur that are hidden behind the debug flags, and to see these errors
we currently need to turn on the debug logging.  This change converts these
error logs to warnings and removes the debug flags.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
3 years agoMerge pull request #8836 from ton31337/fix/generalize_bgp_dest_locks
Renato Westphal [Mon, 14 Jun 2021 13:11:17 +0000 (10:11 -0300)]
Merge pull request #8836 from ton31337/fix/generalize_bgp_dest_locks

bgpd: Call bgp_dest_unlock_node() inside bgp_adj_in_remove()

3 years agoMerge pull request #8844 from sworleys/Term-Default-VRF-Last
Renato Westphal [Mon, 14 Jun 2021 13:05:52 +0000 (10:05 -0300)]
Merge pull request #8844 from sworleys/Term-Default-VRF-Last

lib: terminate default vrf last

3 years agoospf6d: Link state ID in LSA database JSON output
David Schweizer [Mon, 14 Jun 2021 06:41:10 +0000 (08:41 +0200)]
ospf6d: Link state ID in LSA database JSON output

Added link state ID to JSON output of LSA database.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
3 years agolib: do not attempt to create default nodes from NULL tree node
Christian Hopps [Fri, 11 Jun 2021 13:18:24 +0000 (13:18 +0000)]
lib: do not attempt to create default nodes from NULL tree node

Perform same NULL check for dependent node creation code too.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agolib: terminate default vrf last
Stephen Worley [Thu, 10 Jun 2021 20:52:35 +0000 (16:52 -0400)]
lib: terminate default vrf last

Always terminate default VRF last during FRR shutdown.

On shutdown we were simply looping over the RB tree and terminating
VRFs from the ROOT. This is not guaranteed to be the default last ever.

Instead switch to RB_SAFE and skip the default VRF till the very end.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
3 years agoisisd: per-instance dynamic hostname cache
Igor Ryzhov [Fri, 11 Jun 2021 15:27:46 +0000 (18:27 +0300)]
isisd: per-instance dynamic hostname cache

Currently, the dynamic hostname cache is global. It is incorrect because
neighbors in different VRFs may have the same system ID and different
hostnames.

This also fixes a memory leak - when the instance is deleted, the cache
must be cleaned up and the cleanup thread must be cancelled.

Fixes #8832.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8831 from sworleys/Fix-No-Ospf-Func
Igor Ryzhov [Fri, 11 Jun 2021 08:33:13 +0000 (11:33 +0300)]
Merge pull request #8831 from sworleys/Fix-No-Ospf-Func

ospf6d: fix undefined function

3 years agobgpd: Call bgp_dest_unlock_node() inside bgp_adj_in_remove()
Donatas Abraitis [Fri, 11 Jun 2021 06:17:05 +0000 (09:17 +0300)]
bgpd: Call bgp_dest_unlock_node() inside bgp_adj_in_remove()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agozebra: Move individual lines to table in `show zebra client` command
Donald Sharp [Fri, 11 Jun 2021 00:21:26 +0000 (20:21 -0400)]
zebra: Move individual lines to table in `show zebra client` command

Move some individual add/delete lines to the table format in
the `show zebra client` command

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Add message counts for `show zebra client`
Donald Sharp [Fri, 11 Jun 2021 00:18:04 +0000 (20:18 -0400)]
zebra: Add message counts for `show zebra client`

There were counters FRR was keeping but never displaying.  Add them
in.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: fix undefined function
Stephen Worley [Thu, 10 Jun 2021 21:39:56 +0000 (17:39 -0400)]
ospf6d: fix undefined function

Some wires got crossed during a couple merges using/changing
this function.

Update it to its new name.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
3 years agoMerge pull request #8823 from donaldsharp/ospfv3_coverity
Rafael Zalamena [Thu, 10 Jun 2021 18:13:11 +0000 (15:13 -0300)]
Merge pull request #8823 from donaldsharp/ospfv3_coverity

Ospfv3 coverity

3 years agobgpd: fix routemap update with disabled delay timer
Igor Ryzhov [Thu, 10 Jun 2021 17:21:51 +0000 (20:21 +0300)]
bgpd: fix routemap update with disabled delay timer

- vnc_routemap_update is called only for the last bgp instance
- vpn_policy_routemap_event is not called at all
- unguarded debug (there's already a debug inside the called function)

Make the code consistent with the callback code that is used when the
delay timer is enabled.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8691 from louis-oui/split-soft-reconfig
Donald Sharp [Thu, 10 Jun 2021 16:04:54 +0000 (12:04 -0400)]
Merge pull request #8691 from louis-oui/split-soft-reconfig

bgpd: split soft reconfig table task into several jobs to not block vtysh

3 years agoMerge pull request #8561 from opensourcerouting/msdp-refactor-v2
Donald Sharp [Thu, 10 Jun 2021 13:44:28 +0000 (09:44 -0400)]
Merge pull request #8561 from opensourcerouting/msdp-refactor-v2

pimd: rework MSDP mesh groups

3 years agoMerge pull request #8733 from idryzhov/ipv6-ospf6-area
Rafael Zalamena [Thu, 10 Jun 2021 13:34:45 +0000 (10:34 -0300)]
Merge pull request #8733 from idryzhov/ipv6-ospf6-area

ospf6d: fix interface area configuration

3 years agoospf6d: Rename ospf6_is_router_abr to more accurately reflect what it does
Donald Sharp [Thu, 10 Jun 2021 11:59:06 +0000 (07:59 -0400)]
ospf6d: Rename ospf6_is_router_abr to more accurately reflect what it does

The ospf6_is_router_abr is checking to see if ospfv3 is an abr router
and also setting values.  Let's rename it too `ospf6_check_and_set_router_abr`
to more accurately reflect what it is doing.

Additionally fix coverity #1505176 where we were not checking the return
value of ospf6_is_router_abr like we did every other time.  In this
case we don't care about the return value so indicate that we do not.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: Fix coverity Possible null deref
Donald Sharp [Thu, 10 Jun 2021 11:46:36 +0000 (07:46 -0400)]
ospf6d: Fix coverity Possible null deref

There exists a code path where ospf6 could be NULL and passing
to a function where it would always be derefed is a bad idea.

Put some small code in place to prevent this and allow this to be debuged
if it happens in the future.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agodoc: add a note of domainname
anlancs [Thu, 10 Jun 2021 01:36:19 +0000 (09:36 +0800)]
doc: add a note of domainname

Signed-off-by: anlancs <anlan_cs@tom.com>
3 years agoMerge pull request #8754 from louis-oui/bgp-summary-filter
Donatas Abraitis [Thu, 10 Jun 2021 06:58:31 +0000 (09:58 +0300)]
Merge pull request #8754 from louis-oui/bgp-summary-filter

bgpd: improve show bgp summary display