]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #7241 from chiragshah6/evpn_dev1
Renato Westphal [Wed, 7 Oct 2020 14:50:52 +0000 (11:50 -0300)]
Merge pull request #7241 from chiragshah6/evpn_dev1

lib: add errmsg to nb rpc

4 years agoMerge pull request #7250 from ckishimo/typos
Donatas Abraitis [Wed, 7 Oct 2020 11:43:09 +0000 (14:43 +0300)]
Merge pull request #7250 from ckishimo/typos

ospfd: fix typos

4 years agoospfd: fix typos
ckishimo [Tue, 6 Oct 2020 18:07:53 +0000 (11:07 -0700)]
ospfd: fix typos

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
4 years agoMerge pull request #7246 from mjstapp/fix_bgp_nb_sa
Donatas Abraitis [Wed, 7 Oct 2020 06:46:15 +0000 (09:46 +0300)]
Merge pull request #7246 from mjstapp/fix_bgp_nb_sa

bgpd: fix SA warnings in bgp northbound

4 years agoMerge pull request #7239 from opensourcerouting/bgp-aggregate-med
Donatas Abraitis [Wed, 7 Oct 2020 06:44:30 +0000 (09:44 +0300)]
Merge pull request #7239 from opensourcerouting/bgp-aggregate-med

bgpd: aggregate-address on matching MED only

4 years agoMerge pull request #7248 from donaldsharp/revert_7113
Russ White [Tue, 6 Oct 2020 14:51:22 +0000 (10:51 -0400)]
Merge pull request #7248 from donaldsharp/revert_7113

Revert "bgpd: allow bestpath to handle mutliple locally-originated pa…

4 years agoRevert "bgpd: allow bestpath to handle mutliple locally-originated paths"
Donald Sharp [Tue, 6 Oct 2020 14:43:09 +0000 (10:43 -0400)]
Revert "bgpd: allow bestpath to handle mutliple locally-originated paths"

This reverts commit 82a843fa3df4adff6d2eaffbaba96eb136fcaebb.

4 years agoMerge pull request #7202 from gromit1811/proposed_fix_7030
Olivier Dugeon [Tue, 6 Oct 2020 14:42:41 +0000 (16:42 +0200)]
Merge pull request #7202 from gromit1811/proposed_fix_7030

ospf6d: Fix flooding of old copies of self-originated LSAs

4 years agoMerge pull request #7113 from donaldsharp/bgp_bestpath_origin
Russ White [Tue, 6 Oct 2020 14:41:31 +0000 (10:41 -0400)]
Merge pull request #7113 from donaldsharp/bgp_bestpath_origin

bgpd: allow bestpath to handle mutliple locally-originated paths

4 years agotests: bgp_l3vpn_to_bgp_vrf - verify details of exported/imported routes
Lou Berger [Thu, 1 Oct 2020 12:55:32 +0000 (08:55 -0400)]
tests: bgp_l3vpn_to_bgp_vrf - verify details of exported/imported routes

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agotests: bgp_l3vpn_to_bgp_vrf - change 1 route to have equal metrics
Lou Berger [Wed, 30 Sep 2020 14:50:57 +0000 (10:50 -0400)]
tests: bgp_l3vpn_to_bgp_vrf - change 1 route to have equal metrics

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agotests: bgp_l3vpn_to_bgp_vrf - add bestpath checks
Lou Berger [Wed, 30 Sep 2020 04:09:46 +0000 (00:09 -0400)]
tests: bgp_l3vpn_to_bgp_vrf - add bestpath checks

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agotests: lib/bgprib.py - add bestpath checks and logging to lu log file
Lou Berger [Wed, 30 Sep 2020 04:09:04 +0000 (00:09 -0400)]
tests: lib/bgprib.py - add bestpath checks and logging to lu log file

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agotests: bgp_l3vpn_to_bgp_vrf - add redundant ce routes
Lou Berger [Tue, 29 Sep 2020 18:23:32 +0000 (14:23 -0400)]
tests: bgp_l3vpn_to_bgp_vrf - add redundant ce routes

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agobgpd: allow bestpath to handle mutliple locally-originated paths
Donald Sharp [Wed, 16 Sep 2020 19:04:16 +0000 (15:04 -0400)]
bgpd: allow bestpath to handle mutliple locally-originated paths

Current code in bgp bestpath selection would accept the newest
locally originated path as the best path.  Making the selection
non-deterministic.  Modify the code to always come to the
same bestpath conclusion when you have multiple locally originated
paths in bestpath selection.

Before:

eva# conf
eva(config)# router bgp 323
eva(config-router)# address-family ipv4 uni
eva(config-router-af)# redistribute connected
eva(config-router-af)# network 192.168.161.0/24
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #1, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
      Last update: Wed Sep 16 15:03:03 2020
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin incomplete, metric 0, weight 32768, valid, sourced
      Last update: Wed Sep 16 15:02:52 2020
eva(config-router-af)# no redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (First path received)
      Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#  redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #2, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin incomplete, metric 0, weight 32768, valid, sourced
      Last update: Wed Sep 16 15:03:32 2020
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
      Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#

Notice the route choosen depends on order received

Fixed behavior:

eva# conf
eva(config)# router bgp 323
eva(config-router)# address-family ipv4 uni
eva(config-router-af)# redistribute connected
eva(config-router-af)# network 192.168.161.0/24
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #1, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
      Last update: Wed Sep 16 15:03:03 2020
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin incomplete, metric 0, weight 32768, valid, sourced
      Last update: Wed Sep 16 15:02:52 2020
eva(config-router-af)# no redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (First path received)
      Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#  redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #2, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin incomplete, metric 0, weight 32768, valid, sourced
      Last update: Wed Sep 16 15:03:32 2020
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
      Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#

Ticket: CM-31490
Found-by: Trey Aspelund <taspelund@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #6725 from donaldsharp/6712
Russ White [Tue, 6 Oct 2020 14:26:34 +0000 (10:26 -0400)]
Merge pull request #6725 from donaldsharp/6712

PIM MSDP cleanup code and commits a bit

4 years agoMerge pull request #7238 from sworleys/Nexthop-Same-First-Remove
Mark Stapp [Tue, 6 Oct 2020 12:33:35 +0000 (08:33 -0400)]
Merge pull request #7238 from sworleys/Nexthop-Same-First-Remove

lib: remove nexthop_same_firsthop() api

4 years agoMerge pull request #7214 from donaldsharp/more_vrf_usefulness
Mark Stapp [Tue, 6 Oct 2020 12:29:45 +0000 (08:29 -0400)]
Merge pull request #7214 from donaldsharp/more_vrf_usefulness

zebra: cleanup zebra_rnh.c debugs

4 years agobgpd: fix SA warnings in bgp northbound
Mark Stapp [Tue, 6 Oct 2020 12:18:59 +0000 (08:18 -0400)]
bgpd: fix SA warnings in bgp northbound

Fix a couple of new SA warnings in the new bgp northbound.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: MSDP SA forwarding
Adriano Marto Reis [Fri, 10 Jul 2020 03:59:40 +0000 (13:59 +1000)]
doc: MSDP SA forwarding

Updating the documentation.

Signed-off-by: Adriano Reis <areis@barrukka.local>
4 years agopimd: MSDP SA forwarding
Adriano Marto Reis [Thu, 9 Jul 2020 22:56:24 +0000 (08:56 +1000)]
pimd: MSDP SA forwarding

* If the MSDP peer receives the SA from a non-RPF peer towards the
originating RP, it will drop the message.
* SA messages are forwarded away from the RP address only.
* SA messages are not forwarded within the mesh group.
* Preventing the MSDP connection from being dropped due to RPF check
failure (RFC3618, section 13 "MSDP Error Handling")

Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
Signed-off-by: Adriano Reis <areis@barrukka.local>
4 years agotopotests: test aggregate-address matching-MED-only
Rafael Zalamena [Fri, 2 Oct 2020 14:59:50 +0000 (11:59 -0300)]
topotests: test aggregate-address matching-MED-only

Add a new topology test for `aggregate-address` to test
`matching-MED-only` and its combination with `summary-only`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: new aggregate address option
Rafael Zalamena [Thu, 1 Oct 2020 17:57:41 +0000 (14:57 -0300)]
doc: new aggregate address option

Document the newly implemented aggregate address configuration option.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobgpd: aggregate address matching-MED-only
Rafael Zalamena [Fri, 2 Oct 2020 18:47:17 +0000 (15:47 -0300)]
bgpd: aggregate address matching-MED-only

Add code to handle MED matching:

- When MED matches act as normal.

- When MED doesn't match do the following:

  * Uninstall the aggregate route
  * Unsuppress routes (if using summary-only)

- When MED didn't match, but now matches:

  * Install the aggregate route
  * Suppress all routes (if using summary-only)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agozebra: display rpc error msg to vtysh
Chirag Shah [Sat, 3 Oct 2020 23:12:31 +0000 (16:12 -0700)]
zebra: display rpc error msg to vtysh

Zebra's clear duplicate detect command is rpc converted.
There is condition where cli fails with human readable message.
Using northboun's errmsg buffer to display error message to
user.

Testing:

bharat# clear evpn dup-addr vni 1002 ip 2011:11::11
Error type: generic error
Error description: Requested IP's associated MAC aa:aa:aa:aa:aa:aa is still in duplicate state

bharat# clear evpn dup-addr vni 1002 ip 11.11.11.11
Error type: generic error
Error description: Requested IP's associated MAC aa:aa:aa:aa:aa:aa is still in duplicate state

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years ago*: add errmsg to nb rpc
Chirag Shah [Sat, 3 Oct 2020 22:34:33 +0000 (15:34 -0700)]
*: add errmsg to nb rpc

Display human readable error message in northbound rpc
transaction failure. In case of vtysh nb client, the error
message will be displayed to user.

Testing:

bharat# clear evpn dup-addr vni 1002 ip 11.11.11.11
Error type: generic error
Error description: Requested IP's associated MAC aa:aa:aa:aa:aa:aa is still
in duplicate state

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agoMerge pull request #6904 from chiragshah6/yang_nb6
Santosh P K [Mon, 5 Oct 2020 16:23:39 +0000 (21:53 +0530)]
Merge pull request #6904 from chiragshah6/yang_nb6

lib, bgpd: Convert global configurations to transactional cli

4 years agoMerge pull request #7124 from volta-networks/fix_ldp_sync_isis_nb
Renato Westphal [Mon, 5 Oct 2020 16:04:15 +0000 (13:04 -0300)]
Merge pull request #7124 from volta-networks/fix_ldp_sync_isis_nb

isisd: fix coverity errors in isis ldp-sync commands

4 years agoMerge pull request #7219 from donaldsharp/rib_fixes
Mark Stapp [Mon, 5 Oct 2020 13:11:50 +0000 (09:11 -0400)]
Merge pull request #7219 from donaldsharp/rib_fixes

Rib fixes

4 years agoMerge pull request #7242 from rsmarples/SO_RERROR
Donald Sharp [Mon, 5 Oct 2020 10:35:38 +0000 (06:35 -0400)]
Merge pull request #7242 from rsmarples/SO_RERROR

BSD: Detect route(4) overflows

4 years agoBSD: Add whitespace between declaration and code
Roy Marples [Mon, 5 Oct 2020 07:10:42 +0000 (08:10 +0100)]
BSD: Add whitespace between declaration and code

Signed-off-by: Roy Marples <roy@marples.name>
4 years agobgpd: simplify aggregate address commands
Rafael Zalamena [Thu, 1 Oct 2020 13:35:52 +0000 (10:35 -0300)]
bgpd: simplify aggregate address commands

Use `DEFPY` instead of `DEFUN` to remove duplicated code.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #7237 from opensourcerouting/topoextcircid
Donald Sharp [Sun, 4 Oct 2020 23:16:06 +0000 (19:16 -0400)]
Merge pull request #7237 from opensourcerouting/topoextcircid

tests: Skip comparing neighbor-extended-circuit-id in yang output.

4 years agoBSD: Detect route(4) overflows
Roy Marples [Sun, 4 Oct 2020 19:32:26 +0000 (20:32 +0100)]
BSD: Detect route(4) overflows

NetBSD and DragonFlyBSD support reporting of route(4) overflows
by setting the socket option SO_RERROR.

This is handled the same as on Linux by exiting with a -1 error code.

Signed-off-by: Roy Marples <roy@marples.name>
4 years agobgpd: no router bgp check candidate config
Chirag Shah [Thu, 17 Sep 2020 21:20:44 +0000 (14:20 -0700)]
bgpd: no router bgp check candidate config

For `no router bgp` without ASN check candidate
config for default bgp instance presence to avoid
failure from checking backend db where bgp instance
may not be created.
This situation can be seen in transactional cli mode
with following config.

bharat(config)# router bgp 101
bharat(config-router)# exit
bharat(config)# no router bgp
% No BGP process is configured
bharat(config)# no router bgp
% No BGP process is configured
bharat(config)#

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agobgpd: move router bgp nb callback
Chirag Shah [Sun, 20 Sep 2020 15:13:53 +0000 (08:13 -0700)]
bgpd: move router bgp nb callback

move `router bgp` nb callback at `bgp` node level
to have access to bgp context at neighbor and peer-group
level and align create/destroy callbacks call during
no router bgp.

Earlier `no router bgp` is performed first global destroy
callback is called which essentially removes `bgp context`
then it calls to remove (parallel nodes) neighbor and peer-group
which does not have access to bgp context.
Moving router bgp at bgp solves this destroy callback ordering issue.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agobgpd: correct bgp global context
Chirag Shah [Wed, 16 Sep 2020 17:28:11 +0000 (10:28 -0700)]
bgpd: correct bgp global context

Move bgp (router bgp) context at "bgp" node
level from (instead of) "global" level.
This change allows access of bgp context at neighbor
and peer-group node levels.

    +--rw bgp   <--- (store `struct bgp` at bgp node xpath)
       +--rw global!
       |    ...
       |  +--rw afi-safis
       |    ...
       +--rw neighbors
       |  +--rw neighbor* [remote-address]
       |    ...
       |  |  +--rw afi-safis
       |    ...
       |  +--rw unnumbered-neighbor* [interface]
       |    ...
       +--rw peer-groups
          +--rw peer-group* [peer-group-name]
            ...

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agobgpd: shorten northbound callback names
Chirag Shah [Wed, 26 Aug 2020 17:50:40 +0000 (10:50 -0700)]
bgpd: shorten northbound callback names

Omit routing protocol augment name from callbacks name.

(Omitted: routing_control_plane_protocols_control_plane_protocol_)

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agotests: add bgp yang module registery to attr test
Chirag Shah [Wed, 19 Aug 2020 21:04:21 +0000 (14:04 -0700)]
tests: add bgp yang module registery to attr test

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agotests/bgpd: initialized candidate_config to vtysh
Chirag Shah [Tue, 18 Aug 2020 18:55:51 +0000 (11:55 -0700)]
tests/bgpd: initialized candidate_config to vtysh

In test_peer_attr.c test is initializd with vty handler
but candiate_config is not set.

northbound converted bgp cli expects to derefence the
candidate_config field which leads to crash.

(gdb) p *test->vty->candidate_config
$9 = {dnode = 0x0, version = 0}

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agobgpd: register nb routing hook
Chirag Shah [Mon, 17 Aug 2020 00:59:13 +0000 (17:59 -0700)]
bgpd: register nb routing hook

On bgpd bootstrap register routing hook which ensures
only single bgp named instance created per vrf routing
hierarchy.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agobgpd: convert global config to transactional cli
Chirag Shah [Wed, 12 Aug 2020 20:30:24 +0000 (13:30 -0700)]
bgpd: convert global config to transactional cli

Convert global congigurations clis to transactional
clis using northbound plugin callbacks.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agobgpd: register northbound callbacks to bootstrap
Chirag Shah [Wed, 12 Aug 2020 05:14:07 +0000 (22:14 -0700)]
bgpd: register northbound callbacks to bootstrap

Register bgpd northbound callbacks to bgp daemon
bootstrap.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agolib: increase the size of northbound max module
Chirag Shah [Wed, 12 Aug 2020 04:31:53 +0000 (21:31 -0700)]
lib: increase the size of northbound max module

Increase the size of frr_yang_module_info
macro to accomodate bgp module list.

root@bharat:~/stash/frr# egrep "xpath" bgpd/bgp_nb.c | wc -l
1150

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agobgpd: bgp northbound callbacks prototypes
Chirag Shah [Wed, 12 Aug 2020 02:14:36 +0000 (19:14 -0700)]
bgpd: bgp northbound callbacks prototypes

This commit contains splitting of auto-generated bgp northbound callbacks
into separate files.
Include the files into bgp makefile.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years ago*: add bgp yang files into makefiles
Chirag Shah [Thu, 23 Jul 2020 18:40:18 +0000 (11:40 -0700)]
*: add bgp yang files into makefiles

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agoMerge pull request #6882 from vishaldhingra/static
Donald Sharp [Sat, 3 Oct 2020 03:52:53 +0000 (23:52 -0400)]
Merge pull request #6882 from vishaldhingra/static

staticd : Added the warning log for route when VRF is not ready.

4 years agoMerge pull request #7225 from idryzhov/vtysh-fix-domainname
Donald Sharp [Fri, 2 Oct 2020 22:15:26 +0000 (18:15 -0400)]
Merge pull request #7225 from idryzhov/vtysh-fix-domainname

vtysh: fix multiple "domainname" commands in running config

4 years agoMerge pull request #7228 from idryzhov/vtysh-dynamic-daemons
Donald Sharp [Fri, 2 Oct 2020 22:07:31 +0000 (18:07 -0400)]
Merge pull request #7228 from idryzhov/vtysh-dynamic-daemons

vtysh: dynamically generate the list of daemons for commands

4 years agoMerge pull request #7236 from idryzhov/fix-docstrings
Donald Sharp [Fri, 2 Oct 2020 21:59:52 +0000 (17:59 -0400)]
Merge pull request #7236 from idryzhov/fix-docstrings

isisd, ospfd: fix missing/excessive docstrings

4 years agolib: remove nexthop_same_firsthop() api
Stephen Worley [Fri, 2 Oct 2020 21:25:36 +0000 (17:25 -0400)]
lib: remove nexthop_same_firsthop() api

Remove the nexthop_same_firsthop() api and just call nexthop_same().
Not entirely sure why we were using this function in the first place,
but now we are just marking dupes with it so lets just call a
common function and avoid issues.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agotests: Skip comparing neighbor-extended-circuit-id in yang output. They are not consi...
Martin Winter [Fri, 2 Oct 2020 20:07:25 +0000 (22:07 +0200)]
tests: Skip comparing neighbor-extended-circuit-id in yang output. They are not consistent

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agoisisd: fix coverity errors in isis ldp-sync commands
lynne [Thu, 17 Sep 2020 18:08:04 +0000 (14:08 -0400)]
isisd: fix coverity errors in isis ldp-sync commands

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
4 years agozebra: cleanup zebra_rnh.c debugs
Donald Sharp [Wed, 30 Sep 2020 14:42:50 +0000 (10:42 -0400)]
zebra: cleanup zebra_rnh.c debugs

a) Use appropriate %p modifiers for output
2) Display vrf name in addition to vrf id
c) Remove now unused function

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoisisd, ospfd: fix missing/excessive docstrings
Igor Ryzhov [Fri, 2 Oct 2020 15:51:12 +0000 (18:51 +0300)]
isisd, ospfd: fix missing/excessive docstrings

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agovtysh: dynamically generate the list of daemons for commands
Igor Ryzhov [Thu, 1 Oct 2020 22:16:23 +0000 (01:16 +0300)]
vtysh: dynamically generate the list of daemons for commands

Some daemons were actually missing from the static definitions: nhrpd,
babeld, eigrpd and bfdd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7232 from idryzhov/more-topotests-vrf-id
Martin Winter [Fri, 2 Oct 2020 12:01:15 +0000 (14:01 +0200)]
Merge pull request #7232 from idryzhov/more-topotests-vrf-id

tests: don't compare internal vrfId in topotests

4 years agotests: don't compare internal vrfId in topotests
Igor Ryzhov [Fri, 2 Oct 2020 11:45:51 +0000 (14:45 +0300)]
tests: don't compare internal vrfId in topotests

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agovtysh: fix multiple "domainname" commands in running config
Igor Ryzhov [Thu, 1 Oct 2020 19:19:31 +0000 (22:19 +0300)]
vtysh: fix multiple "domainname" commands in running config

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7229 from idryzhov/topotests-vrf-id
Donald Sharp [Fri, 2 Oct 2020 09:54:38 +0000 (05:54 -0400)]
Merge pull request #7229 from idryzhov/topotests-vrf-id

tests: don't compare internal vrfId in topotests

4 years agotests: don't compare internal vrfId in topotests
Igor Ryzhov [Fri, 2 Oct 2020 08:24:16 +0000 (11:24 +0300)]
tests: don't compare internal vrfId in topotests

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7226 from opensourcerouting/topotestfixes
Quentin Young [Thu, 1 Oct 2020 23:17:34 +0000 (19:17 -0400)]
Merge pull request #7226 from opensourcerouting/topotestfixes

tests: Topotest fixes to skip comparing InterfaceIndex and Internal status

4 years agoMerge pull request #7224 from mjstapp/fix_topo_ptyest
Martin Winter [Thu, 1 Oct 2020 21:01:02 +0000 (23:01 +0200)]
Merge pull request #7224 from mjstapp/fix_topo_ptyest

tests: fix typos in zebra_rib and _netlink

4 years agoMerge pull request #7220 from idryzhov/fix-clear-isis
Donald Sharp [Thu, 1 Oct 2020 20:28:51 +0000 (16:28 -0400)]
Merge pull request #7220 from idryzhov/fix-clear-isis

isisd: fix node for clear commands

4 years agoMerge pull request #7221 from mjstapp/fix_topo_all_circuit
Martin Winter [Thu, 1 Oct 2020 19:49:03 +0000 (21:49 +0200)]
Merge pull request #7221 from mjstapp/fix_topo_all_circuit

tests: fix regex in all_proto test

4 years agotests: Topotest fixes to skip comparing InterfaceIndex and Internal status in json_cmp
Martin Winter [Thu, 1 Oct 2020 19:33:55 +0000 (21:33 +0200)]
tests: Topotest fixes to skip comparing InterfaceIndex and Internal status in json_cmp

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agozebra: Make connected routes their own entry on the meta_q
Donald Sharp [Thu, 1 Oct 2020 18:58:37 +0000 (14:58 -0400)]
zebra: Make connected routes their own entry on the meta_q

During quick ifdown / ifup events from the linux kernel there
exists a situation where a prefix that has both a kernel route
and a static route can queued up on the meta-q.  If the static
route happens to point at a connected route for nexthop resolution
and we receive a series of quick up/down events *after* the
static route and kernel route are queued up for rib reprocessing.
Since the static route and kernel route are queued on meta-q 1
and the connected route is also on meta-q 1 there exists a situation
where the connected route will be resolved after the static route
fails to resolve, leaving the static route in a unresolved state.

Add a new queue level and put connected routes on their own level,
since they are the fundamental building blocks of pretty much
all the other routes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: When processing route_entries ignore unusable routes
Donald Sharp [Wed, 30 Sep 2020 21:55:44 +0000 (17:55 -0400)]
zebra: When processing route_entries ignore unusable routes

When zebra is processing routes to determine what to send
to the rib, suppose we have two routes (a) a route processed
earlier that none of it's nexthops were active and (b)
a route that has good nexthops but has a worse admin distance.

rib_process, would not relook at (a)'s nexthops because
the ROUTE_ENTRY_CHANGED flag was not true and it would
win when compared to (b) because it's admin distance
was better, leaving us with a state where we would
attempt and fail to install route (a) because it
was not valid.

Modify the code to consider the number of nexthops
we have as a determiner if we can use the route.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotests: fix typos in zebra_rib and _netlink
Mark Stapp [Thu, 1 Oct 2020 18:17:06 +0000 (14:17 -0400)]
tests: fix typos in zebra_rib and _netlink

Fix a couple of typos in the zebra_rib and _netlink topotest
suites.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: fix regex in all_proto test
Mark Stapp [Thu, 1 Oct 2020 14:21:03 +0000 (10:21 -0400)]
tests: fix regex in all_proto test

Make sure the all-protocols test_isis_interfaces testcase uses
a regex substitution that includes all the hex characters.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoisisd: fix node for clear commands
Igor Ryzhov [Thu, 1 Oct 2020 14:11:35 +0000 (17:11 +0300)]
isisd: fix node for clear commands

These are only clear commands in FRR available from view node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7216 from qlyoung/fix-nht-update-decode-wrong-return-code
Mark Stapp [Thu, 1 Oct 2020 11:59:49 +0000 (07:59 -0400)]
Merge pull request #7216 from qlyoung/fix-nht-update-decode-wrong-return-code

Fix nht update decode wrong return code

4 years ago*: make failure to decode nht update an error
Quentin Young [Wed, 30 Sep 2020 22:37:15 +0000 (18:37 -0400)]
*: make failure to decode nht update an error

This should never happen; no need to debug guard it and it's not a
warning, if this isn't working then NHT is not working at all.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agolib: fix zapi_nexthop_update_decode error rc
Quentin Young [Wed, 30 Sep 2020 22:22:33 +0000 (18:22 -0400)]
lib: fix zapi_nexthop_update_decode error rc

This function returns true on success and false otherwise. Returning -1
on error is equivalent to returning true.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agozebra: Prevent uninstall attempts when new entry is not happy
Donald Sharp [Wed, 30 Sep 2020 21:26:02 +0000 (17:26 -0400)]
zebra: Prevent uninstall attempts when new entry is not happy

In rib_process_update_fib, the function is sent two route entries
the old ( previously installed ) and new ( the one to install )
When the function detects that the new is unusable because
the number of nexthops that are usable for that route is 0,
then we uninstall the old route.  The problem here is that
we should not attempt to uninstall any route that is
not owned by FRR.  Modify the code to not attempt
this behavior

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #7215 from mjstapp/fix_z_mlag_read
Quentin Young [Wed, 30 Sep 2020 20:27:01 +0000 (16:27 -0400)]
Merge pull request #7215 from mjstapp/fix_z_mlag_read

zebra: don't touch mlag read event pointer

4 years agozebra: don't touch mlag read event pointer
Mark Stapp [Wed, 30 Sep 2020 17:24:54 +0000 (13:24 -0400)]
zebra: don't touch mlag read event pointer

Don't touch the mlag read event pointer, it's not safe.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7167 from donaldsharp/mlag_rd_killer
Mark Stapp [Wed, 30 Sep 2020 15:40:40 +0000 (11:40 -0400)]
Merge pull request #7167 from donaldsharp/mlag_rd_killer

zebra: the mlag_rd_buf_offset variable was write only

4 years agoMerge pull request #7195 from tashanamatl/lookup_fix
Rafael Zalamena [Wed, 30 Sep 2020 13:25:45 +0000 (10:25 -0300)]
Merge pull request #7195 from tashanamatl/lookup_fix

bfdd: Make new multihop peer if local-address is unique

4 years agoMerge pull request #7203 from idryzhov/fix-vtysh-isisd-fabricd
Donald Sharp [Wed, 30 Sep 2020 10:28:51 +0000 (06:28 -0400)]
Merge pull request #7203 from idryzhov/fix-vtysh-isisd-fabricd

vtysh: fix commands when building only isisd or fabricd

4 years agoMerge pull request #7201 from mjstapp/fix_topo_ubu20
Donald Sharp [Tue, 29 Sep 2020 22:14:30 +0000 (18:14 -0400)]
Merge pull request #7201 from mjstapp/fix_topo_ubu20

tests: pim-basic mcast scripts fixes for python3

4 years agovtysh: fix commands when building only isisd or fabricd
Igor Ryzhov [Tue, 29 Sep 2020 22:08:17 +0000 (01:08 +0300)]
vtysh: fix commands when building only isisd or fabricd

 * add files to vtysh_scan when building only fabricd
 * don't add isisd/fabricd commands when daemon build is disabled

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoospf6d: Fix flooding of old copies of self-originated LSAs
Martin Buck [Tue, 29 Sep 2020 21:07:40 +0000 (23:07 +0200)]
ospf6d: Fix flooding of old copies of self-originated LSAs

When receiving old copies (e.g. originated before the local ospf6d was
restarted) of supposedly self-originated LSAs which we previously tried to
flush from the network (by setting them to MaxAge), neither flood them nor
add them to our LSDB. Instead, keep the MaxAge version until we actually
(re-)originate them.

Possible fix for #7030. Testcase in #7168
(tests/topotests/ospf6-dr-no-netlsa-bug7030).

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
4 years agotests: pim-basic mcast scripts fixes for python3
Mark Stapp [Tue, 29 Sep 2020 17:14:39 +0000 (13:14 -0400)]
tests: pim-basic mcast scripts fixes for python3

The pim-basic suite uses some private python scripts to
send and receive mcast traffic: revise them to support
both py2 and py3.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7192 from deastoe/zebra-fpm-blackhole-abort
Donald Sharp [Tue, 29 Sep 2020 17:47:38 +0000 (13:47 -0400)]
Merge pull request #7192 from deastoe/zebra-fpm-blackhole-abort

zebra: fix FPM abort for unreach/prohibit routes

4 years agoMerge pull request #7039 from opensourcerouting/bgp-norib-runtime
Donald Sharp [Tue, 29 Sep 2020 17:42:02 +0000 (13:42 -0400)]
Merge pull request #7039 from opensourcerouting/bgp-norib-runtime

bgpd: set/unset no-rib option at runtime

4 years agoMerge pull request #7156 from sworleys/PBR-Cleanup-IFp-No-Send
Mark Stapp [Tue, 29 Sep 2020 17:40:42 +0000 (13:40 -0400)]
Merge pull request #7156 from sworleys/PBR-Cleanup-IFp-No-Send

pbrd: cleanup pbr ifp info if not sent to zebra

4 years agoMerge pull request #7198 from idryzhov/vtysh-disable-daemon
Donald Sharp [Tue, 29 Sep 2020 17:25:34 +0000 (13:25 -0400)]
Merge pull request #7198 from idryzhov/vtysh-disable-daemon

vtysh: respect --disable-daemon configure flags

4 years agoMerge pull request #7188 from chiragshah6/evpn_dev
Patrick Ruddy [Tue, 29 Sep 2020 15:33:19 +0000 (16:33 +0100)]
Merge pull request #7188 from chiragshah6/evpn_dev

zebra: EVPN avoid duplicate list-node in l3vni's l2vni-list

4 years agoMerge pull request #7199 from donaldsharp/nhg_reasons
Mark Stapp [Tue, 29 Sep 2020 15:02:53 +0000 (11:02 -0400)]
Merge pull request #7199 from donaldsharp/nhg_reasons

Nhg reasons

4 years agoMerge pull request #7177 from mjstapp/fix_topo_tab_open
Donald Sharp [Tue, 29 Sep 2020 14:06:48 +0000 (10:06 -0400)]
Merge pull request #7177 from mjstapp/fix_topo_tab_open

tests: python3 compat fixes for topotests: tabs and misc api

4 years agoMerge pull request #7197 from idryzhov/fix-tests
Donald Sharp [Tue, 29 Sep 2020 13:59:20 +0000 (09:59 -0400)]
Merge pull request #7197 from idryzhov/fix-tests

tests: skip tests when building without daemon

4 years agozebra: fix FPM abort for unreach/prohibit routes
Duncan Eastoe [Mon, 28 Sep 2020 11:51:19 +0000 (12:51 +0100)]
zebra: fix FPM abort for unreach/prohibit routes

b0e9567ed162da708f8d0b3a3caf87cd03b62e96 fixed an issue whereby
zebra would abort while building an update for a blackhole route.

The same issue, `assert(data_len)` failing in
`zfpm_build_route_updates()`, can be observed when building updates
for unreachable and prohibit routes.

To address this `netlink_route_info_fill()` is updated to not
indicate failure, due to lack of nexthops, for any blackhole routes.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
4 years agozebra: Make nexthop_active check use the same debug
Donald Sharp [Tue, 29 Sep 2020 11:54:35 +0000 (07:54 -0400)]
zebra: Make nexthop_active check use the same debug

When debugging why a route was not successfully installed into the
rib, it would be preferable that the end user only have to turn
on `debug zebra rib detail` as that is what we have been telling
people to do for the last couple of years.  Consolidate *back*
to this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: Add missing reason we could not make an active_nexthop check
Donald Sharp [Tue, 29 Sep 2020 11:45:19 +0000 (07:45 -0400)]
zebra: Add missing reason we could not make an active_nexthop check

Add a missing reason as to why we are unable to make an active nexthop
check be successful.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agovtysh: respect --disable-daemon configure flags
Igor Ryzhov [Tue, 29 Sep 2020 10:12:55 +0000 (13:12 +0300)]
vtysh: respect --disable-daemon configure flags

Don't install nodes for daemons that are disabled by configure flags.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agovtysh: rearrange commands per daemon and node
Igor Ryzhov [Tue, 29 Sep 2020 08:17:04 +0000 (11:17 +0300)]
vtysh: rearrange commands per daemon and node

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7193 from idryzhov/vtysh-fixes
Donald Sharp [Tue, 29 Sep 2020 11:00:13 +0000 (07:00 -0400)]
Merge pull request #7193 from idryzhov/vtysh-fixes

vtysh fixes

4 years agotests: skip tests when building without daemon
Igor Ryzhov [Tue, 29 Sep 2020 10:05:45 +0000 (13:05 +0300)]
tests: skip tests when building without daemon

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agozebra: avoid duplication node in l3vni l2vni-list
Chirag Shah [Sun, 27 Sep 2020 21:09:43 +0000 (14:09 -0700)]
zebra: avoid duplication node in l3vni l2vni-list

With l2vni flap leading to duplicate entry creation
in l3vni's l2vni-list.
Use list sorted add with no duplicates.

root@TORC11:mgmt:~# show evpn vni 4001
VNI: 4001
  Type: L3
  Tenant VRF: vrf1
  State: Up
  ...
  L2 VNIs: 1000 1000 1000 0 0 1002
root@TORC11:mgmt:~# ip link set down vx-1002
root@TORC11:mgmt:~# ip link set up vx-1002
root@TORC11:mgmt:~# show evpn vni 4001
VNI: 4001
  Type: L3
  Tenant VRF: vrf1
  State: Up
  ...
  L2 VNIs: 1000 1000 1000 0 0 1002 1002

Ticket:CM-31545
Reviewed By:
Testing Done:

With Fix:
Multiple time flaps vni counts remained the same.

root@TORC11:mgmt:~# ip link set down vx-1002
root@TORC11:mgmt:~# ip link set up vx-1002
root@TORC11:mgmt:~# ip link set down vx-1002
root@TORC11:mgmt:~# ip link set up vx-1002
root@TORC11:mgmt:~# net show evpn vni 4001
VNI: 4001
  Type: L3
  Tenant VRF: vrf1
  State: Up
  ...
  L2 VNIs: 1000 1002

Signed-off-by: Chirag Shah <chirag@nvidia.com>