]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agolib: add nexthop_str2backup
Mark Stapp [Wed, 1 Jul 2020 19:55:16 +0000 (15:55 -0400)]
lib: add nexthop_str2backup

Add an api to convert an input list into an array of backup
nexthop indexes; useful for cli input.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib,sharpd,zebra: initial support for multiple backup nexthops
Mark Stapp [Tue, 30 Jun 2020 19:52:37 +0000 (15:52 -0400)]
lib,sharpd,zebra: initial support for multiple backup nexthops

Initial changes to support a nexthop with multiple backups. Lib
changes to hold a small array in each primary, zapi message
changes to support sending multiple backups, and daemon
changes to show commands to support multiple backups. The config
input for multiple backup indices is not present here.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: include installed backup nexthops in kernel update
Mark Stapp [Tue, 16 Jun 2020 12:28:27 +0000 (08:28 -0400)]
zebra: include installed backup nexthops in kernel update

Include any installed backups when updating the local kernel
after processing an async notification. This includes routes'
nexthops and LSPs' nhlfes.

Add the 'b' character to the route show display and header to
indicate backup nexthops.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6740 from FRRouting/revert-5015-rpki_vrf_encapsulation
Quentin Young [Tue, 14 Jul 2020 22:22:26 +0000 (18:22 -0400)]
Merge pull request #6740 from FRRouting/revert-5015-rpki_vrf_encapsulation

Revert "Rpki Encapsulation"

4 years agoRevert "Rpki Encapsulation"
Quentin Young [Tue, 14 Jul 2020 19:37:14 +0000 (15:37 -0400)]
Revert "Rpki Encapsulation"

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #6598 from mruprich/python-3.8
Quentin Young [Tue, 14 Jul 2020 19:35:02 +0000 (15:35 -0400)]
Merge pull request #6598 from mruprich/python-3.8

build: find all future minor versions of python3

4 years agoMerge pull request #6721 from kuldeepkash/bgp_basic_functionality
Mark Stapp [Tue, 14 Jul 2020 16:27:25 +0000 (12:27 -0400)]
Merge pull request #6721 from kuldeepkash/bgp_basic_functionality

tests: [topojson] Increase BGP convergence wait time

4 years agoMerge pull request #5015 from pguibert6WIND/rpki_vrf_encapsulation
Quentin Young [Tue, 14 Jul 2020 15:52:47 +0000 (11:52 -0400)]
Merge pull request #5015 from pguibert6WIND/rpki_vrf_encapsulation

Rpki Encapsulation

4 years agoMerge pull request #6718 from opensourcerouting/bfd-profile-small-fix
Quentin Young [Tue, 14 Jul 2020 15:34:10 +0000 (11:34 -0400)]
Merge pull request #6718 from opensourcerouting/bfd-profile-small-fix

bfdd: update detect multiplier on profile change

4 years agotests: [topojson] Increase BGP convergence wait time
Kuldeep Kashyap [Sat, 11 Jul 2020 06:54:42 +0000 (06:54 +0000)]
tests: [topojson] Increase BGP convergence wait time

1. Increasing BGP convergence wait time to overcome Ubuntu 16.04 arm8 box, as
bgp neighorship is taking more time in this particular testbed.
2. Debugged bgp-ecmp-topo2 failures and here also it seems to be bgp convergence
issue, doing some enhancement in scripts to handle it

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agoMerge pull request #6649 from xThaid/dplane_batching2
Rafael Zalamena [Mon, 13 Jul 2020 20:32:16 +0000 (17:32 -0300)]
Merge pull request #6649 from xThaid/dplane_batching2

zebra: netlink cleanup

4 years agoMerge pull request #6346 from ton31337/fix/bgp_hostname_nexthop_if_unchanged
Rafael Zalamena [Mon, 13 Jul 2020 19:15:41 +0000 (16:15 -0300)]
Merge pull request #6346 from ton31337/fix/bgp_hostname_nexthop_if_unchanged

bgpd: Show the real next-hop address in addition to hostname in `show…

4 years agoMerge pull request #5301 from idryzhov/show-interface
Quentin Young [Mon, 13 Jul 2020 15:23:53 +0000 (11:23 -0400)]
Merge pull request #5301 from idryzhov/show-interface

[RFC] zebra: remove vrf parameter from "show interface ..." commands

4 years agoMerge pull request #6704 from mjstapp/pthread_block_signals
Quentin Young [Mon, 13 Jul 2020 15:09:46 +0000 (11:09 -0400)]
Merge pull request #6704 from mjstapp/pthread_block_signals

lib: block signals in child pthreads

4 years agozebra: cosmetic changes in the netlink code
Jakub Urbańczyk [Mon, 13 Jul 2020 10:43:15 +0000 (12:43 +0200)]
zebra: cosmetic changes in the netlink code

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agodoc: Add some words about `bgp default show-[nexthop]-hostname`
Donatas Abraitis [Wed, 24 Jun 2020 14:26:27 +0000 (17:26 +0300)]
doc: Add some words about `bgp default show-[nexthop]-hostname`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Add "hostname" in JSON output for `show bgp` family outputs
Donatas Abraitis [Wed, 6 May 2020 14:50:04 +0000 (17:50 +0300)]
bgpd: Add "hostname" in JSON output for `show bgp` family outputs

This adds hostname regardless if `bgp default show-hostname` enabled or not.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Show the real next-hop address in addition to hostname in `show bgp`
Donatas Abraitis [Wed, 6 May 2020 14:46:10 +0000 (17:46 +0300)]
bgpd: Show the real next-hop address in addition to hostname in `show bgp`

It's hard to cope with cases when next-hop is changed/unchanged or
peers are non-direct.

It would be better to show the hostname and nexthop IP address (both)
under `show bgp` to quickly identify the source and the real next-hop
of the route.

If `bgp default show-nexthop-hostname` is toggled the output looks like:
```
spine1-debian-9# show bgp
BGP table version is 1, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 65002
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

   Network          Next Hop            Metric LocPrf Weight Path
*  2a02:4780::/64   fe80::a00:27ff:fe09:f8a3(exit1-debian-9)
                                             0             0 65001 ?

spine1-debian-9# show ip bgp
BGP table version is 5, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 65002
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

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.255.255.0/24  192.168.0.1(exit1-debian-9)
                                             0             0 65001 ?
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobfdd: update detect multiplier on profile change
Rafael Zalamena [Sun, 28 Jun 2020 21:07:38 +0000 (18:07 -0300)]
bfdd: update detect multiplier on profile change

Add missing profile update hook for detection multiplier change.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6719 from opensourcerouting/fpm-force-nhg-fix
Donald Sharp [Mon, 13 Jul 2020 12:48:49 +0000 (08:48 -0400)]
Merge pull request #6719 from opensourcerouting/fpm-force-nhg-fix

zebra,fpm: fix force disable next hop groups

4 years agoMerge pull request #6716 from sworleys/Connected-Match-Ifindex
Mark Stapp [Fri, 10 Jul 2020 21:13:25 +0000 (17:13 -0400)]
Merge pull request #6716 from sworleys/Connected-Match-Ifindex

zebra: mark connected nh inactive if not matching ifindex

4 years agoMerge pull request #6715 from volta-networks/fix_isis_circ_sa
Donald Sharp [Fri, 10 Jul 2020 20:08:35 +0000 (16:08 -0400)]
Merge pull request #6715 from volta-networks/fix_isis_circ_sa

isisd: fix Coverity warning

4 years agozebra: mark connected nh inactive if not matching ifindex
Stephen Worley [Mon, 6 Jul 2020 22:20:14 +0000 (18:20 -0400)]
zebra: mark connected nh inactive if not matching ifindex

If we are asked to check if a nexthop is active and it matches a
connected route but the ifindex on it does not match the interface
with the connected route, mark as inactive. This is a bad nexthop.

Before, we would skip this check and just assume any nexthop that matches
on a connected route is valid and return here then fail during
installation. This adds a check for the IPV*_ifindex nexthop case where the
ifindex we have been sent doesn't match.

Old:
F>r 0.0.0.0/0 [200/0] via 20.0.0.2, test, weight 1, 00:00:27
  r                   via 40.4.4.4, lo, weight 1, 00:00:27

New:
F>* 0.0.0.0/0 [200/0] via 20.0.0.2, test, weight 1, 00:00:06
  *                   via 40.4.4.4, lo inactive, weight 1, 00:00:06

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agotests: Remove bgp_show_ip_bgp_fqdn test
Donatas Abraitis [Wed, 6 May 2020 14:45:31 +0000 (17:45 +0300)]
tests: Remove bgp_show_ip_bgp_fqdn test

Not really relevant for now.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agozebra,fpm: fix force disable next hop groups
Rafael Zalamena [Fri, 12 Jun 2020 15:21:28 +0000 (12:21 -0300)]
zebra,fpm: fix force disable next hop groups

`force_nhg` is only settable when calling from `fpm`, so if the kernel
was using next hop groups it would override our knob.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6530 from mjstapp/backup_nhg_notify
Donald Sharp [Fri, 10 Jul 2020 14:54:59 +0000 (10:54 -0400)]
Merge pull request #6530 from mjstapp/backup_nhg_notify

lib, zebra: async notifications for backup routes and LSPs

4 years agoisisd: fix Coverity warning
Emanuele Di Pascale [Fri, 10 Jul 2020 13:55:52 +0000 (15:55 +0200)]
isisd: fix Coverity warning

no need to check cicuit->area, as all code paths leading there
had already dereferenced it.
Fixes CID 1496314

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #6403 from NaveenThanikachalam/FRR_RMAP_FIX
Donald Sharp [Fri, 10 Jul 2020 12:07:04 +0000 (08:07 -0400)]
Merge pull request #6403 from NaveenThanikachalam/FRR_RMAP_FIX

lib: Fix erroneous r-map behavior

4 years agoMerge pull request #6713 from donaldsharp/pim_doc_fix
Donatas Abraitis [Fri, 10 Jul 2020 08:30:38 +0000 (11:30 +0300)]
Merge pull request #6713 from donaldsharp/pim_doc_fix

pimd: Add some missing mesh-group pim cmds

4 years agoMerge pull request #6702 from ton31337/feature/bgp_show_only_established_sessions
Donald Sharp [Fri, 10 Jul 2020 00:32:27 +0000 (20:32 -0400)]
Merge pull request #6702 from ton31337/feature/bgp_show_only_established_sessions

bgpd: Add command to show only established sessions

4 years agoMerge pull request #6703 from mjstapp/fix_bgp_30_secs
Donald Sharp [Fri, 10 Jul 2020 00:29:08 +0000 (20:29 -0400)]
Merge pull request #6703 from mjstapp/fix_bgp_30_secs

tests: print actual time spent waiting for bgp convergence

4 years agoMerge pull request #6708 from mrpaulmanley/bugfix/bfd_frr-reload
Donald Sharp [Fri, 10 Jul 2020 00:26:20 +0000 (20:26 -0400)]
Merge pull request #6708 from mrpaulmanley/bugfix/bfd_frr-reload

Add BFD peer awareness to frr-reload.py and vtysh markfile

4 years agoMerge pull request #6709 from mjstapp/fix_topo_ipaddr
Donald Sharp [Fri, 10 Jul 2020 00:20:36 +0000 (20:20 -0400)]
Merge pull request #6709 from mjstapp/fix_topo_ipaddr

tests: use ipaddress module; tolerate missing support bundle file

4 years agopimd: Add some missing mesh-group pim cmds
Donald Sharp [Fri, 10 Jul 2020 00:16:12 +0000 (20:16 -0400)]
pimd: Add some missing mesh-group pim cmds

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotest: use ipaddress module instead of ipaddr
Mark Stapp [Thu, 9 Jul 2020 16:32:10 +0000 (12:32 -0400)]
test: use ipaddress module instead of ipaddr

Use the standard ipaddress module instead of installing 'ipaddr',
which may be deprecated now.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agovtysh: properly exit BFD_PEER_NODE when marking file
Paul Manley [Thu, 9 Jul 2020 16:25:34 +0000 (11:25 -0500)]
vtysh: properly exit BFD_PEER_NODE when marking file

vtysh needs to be aware of how to properly exit a bfd peer when subsequent commands only succeed in a higher context.

https://github.com/FRRouting/frr/issues/6511#issuecomment-656166206

Signed-off-by: Paul Manley <paul.manley@wholefoods.com>
4 years agotools: create sub-context for bfd peers
Paul Manley [Thu, 9 Jul 2020 16:21:16 +0000 (11:21 -0500)]
tools: create sub-context for bfd peers

add lines starting with 'peer' to the list of sub-contexts that are handled by frr-reload.py.

https://github.com/FRRouting/frr/issues/6511#issuecomment-655163833

Signed-off-by: Paul Manley <paul.manley@wholefoods.com>
4 years agotests: don't fail topotests if bundle file not present
Mark Stapp [Thu, 9 Jul 2020 16:13:55 +0000 (12:13 -0400)]
tests: don't fail topotests if bundle file not present

Test for the existence of the support_bundle conf file before
trying to access it.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: block signals in child pthreads
Mark Stapp [Thu, 9 Jul 2020 15:21:10 +0000 (11:21 -0400)]
lib: block signals in child pthreads

Block signals in child/additional pthreads; frr daemons generally
expect that only the main thread will handle signals.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: print actual time spent waiting for bgp convergence
Mark Stapp [Thu, 9 Jul 2020 13:51:16 +0000 (09:51 -0400)]
tests: print actual time spent waiting for bgp convergence

Stop printing hard-coded 30 seconds in a couple of places in
bgp.py in the topojson infra - print the actual time
spent waiting.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: Add 'show bgp summary established' command
Donatas Abraitis [Thu, 9 Jul 2020 13:05:08 +0000 (16:05 +0300)]
doc: Add 'show bgp summary established' command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Add command to show only established sessions
Donatas Abraitis [Thu, 9 Jul 2020 13:00:27 +0000 (16:00 +0300)]
bgpd: Add command to show only established sessions

```
exit1-debian-9# show bgp summary

IPv4 Unicast Summary:
BGP router identifier 192.168.0.1, local AS number 100 vrf-id 0
BGP table version 8
RIB entries 15, using 2880 bytes of memory
Peers 2, using 43 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
192.168.0.2     4        200        10         6        0    0    0 00:00:35            8        8
2a02:4780::2    4          0         0         1        0    0    0    never       Active        0

Total number of neighbors 2
exit1-debian-9# show bgp summary established

IPv4 Unicast Summary:
BGP router identifier 192.168.0.1, local AS number 100 vrf-id 0
BGP table version 8
RIB entries 15, using 2880 bytes of memory
Peers 2, using 43 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
192.168.0.2     4        200        10         6        0    0    0 00:00:39            8        8

Total number of neighbors 2
exit1-debian-9# show bgp summary failed

IPv4 Unicast Summary:
BGP router identifier 192.168.0.1, local AS number 100 vrf-id 0
BGP table version 8
RIB entries 15, using 2880 bytes of memory
Peers 2, using 43 KiB of memory

Neighbor        EstdCnt DropCnt ResetTime Reason
2a02:4780::2          0       0     never Waiting for peer OPEN

Total number of neighbors 2
exit1-debian-9#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobuild: find all future minor versions of python3
Michal Ruprich [Wed, 17 Jun 2020 11:47:30 +0000 (13:47 +0200)]
build: find all future minor versions of python3

This way we can find every python from 3.8 further

Signed-off-by: Michal Ruprich <michalruprich@gmail.com>
4 years agoMerge pull request #6385 from GalaxyGorilla/bfd_igp_topotest
Renato Westphal [Wed, 8 Jul 2020 17:38:09 +0000 (14:38 -0300)]
Merge pull request #6385 from GalaxyGorilla/bfd_igp_topotest

isis: tests: Fast RIB recovery from BFD recognized link failures

4 years agoMerge pull request #6697 from donaldsharp/ospf_router_id_ordering
Mark Stapp [Wed, 8 Jul 2020 16:41:59 +0000 (12:41 -0400)]
Merge pull request #6697 from donaldsharp/ospf_router_id_ordering

ospfd: allow interfaces to come up in rare situation

4 years agoospfd: allow interfaces to come up in rare situation
Donald Sharp [Wed, 8 Jul 2020 01:48:34 +0000 (21:48 -0400)]
ospfd: allow interfaces to come up in rare situation

On startup of both zebra and ospfd.  If ospfd has not
received a valid router-id *but* has received interface
data, interfaces will not be turned on in the state
machine.  When ospf finally receives a valid router-id
it would never actually kick the state machine into
action for those interfaces it has been configured for.

Modify ospf on router id changes, *if* the old
router id was INADDR_ANY *and* the interface is
operative *and* the oi->state is ISM_Down, give
it the old kick in the patooeys

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: netlink cleanup
Jakub Urbańczyk [Wed, 24 Jun 2020 18:34:38 +0000 (20:34 +0200)]
zebra: netlink cleanup

 * Split zebra's netlink code into smaller functions to be more
   generic.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agoMerge pull request #6693 from qlyoung/doc-value-initialization-practices
Donatas Abraitis [Wed, 8 Jul 2020 08:04:14 +0000 (11:04 +0300)]
Merge pull request #6693 from qlyoung/doc-value-initialization-practices

Document value initialization practices

4 years agoMerge pull request #6690 from kuldeepkash/bgp_basic_functionality
Donald Sharp [Tue, 7 Jul 2020 23:44:37 +0000 (19:44 -0400)]
Merge pull request #6690 from kuldeepkash/bgp_basic_functionality

tests: Generate support bundle/dump data on tests failures

4 years agoMerge pull request #6692 from mjstapp/fix_sharp_gcc10
Quentin Young [Tue, 7 Jul 2020 20:59:48 +0000 (16:59 -0400)]
Merge pull request #6692 from mjstapp/fix_sharp_gcc10

sharpd: use extern for globals

4 years agodoc: remove trailing whitespace
Quentin Young [Tue, 7 Jul 2020 17:56:14 +0000 (13:56 -0400)]
doc: remove trailing whitespace

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agodoc: note preferences for value initialization
Quentin Young [Tue, 7 Jul 2020 17:55:43 +0000 (13:55 -0400)]
doc: note preferences for value initialization

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agozebra: clean up the code flow in lsp results processing
Mark Stapp [Wed, 3 Jun 2020 21:03:41 +0000 (17:03 -0400)]
zebra: clean up the code flow in lsp results processing

Clean up some awkward code in a couple of places where we're
processing lsp results from the dataplane. Also add some more
debugs in those paths.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: include backup lsp nhlfes in 'active' check
Mark Stapp [Wed, 3 Jun 2020 21:01:19 +0000 (17:01 -0400)]
zebra: include backup lsp nhlfes in 'active' check

Check backup nhlfes/nexthops for 'active' status when checking
an LSP. Also tweak the show command output for backup nhlfes
slightly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: collapse some duplicate LSP nhlfe apis
Mark Stapp [Tue, 2 Jun 2020 20:16:21 +0000 (16:16 -0400)]
zebra: collapse some duplicate LSP nhlfe apis

Collapse some apis where primary and backup nhlfe code
was very similar, generally using a single common api
and using a bool to distinguish between primary and
backup.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: support backup nhlfes in lsp async notifications
Mark Stapp [Tue, 2 Jun 2020 17:22:10 +0000 (13:22 -0400)]
zebra: support backup nhlfes in lsp async notifications

Include backup nhlfes and nexthops in LSP async notification
processing from the dataplane.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: add init api for dplane lsp context
Mark Stapp [Tue, 2 Jun 2020 15:04:56 +0000 (11:04 -0400)]
zebra: add init api for dplane lsp context

Add an init api (based on what had been a private/static api)
to allow a caller to init a context and use it to generate LSP
updates. This might be useful for testing, or from a dplane
plugin.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: use fib nexthops for pseudowires
Mark Stapp [Mon, 1 Jun 2020 16:24:14 +0000 (12:24 -0400)]
zebra: use fib nexthops for pseudowires

Make sure to use the installed/fib set of nexthops
when capturing info about pseudowire updates.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: add const to mpls and dplane nhlfe apis
Mark Stapp [Fri, 29 May 2020 18:26:03 +0000 (14:26 -0400)]
zebra: add const to mpls and dplane nhlfe apis

Add const to an arg to a couple of the dplane and mpls module
apis that add nhlfes to LSPs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: include backup nexthops in nexthop-tracking
Mark Stapp [Wed, 27 May 2020 16:53:20 +0000 (12:53 -0400)]
zebra: include backup nexthops in nexthop-tracking

Include backup nexthops when examining routes that resolve
NHT requests. Include installed backups when sending nexthops
in zapi messages to client daemons.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: improve logic handling backup nexthop installation
Mark Stapp [Wed, 27 May 2020 16:52:07 +0000 (12:52 -0400)]
zebra: improve logic handling backup nexthop installation

When handling a fib notification event that involves a route
with backup nexthops, be clearer about representing the
installed state of the backups: any installed backup will be
on a dedicated route_entry list.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agosharpd: be explicit if nht is uninstalled
Mark Stapp [Wed, 27 May 2020 16:46:39 +0000 (12:46 -0400)]
sharpd: be explicit if nht is uninstalled

Emit a debug if sharpd gets a nexthop-tracking message
without any nexthops.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: skip un-installed recursive match
Mark Stapp [Tue, 26 May 2020 21:35:20 +0000 (17:35 -0400)]
zebra: skip un-installed recursive match

Do less work when resolving a recursive route: just skip
nexthops if the resolving route is not installed.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: test vrfs in nexthop_same_firsthop()
Mark Stapp [Tue, 26 May 2020 15:08:42 +0000 (11:08 -0400)]
lib: test vrfs in nexthop_same_firsthop()

Test the two nexthops' vrfs, and convert api to 'bool' return.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: revise vty output for backup nexthops
Mark Stapp [Fri, 22 May 2020 20:42:23 +0000 (16:42 -0400)]
zebra: revise vty output for backup nexthops

Include backup nexthops in json output; function-ify the json
output for nexthops; revise the display of backup nexthops to
use the 'b' character.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: add fib nhg for backups, revise api
Mark Stapp [Fri, 22 May 2020 20:36:30 +0000 (16:36 -0400)]
zebra: add fib nhg for backups, revise api

Add an nhg for the fib-installed backup nexthops; rename an
api to access the fib-installed nexthop nhg.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: only use ACTIVE nexthops in recursive resolution
Mark Stapp [Wed, 20 May 2020 20:43:11 +0000 (16:43 -0400)]
zebra: only use ACTIVE nexthops in recursive resolution

Only use ACTIVE nexthops to resolve recursive routes, not all
nexthops from a resolving route.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: add dplane backup nhg api
Mark Stapp [Sat, 9 May 2020 20:05:02 +0000 (16:05 -0400)]
zebra: add dplane backup nhg api

Add an api to allow a dplane plugin to set a route's backup
nexthops.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: allow recursive resolution to use backup nexthops
Mark Stapp [Fri, 8 May 2020 20:36:26 +0000 (16:36 -0400)]
zebra: allow recursive resolution to use backup nexthops

Allow both primary and backup nexthops to be used in
recursive resolution processing.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agostaticd,zebra: use ALLOW_RECURSION for static routes
Mark Stapp [Fri, 8 May 2020 20:22:54 +0000 (16:22 -0400)]
staticd,zebra: use ALLOW_RECURSION for static routes

Remove a special-case clause for static routes - it was the same
as the clause for other recursive routes. Have staticd just tell
zebra that recursion is allowed. Update topotest that was aware
of this 'internal' flag.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agosharpd: use extern for globals
Mark Stapp [Tue, 7 Jul 2020 17:00:42 +0000 (13:00 -0400)]
sharpd: use extern for globals

Use extern when declaring a couple of globals in sharp_zebra.
gcc 10 on fedora 32 needs this.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: Generate support bundle/dump data on tests failures
Kuldeep Kashyap [Tue, 7 Jul 2020 15:17:04 +0000 (15:17 +0000)]
tests: Generate support bundle/dump data on tests failures

1. It will generate support bundle/sump data on test failures
2. It used /usr/lib/frr/generate_support_bundle.py utility to dump the data

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agoMerge pull request #6689 from mjstapp/doc_topotest_timeouts
Quentin Young [Tue, 7 Jul 2020 15:27:53 +0000 (11:27 -0400)]
Merge pull request #6689 from mjstapp/doc_topotest_timeouts

doc: add note about generous BGP topotest timeouts

4 years agoMerge pull request #6685 from donaldsharp/fix_rare_ospf_test_failure
Mark Stapp [Tue, 7 Jul 2020 14:38:26 +0000 (10:38 -0400)]
Merge pull request #6685 from donaldsharp/fix_rare_ospf_test_failure

tests: Fix rare case in ospf tests due to small hello timer

4 years agoMerge pull request #6687 from mjstapp/fix_topo_timeout_again
Donald Sharp [Tue, 7 Jul 2020 13:25:02 +0000 (09:25 -0400)]
Merge pull request #6687 from mjstapp/fix_topo_timeout_again

tests: fix short timeout in lib/bgp.py

4 years agodoc: add note about generous BGP topotest timeouts
Mark Stapp [Tue, 7 Jul 2020 12:55:31 +0000 (08:55 -0400)]
doc: add note about generous BGP topotest timeouts

Add note blocks to the topotest and topotest-json dev docs to
emphasize the need for generous BGP retry/convergence timers.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: fix short timeout in lib/bgp.py
Mark Stapp [Tue, 7 Jul 2020 12:25:01 +0000 (08:25 -0400)]
tests: fix short timeout in lib/bgp.py

Another short timeout for bgp - make the
verify_bgp_convergence_from_running_config() api use the same
generous timeout as verify_bgp_convergence()

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: Fix rare case in ospf tests due to small hello timer
Donald Sharp [Tue, 7 Jul 2020 11:36:54 +0000 (07:36 -0400)]
tests: Fix rare case in ospf tests due to small hello timer

There exists the possiblity that the hello timer printed would
show a time to expiration in this format:

Hello due in 350 usecs

The tests are looking for:

Hello due in 5.430s

Just notice that we may have gotten usecs and act accordingly

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6656 from mjstapp/fix_lsp_del_schedule
Russ White [Tue, 7 Jul 2020 10:56:22 +0000 (06:56 -0400)]
Merge pull request #6656 from mjstapp/fix_lsp_del_schedule

zebra: check LSP flags when deleting an LSP

4 years agoMerge pull request #6675 from volta-networks/fix_isis_spf_assert
Quentin Young [Mon, 6 Jul 2020 18:41:27 +0000 (14:41 -0400)]
Merge pull request #6675 from volta-networks/fix_isis_spf_assert

isisd: gracefully handle spf error

4 years agoMerge pull request #6682 from qlyoung/doc-json-empty-output
Mark Stapp [Mon, 6 Jul 2020 18:25:00 +0000 (14:25 -0400)]
Merge pull request #6682 from qlyoung/doc-json-empty-output

doc: specify output for json commands w/ no output

4 years agoMerge pull request #6607 from kuldeepkash/bgp_basic_functionality
Mark Stapp [Mon, 6 Jul 2020 17:18:06 +0000 (13:18 -0400)]
Merge pull request #6607 from kuldeepkash/bgp_basic_functionality

tests: Add bgp_recursive_route_ebgp_multi_hop test suite

4 years agoMerge pull request #6681 from opensourcerouting/rmap-desc-leak-fix
Quentin Young [Mon, 6 Jul 2020 17:05:59 +0000 (13:05 -0400)]
Merge pull request #6681 from opensourcerouting/rmap-desc-leak-fix

lib: fix route map description memory leak

4 years agoMerge pull request #6114 from rgirada/frr-static
Quentin Young [Mon, 6 Jul 2020 17:04:43 +0000 (13:04 -0400)]
Merge pull request #6114 from rgirada/frr-static

pimd: Providing json support for few pim commands

4 years agolib: fix route map description memory leak
Rafael Zalamena [Mon, 6 Jul 2020 14:39:27 +0000 (11:39 -0300)]
lib: fix route map description memory leak

Route map entries are not getting a chance to call `description` string
deallocation on shutdown or when the parent entry is destroyed, so lets
add a code to handle this in the `route_map_index_delete` function.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: specify output for json commands w/ no output
Quentin Young [Mon, 6 Jul 2020 16:07:33 +0000 (12:07 -0400)]
doc: specify output for json commands w/ no output

JSON commands should always return valid JSON

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agotests: Add bgp_recursive_route_ebgp_multi_hop test suite
Kuldeep Kashyap [Thu, 18 Jun 2020 11:33:31 +0000 (11:33 +0000)]
tests: Add bgp_recursive_route_ebgp_multi_hop test suite

1. Added 7 test cases to verify bgp recursive nexthop and ebgp multi-hop functionality
2. Added framework support to automate these test cases
3. Total execution time is ~5 mins

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agoisisd: gracefully handle spf error
Emanuele Di Pascale [Fri, 3 Jul 2020 14:55:28 +0000 (16:55 +0200)]
isisd: gracefully handle spf error

the code in isis_spf_add2tent was asserting in case the vertex
we were trying to add was already present in the path or tent
trees. This however CAN happen if the user accidentally configures
the system Id of the area to the same value of an estabished
neighbor. Handle this more gracefully by logging and returning,
to prevent crashes.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #6628 from adharkar/frr-master-evpn_rt
Russ White [Sun, 5 Jul 2020 20:07:10 +0000 (16:07 -0400)]
Merge pull request #6628 from adharkar/frr-master-evpn_rt

bgpd: Incorrect auto-RT formed when L3VNI is not configured

4 years agozebra: check LSP flags when deleting an LSP
Mark Stapp [Tue, 30 Jun 2020 16:47:46 +0000 (12:47 -0400)]
zebra: check LSP flags when deleting an LSP

Check the LSP INSTALLED flag in delete apis, to ensure we
enqueue a delete operation for the lfib. Some apis were only
checking the nexthop/nhlfe INSTALLED flags, and those could be
unset if there's an in-flight dataplane update.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6678 from mjstapp/fix_topo_zebra
Donald Sharp [Sun, 5 Jul 2020 16:41:32 +0000 (12:41 -0400)]
Merge pull request #6678 from mjstapp/fix_topo_zebra

tests,zebra: fix more startup topotest issues

4 years agoMerge pull request #6646 from xThaid/dplane_batching1
Mark Stapp [Sun, 5 Jul 2020 16:41:23 +0000 (12:41 -0400)]
Merge pull request #6646 from xThaid/dplane_batching1

zebra: prepare dplane for batching

4 years agotests,zebra: fix more startup topotest issues
Mark Stapp [Sat, 4 Jul 2020 16:25:10 +0000 (12:25 -0400)]
tests,zebra: fix more startup topotest issues

Use the right list of daemons to avoid trying to start zebra twice.
Change a zebra log message to INFO level to avoid stderr check
failure.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6666 from donaldsharp/pbr_interface
Donatas Abraitis [Sat, 4 Jul 2020 06:07:24 +0000 (09:07 +0300)]
Merge pull request #6666 from donaldsharp/pbr_interface

pbrd: Be a bit more lenient with `set nexthop A.B.C.D <intf>`

4 years agoMerge pull request #6677 from mjstapp/fix_topo_daemons
Donald Sharp [Fri, 3 Jul 2020 23:10:50 +0000 (19:10 -0400)]
Merge pull request #6677 from mjstapp/fix_topo_daemons

tests: wait longer when shutting down in topotests

4 years agoMerge pull request #6676 from mjstapp/fix_bfd_profile_sa
Donald Sharp [Fri, 3 Jul 2020 23:10:01 +0000 (19:10 -0400)]
Merge pull request #6676 from mjstapp/fix_bfd_profile_sa

bfdd: Use XFREE when freeing bfd profiles

4 years agoMerge pull request #6654 from donaldsharp/sorted
Sri Mohana Singamsetty [Fri, 3 Jul 2020 20:43:05 +0000 (13:43 -0700)]
Merge pull request #6654 from donaldsharp/sorted

Sorted vtysh commands

4 years agotests: wait longer when shutting down in topotests
Mark Stapp [Fri, 3 Jul 2020 17:22:42 +0000 (13:22 -0400)]
tests: wait longer when shutting down in topotests

Add a few retries during router shutdown before killing a daemon. Also
work harder to start only a single instance of daemons, esp. zebra.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobfdd: Use XFREE, clean up SA warning for bfd profiles
Mark Stapp [Fri, 3 Jul 2020 15:43:00 +0000 (11:43 -0400)]
bfdd: Use XFREE, clean up SA warning for bfd profiles

Use XFREE instead of raw free, clean up SA warning in bfd
profile delete.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6669 from ton31337/fix/large-community-list-set_sequence
Donald Sharp [Fri, 3 Jul 2020 11:47:28 +0000 (07:47 -0400)]
Merge pull request #6669 from ton31337/fix/large-community-list-set_sequence

bgpd: Actually find the sequence number for large-community-list