]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 years agoconfigure: Update versioning
Donald Sharp [Fri, 20 Sep 2019 18:37:32 +0000 (14:37 -0400)]
configure: Update versioning

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5027 from donaldsharp/7.2_send_that_error_bgp
Donatas Abraitis [Fri, 20 Sep 2019 18:41:49 +0000 (21:41 +0300)]
Merge pull request #5027 from donaldsharp/7.2_send_that_error_bgp

7.2: bgpd: Invalid NH's should send an apropriate reason code

5 years agobgpd: Invalid NH's should send an apropriate reason code 5027/head
Donald Sharp [Fri, 20 Sep 2019 10:41:02 +0000 (06:41 -0400)]
bgpd: Invalid NH's should send an apropriate reason code

RFC 4271 sec 6.3 p33, In the case of a BGP_NEXTHOP attribute with an
incorrect value, FRR is supposed to send a notification
and include 'Corresponding type, length and value of the NEXT_HOP
attribute in the notification data.

Fixes: #4997
Signed-off-by: Nikos <ntriantafillis@gmail.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5014 from idryzhov/7.2-fix-vtysh-prefix-list
Donald Sharp [Thu, 19 Sep 2019 10:41:23 +0000 (06:41 -0400)]
Merge pull request #5014 from idryzhov/7.2-fix-vtysh-prefix-list

[7.2] vtysh: fix multiple "no ip/ipv6 prefix-list sequence-number" lines in running-config

5 years agovtysh: fix multiple "no ip/ipv6 prefix-list sequence-number" lines in running-config 5014/head
Igor Ryzhov [Wed, 18 Sep 2019 11:19:55 +0000 (14:19 +0300)]
vtysh: fix multiple "no ip/ipv6 prefix-list sequence-number" lines in running-config

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
5 years agoMerge pull request #4999 from mjstapp/fix_notif_installed_7_2
Donald Sharp [Wed, 18 Sep 2019 21:39:08 +0000 (17:39 -0400)]
Merge pull request #4999 from mjstapp/fix_notif_installed_7_2

[7.2] zebra: dplane route updates need to check all nexthops

5 years agozebra: check all dplane nexthops when processing 4999/head
Mark Stapp [Tue, 17 Sep 2019 15:33:46 +0000 (11:33 -0400)]
zebra: check all dplane nexthops when processing

[7.2 version]
When processing route updates from the dataplane, we were
terminating the checking of nexthops prematurely, and we could
miss meaningful changes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4986 from qlyoung/fix-bgp-zero-keepalive-timer-7.2
Sri Mohana Singamsetty [Mon, 16 Sep 2019 18:19:50 +0000 (11:19 -0700)]
Merge pull request #4986 from qlyoung/fix-bgp-zero-keepalive-timer-7.2

[7.2] bgpd: do not send keepalives when KA timer is 0

5 years agobgpd: do not send keepalives when KA timer is 0 4986/head
Quentin Young [Mon, 16 Sep 2019 15:33:49 +0000 (15:33 +0000)]
bgpd: do not send keepalives when KA timer is 0

RFC4271 specifies behavior when the hold timer is sent to zero - we
should not send keepalives or run a hold timer. But FRR, and other
vendors, allow the keepalive timer to be set to zero with a nonzero hold
timer. In this case we were sending keepalives constantly and maxing out
a pthread to do so. Instead behave similarly to other vendors and do not
send keepalives.

Unsure what the utility of this is, but blasting keepalives is
definitely the wrong thing to do.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4976 from opensourcerouting/disable-ecmp2-test-7.2
Donatas Abraitis [Sat, 14 Sep 2019 14:26:42 +0000 (17:26 +0300)]
Merge pull request #4976 from opensourcerouting/disable-ecmp2-test-7.2

[7.2] Disable bgp-ecmp-topo2 topotest until proper fix is developed

5 years agoMerge pull request #4979 from ton31337/feature/route-map_aggregate_command_7.2
Donald Sharp [Sat, 14 Sep 2019 11:42:33 +0000 (07:42 -0400)]
Merge pull request #4979 from ton31337/feature/route-map_aggregate_command_7.2

bgpd: [7.2] Apply route-map for aggregate-address

5 years agotests: Improve bgp_aggregate-address_route-map test 4979/head
Donatas Abraitis [Thu, 12 Sep 2019 07:04:56 +0000 (10:04 +0300)]
tests: Improve bgp_aggregate-address_route-map test

Rewrite some parts to add more visibility what's going on if test fails.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agodoc: Add documentation for aggregate-address with route-map support
Donatas Abraitis [Thu, 22 Aug 2019 06:39:33 +0000 (09:39 +0300)]
doc: Add documentation for aggregate-address with route-map support

Additionally remove trailling/unnecesarry whitespaces and align code
snippets correctly.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotopotests: Add test for checking if route-map is applied for aggregate-address
Donatas Abraitis [Wed, 21 Aug 2019 15:16:17 +0000 (18:16 +0300)]
topotests: Add test for checking if route-map is applied for aggregate-address

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: Apply route-map for aggregate-address command
Donatas Abraitis [Wed, 21 Aug 2019 15:16:05 +0000 (18:16 +0300)]
bgpd: Apply route-map for aggregate-address command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotests: Disable bgp-ecmp-topo2 topotest until proper fix is developed 4976/head
Martin Winter [Thu, 12 Sep 2019 23:58:58 +0000 (01:58 +0200)]
tests: Disable bgp-ecmp-topo2 topotest until proper fix is developed

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #4971 from mjstapp/fix_redist_update_7_2
Donald Sharp [Thu, 12 Sep 2019 21:41:06 +0000 (17:41 -0400)]
Merge pull request #4971 from mjstapp/fix_redist_update_7_2

[7.2] zebra: revise redistribution delete to improve update case

5 years agozebra: revise redistribution delete to improve update case 4971/head
Mark Stapp [Thu, 12 Sep 2019 15:30:42 +0000 (11:30 -0400)]
zebra: revise redistribution delete to improve update case

When selecting a new best route, zebra sends a redist update
when the route is installed. There are cases where redist
clients may not see that redist add - clients who are not
subscribed to the new route type, e.g. In that case, attempt
to send a redist delete for the old/previous route type.

Revised the redist delete api to accomodate both cases;
also tightened up the const-ness of a few internal redist apis.

[7.2 version]

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4944 from donaldsharp/72_increase_time_out
Donatas Abraitis [Sat, 7 Sep 2019 04:11:26 +0000 (07:11 +0300)]
Merge pull request #4944 from donaldsharp/72_increase_time_out

[7.2]tests: Ensure we wait 1 bgp timeout period before declaring failure

5 years agotests: Ensure we wait 1 bgp timeout period before declaring failure 4944/head
Donald Sharp [Fri, 6 Sep 2019 12:46:27 +0000 (08:46 -0400)]
tests: Ensure we wait 1 bgp timeout period before declaring failure

The lib/bgp.py test code is bringing up neighbors and clearing them
to test that things are working appropriately.  The problem we have
is that we are only waiting 30 seconds for declaration of failure.
In a high load system packets can be lost and as such the initial
convergence may not happen.  Modify the test to wait for 1 retry
window test period before declaring failure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4936 from ton31337/feature/documentation_for_rfc8212_7.2
Donald Sharp [Fri, 6 Sep 2019 11:37:16 +0000 (07:37 -0400)]
Merge pull request #4936 from ton31337/feature/documentation_for_rfc8212_7.2

doc: [7.2] Add documentation for `bgp ebgp-requires-policy` command

5 years agodoc: Add documentation for `bgp ebgp-requires-policy` command 4936/head
Donatas Abraitis [Thu, 5 Sep 2019 16:57:46 +0000 (19:57 +0300)]
doc: Add documentation for `bgp ebgp-requires-policy` command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #4932 from sworleys/Static-Route-Dev-Redist-Fix base_7.2
Mark Stapp [Wed, 4 Sep 2019 19:06:55 +0000 (15:06 -0400)]
Merge pull request #4932 from sworleys/Static-Route-Dev-Redist-Fix

staticd: Re-send/Remove routes on interface events

5 years agoMerge pull request #4883 from mjstapp/dplane_vteps
Donald Sharp [Wed, 4 Sep 2019 18:14:20 +0000 (14:14 -0400)]
Merge pull request #4883 from mjstapp/dplane_vteps

Zebra: use dataplane for evpn vtep programming

5 years agoMerge pull request #4930 from donaldsharp/4851_fixup
David Lamparter [Wed, 4 Sep 2019 18:08:37 +0000 (20:08 +0200)]
Merge pull request #4930 from donaldsharp/4851_fixup

isisd: Enabling build with openssl

5 years agoMerge pull request #4789 from sworleys/Nexthop-Sort-Optimization
Mark Stapp [Wed, 4 Sep 2019 17:35:50 +0000 (13:35 -0400)]
Merge pull request #4789 from sworleys/Nexthop-Sort-Optimization

lib: Nexthop Sorting Optimizations

5 years agostaticd: Re-send/Remove routes on interface events 4932/head
Stephen Worley [Wed, 4 Sep 2019 16:38:56 +0000 (12:38 -0400)]
staticd: Re-send/Remove routes on interface events

We were not processing interface up/down events for device only
static routes. This patch looks up the ifp and then calls
the same API we are using for interface add/remove events.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: move EVPN VTEP programming to dataplane 4883/head
Mark Stapp [Mon, 26 Aug 2019 19:44:54 +0000 (15:44 -0400)]
zebra: move EVPN VTEP programming to dataplane

Move VTEP install/uninstall to the zebra dataplane. Remove
synch kernel-facing apis and helper functions.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4877 from mjstapp/dplane_neighs
Donald Sharp [Wed, 4 Sep 2019 14:23:31 +0000 (10:23 -0400)]
Merge pull request #4877 from mjstapp/dplane_neighs

zebra: move evpn neighbors to dataplane

5 years agoisisd: Enabling build with openssl 4930/head
Michal Ruprich [Tue, 20 Aug 2019 09:34:34 +0000 (11:34 +0200)]
isisd: Enabling build with openssl

Similar to PR #4677, I am enabling the openssl library for md5
authentication in IS-IS

Signed-off-by: Michal Ruprich <michalruprich@gmail.com>
5 years agoMerge pull request #4874 from manuhalo/fix_isis_mtu
Donald Sharp [Wed, 4 Sep 2019 11:54:08 +0000 (07:54 -0400)]
Merge pull request #4874 from manuhalo/fix_isis_mtu

isisd: check MTU when configuring circuit

5 years agoMerge pull request #4869 from rtrlib/2019-08-22-bugfix-master
Donald Sharp [Wed, 4 Sep 2019 11:49:14 +0000 (07:49 -0400)]
Merge pull request #4869 from rtrlib/2019-08-22-bugfix-master

bgpd: rpki fixes (master)

5 years agoMerge pull request #4908 from qlyoung/vtysh-find-regexp
Donatas Abraitis [Wed, 4 Sep 2019 11:47:34 +0000 (14:47 +0300)]
Merge pull request #4908 from qlyoung/vtysh-find-regexp

vtysh, lib: allow regexp in `find` command

5 years agoMerge pull request #4918 from brchiu/fix_values_cnt_error
Donald Sharp [Wed, 4 Sep 2019 10:53:33 +0000 (06:53 -0400)]
Merge pull request #4918 from brchiu/fix_values_cnt_error

lib: Fix erroneously setting pointer values_cnt as NULL

5 years agoMerge pull request #4927 from donaldsharp/eigrp_sa_fix
Jafar Al-Gharaibeh [Wed, 4 Sep 2019 06:00:06 +0000 (01:00 -0500)]
Merge pull request #4927 from donaldsharp/eigrp_sa_fix

eigrpd: Fix SA issue with setting but not using

5 years agoMerge pull request #4926 from donaldsharp/pbr_mark
Jafar Al-Gharaibeh [Wed, 4 Sep 2019 02:17:13 +0000 (21:17 -0500)]
Merge pull request #4926 from donaldsharp/pbr_mark

doc: Update pbr to reflect new mark match command.

5 years agoMerge pull request #4925 from ddutt/master
Donald Sharp [Wed, 4 Sep 2019 00:36:53 +0000 (20:36 -0400)]
Merge pull request #4925 from ddutt/master

bgpd: Fixes to error message printed for failed peerings

5 years agolib: Fix erroneously setting pointer values_cnt as NULL 4918/head
Bi-Ruei, Chiu [Mon, 2 Sep 2019 15:28:33 +0000 (23:28 +0800)]
lib: Fix erroneously setting pointer values_cnt as NULL

It should be :

  *values_cnt = 0;

not

  values_cnt = 0;

Signed-off-by: Bi-Ruei, Chiu <biruei.chiu@gmail.com>
5 years agoeigrpd: Fix SA issue with setting but not using 4927/head
Donald Sharp [Tue, 3 Sep 2019 23:22:27 +0000 (19:22 -0400)]
eigrpd: Fix SA issue with setting but not using

We assign a value to the eigrp data structure and then
immediately overwrite it in the for loop.  No need to
do a eigrp_lookup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4924 from Jafaral/gnulinux
Donald Sharp [Tue, 3 Sep 2019 23:21:06 +0000 (19:21 -0400)]
Merge pull request #4924 from Jafaral/gnulinux

zebra: use GNU_LINUX instead of LINUX

5 years agodoc: Update pbr to reflect new mark match command. 4926/head
Donald Sharp [Tue, 3 Sep 2019 23:18:21 +0000 (19:18 -0400)]
doc: Update pbr to reflect new mark match command.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4923 from Jafaral/pbrmark
Donald Sharp [Tue, 3 Sep 2019 23:12:44 +0000 (19:12 -0400)]
Merge pull request #4923 from Jafaral/pbrmark

pbrd: support mark matches

5 years agopbrd: initial fwmark support for pbr matches #4460 4923/head
Marcin Matląg [Wed, 5 Jun 2019 20:56:11 +0000 (22:56 +0200)]
pbrd: initial fwmark support for pbr matches #4460

Adds support to specify marks in pbr-map match clause.
Marks should be provided as decimal (unsigned int).

Currently supported on Linux only. Attempting to configure
marks on other platform will result in:

"pbr marks are not supported on this platform"

Signed-off-by: Marcin Matlag <marcin.matlag@gmail.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
5 years agobgpd: Fixes to error message printed for failed peerings 4925/head
Dinesh G Dutt [Tue, 3 Sep 2019 19:55:49 +0000 (19:55 +0000)]
bgpd: Fixes to error message printed for failed peerings

There was a silly bug introduced when the command to show failed sessions
was added. A missing "," caused the wrong error message to be printed.
Debugging this led down a path that:
   - Led to discovering one more error message that needed to be added
   - Providing the error code along with the string in the JSON output
     to allow programs to key off numbers rather than strings.
   - Fixing the missing ","
   - Changing the error message to "Waiting for Peer IPv6 LLA" to
     make it clear that we're waiting for the link local addr.

Signed-off-by: Dinesh G Dutt <5016467+ddutt@users.noreply.github.com>
5 years agoMerge pull request #4892 from pguibert6WIND/nhtresolvedefaultvrf
Donald Sharp [Tue, 3 Sep 2019 19:40:43 +0000 (15:40 -0400)]
Merge pull request #4892 from pguibert6WIND/nhtresolvedefaultvrf

zebra: nht resolution default configurable per vrf

5 years agozebra: use GNU_LINUX instead of LINUX 4924/head
Jafar Al-Gharaibeh [Tue, 3 Sep 2019 19:22:38 +0000 (14:22 -0500)]
zebra: use GNU_LINUX instead of LINUX

Everywhere else in the code we use GNU_LINUX, that is the symbol we actualy define in the configuration. Don't rely on compiler's built-in symbols.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
5 years agoMerge pull request #4919 from opensourcerouting/config-warnings
Quentin Young [Tue, 3 Sep 2019 18:55:38 +0000 (14:55 -0400)]
Merge pull request #4919 from opensourcerouting/config-warnings

build: error out on implicit missing libcap, warn for protobuf FPM

5 years agoMerge pull request #4604 from opensourcerouting/mutex-sugar
Quentin Young [Tue, 3 Sep 2019 18:55:14 +0000 (14:55 -0400)]
Merge pull request #4604 from opensourcerouting/mutex-sugar

mutex syntactic sugar

5 years agoMerge pull request #4922 from pguibert6WIND/bfd_close_sockets
Rafael Zalamena [Tue, 3 Sep 2019 17:18:13 +0000 (14:18 -0300)]
Merge pull request #4922 from pguibert6WIND/bfd_close_sockets

bfdd: close bfd echo sockets, upon vrf disable

5 years agovtysh, lib: allow regexp in `find` command 4908/head
Quentin Young [Fri, 30 Aug 2019 16:18:11 +0000 (16:18 +0000)]
vtysh, lib: allow regexp in `find` command

¯\_(ツ)_/¯

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: add frr_{each,with} to coding style 4604/head
David Lamparter [Tue, 13 Aug 2019 14:02:51 +0000 (16:02 +0200)]
doc: add frr_{each,with} to coding style

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years ago*: frr_elevate_privs -> frr_with_privs
David Lamparter [Tue, 13 Aug 2019 13:47:23 +0000 (15:47 +0200)]
*: frr_elevate_privs -> frr_with_privs

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agotools: extend checkpatch.pl for frr_{with,each}
David Lamparter [Tue, 13 Aug 2019 13:42:35 +0000 (15:42 +0200)]
tools: extend checkpatch.pl for frr_{with,each}

For frr_each, just fix some existing warnings;  for frr_with_* add a
warning indicating that braces should always be used.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agodoc: add developer docs for frr_with_mutex
David Lamparter [Tue, 6 Aug 2019 10:05:09 +0000 (12:05 +0200)]
doc: add developer docs for frr_with_mutex

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agolib: add frr_with_mutex() block-wrapper
David Lamparter [Fri, 21 Jun 2019 08:58:02 +0000 (10:58 +0200)]
lib: add frr_with_mutex() block-wrapper

frr_with_mutex(...) { ... } locks and automatically unlocks the listed
mutex(es) when the block is exited.  This adds a bit of safety against
forgetting the unlock in error paths & co. and makes the code a slight
bit more readable.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agolib: add some macro helpers
David Lamparter [Fri, 21 Jun 2019 08:58:02 +0000 (10:58 +0200)]
lib: add some macro helpers

Macro soup, now with 50% more macros.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoMerge pull request #4907 from donaldsharp/ospf_write_q
Russ White [Tue, 3 Sep 2019 15:12:35 +0000 (11:12 -0400)]
Merge pull request #4907 from donaldsharp/ospf_write_q

ospfd: Do not turn on write thread unless we have something in it

5 years agoMerge pull request #4886 from satheeshkarra/pim_dbg
Russ White [Tue, 3 Sep 2019 15:11:07 +0000 (11:11 -0400)]
Merge pull request #4886 from satheeshkarra/pim_dbg

pimd: sh config is showing detail debug, though not configured

5 years agobfdd: close bfd echo sockets, upon vrf disable 4922/head
Philippe Guibert [Tue, 3 Sep 2019 14:53:14 +0000 (16:53 +0200)]
bfdd: close bfd echo sockets, upon vrf disable

upon vrf disable, an event informs bfd daemon that the vrf contexts
should be removed. in the case a vrf backend is netns based, all sockets
opened under that netns have to be closed. otherwise it is impossible
for the system to completely close the network namespace. that implies
that some interfaces may not be deleted, and may not be given back to
default vrf.

PR=65291
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Acked-by: Julien Floret <julien.floret@6wind.com>
5 years agoMerge pull request #4888 from donaldsharp/rmap_cleanup
Donatas Abraitis [Tue, 3 Sep 2019 14:42:51 +0000 (17:42 +0300)]
Merge pull request #4888 from donaldsharp/rmap_cleanup

Rmap cleanup

5 years agoMerge pull request #4797 from opensourcerouting/eigrpd-vrf
Russ White [Tue, 3 Sep 2019 13:17:35 +0000 (09:17 -0400)]
Merge pull request #4797 from opensourcerouting/eigrpd-vrf

eigrpd: vrf support

5 years agoMerge pull request #4710 from ashish12pant/ecmp_tests
Martin Winter [Tue, 3 Sep 2019 12:39:14 +0000 (14:39 +0200)]
Merge pull request #4710 from ashish12pant/ecmp_tests

tests: Add ecmp test cases

5 years ago*: Convert some route map functions to return the enum 4888/head
Donald Sharp [Tue, 27 Aug 2019 12:04:43 +0000 (08:04 -0400)]
*: Convert some route map functions to return the enum

Conver these functions:
route_map_add_match
route_map_delete_match
route_map_add_set
route_map_delete_set

To return the `enum rmap_compile_rets` and ensure all functions
that use this code handle all the enumerated possible returns.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Cleanup return codes to use enum values
Donald Sharp [Tue, 27 Aug 2019 11:45:02 +0000 (07:45 -0400)]
lib: Cleanup return codes to use enum values

A couple functions in routemap.c were returning
0/1 that were being mapped into the appropriate
enum values on the calling functions to check return
values.  This matches the return values to the actual
enum for future readability.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4917 from manuhalo/fix_isis_circuit_del
Donald Sharp [Tue, 3 Sep 2019 12:09:00 +0000 (08:09 -0400)]
Merge pull request #4917 from manuhalo/fix_isis_circuit_del

isisd: fix northbound circuit deletion

5 years agoMerge pull request #4920 from ddutt/bgp-summary-upd8
Donald Sharp [Tue, 3 Sep 2019 12:06:22 +0000 (08:06 -0400)]
Merge pull request #4920 from ddutt/bgp-summary-upd8

Add Estd & Dropped counters to JSON output of "show bgp summary" command

5 years agoMerge pull request #4913 from ddutt/master
Donald Sharp [Tue, 3 Sep 2019 12:05:33 +0000 (08:05 -0400)]
Merge pull request #4913 from ddutt/master

bgpd: Add a new command to only show failed peerings

5 years agoMerge pull request #4709 from opensourcerouting/frr-bmp
Russ White [Tue, 3 Sep 2019 11:58:11 +0000 (07:58 -0400)]
Merge pull request #4709 from opensourcerouting/frr-bmp

BMP support

5 years agotests: Fix topojson address-family configuration 4710/head
Ashish Pant [Tue, 3 Sep 2019 01:47:10 +0000 (07:17 +0530)]
tests: Fix topojson address-family configuration

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
address-family configuration was commented out in earlier commit
by mistake. Re-enabling it now.

5 years agotests: Fix topojson static route tests
Ashish Pant [Mon, 29 Jul 2019 04:39:19 +0000 (10:09 +0530)]
tests: Fix topojson static route tests

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Fix static route test in bgp-basic-functionality-topo1 and
example-topojson-test after lib changes

Add example-topojson-test to ignore from pytest.ini

5 years agotests: Add ecmp test cases
Ashish Pant [Mon, 29 Jul 2019 04:38:35 +0000 (10:08 +0530)]
tests: Add ecmp test cases

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adds ecmp test case for ibgp and ebgp topology.

5 years agobgpd: Add Established and Dropped counts to JSON output of bgp summary 4920/head
Dinesh G Dutt [Mon, 2 Sep 2019 19:37:37 +0000 (19:37 +0000)]
bgpd: Add Established and Dropped counts to JSON output of bgp summary

Based on a suggestion by Donald Sharp, this patch adds the counts of the
number of times a BGP peering session has transitioned from Estd->NotEstd
and from NotEstd->Estd to the JSON output only of the
"show [ip] bgp [vrf <vrf>] summary" command. The idea is that even if the
current session is well and up, but a sessions has trasnitionined in and
out of Estd state multiple times, its worth noting that. We cannot change
the non-JSON output as easily, and so this command only addresses the JSON
part for now. The fields added are the ones that were provided only as part
of the "show bgp neighbor" command.

Signed-off-by: Dinesh G Dutt <5016467+ddutt@users.noreply.github.com>
5 years agozebra/fpm: deprecation warning for protobuf 4919/head
David Lamparter [Mon, 2 Sep 2019 18:56:57 +0000 (20:56 +0200)]
zebra/fpm: deprecation warning for protobuf

We agreed on this several weeks ago on the weekly call, I just forgot to
actually put it in a PR...

A call for any Protobuf FPM users to raise their hand came up empty on
both the mailing list as well as Slack.  Let's see if this gets any
response.  If not, it'll be time to remove Protobuf FPM.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobuild: only build without libcap on request
David Lamparter [Mon, 2 Sep 2019 18:52:56 +0000 (20:52 +0200)]
build: only build without libcap on request

Linux FRR builds without libcap are massively slow due to the
signal-based UID/GID synchronization across threads.  This disables the
automatic fallback to build without libcap;  it can still be requested
with "--disable-capabilities" but if the option isn't given in either
direction and we can't find libcap that's an error now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoisisd: fix northbound circuit deletion 4917/head
Emanuele Di Pascale [Mon, 2 Sep 2019 15:06:57 +0000 (17:06 +0200)]
isisd: fix northbound circuit deletion

circuit deletion was being enforced by sending a fake IF_DOWN_FROM_Z
event for the circuit interface. This created a problem when the
circuit was enabled again, since isisd internal state machine was
expecting to see an IF_UP_FROM_Z that never came, as the interface
had not actually gone down.

As a consequence, disabling + re-enabling isis on an interface or
area would leave interfaces in a CONFIG state, and adjacencies were
not restored. Fix this by following the state machine and simply
disabling circuits rather than attempting to delete them forcefully.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agobgpd: Add a new command to only show failed peerings 4913/head
Dinesh G Dutt [Sat, 31 Aug 2019 16:24:49 +0000 (16:24 +0000)]
bgpd: Add a new command to only show failed peerings

In a data center, having 32-128 peers is not uncommon. In such a situation, to find a
peer that has failed and why is several commands. This hinders both the automatability of
failure detection and the ease/speed with which the reason can be found. To simplify this
process of catching a failure and its cause quicker, this patch does the following:

1. Created a new function, bgp_show_failed_summary to display the
   failed summary output for JSON and vty
2. Created a new function to display the reset code/subcode. This is now used in the
   failed summary code and in the show neighbors code
3. Added a new variable failedPeers in all the JSON outputs, including the vanilla
   "show bgp summary" family. This lists the failed session count.
4. Display peer, dropped count, estd count, uptime and the reason for failure as the
   output of "show bgp summary failed" family of commands
5. Added three resset codes for the case where we're waiting for NHT, waiting for peer
   IPv6 addr, waiting for VRF to init.

This also counts the case where only one peer has advertised an AFI/SAFI.

The new command has the optional keyword "failed" added to the classical summary command.

The changes affect only one existing output, that of "show [ip] bgp neighbors <nbr>". As
we track the lack of NHT resolution for a peer or the lack of knowing a peer IPv6 addr,
the output of that command will show a "waiting for NHT" etc. as the last reset reason.

This patch includes update to the documentation too.

Signed-off-by: Dinesh G Dutt <5016467+ddutt@users.noreply.github.com>
5 years agoMerge pull request #4910 from sworleys/Docker-Update-Libyang
Donatas Abraitis [Mon, 2 Sep 2019 14:19:30 +0000 (17:19 +0300)]
Merge pull request #4910 from sworleys/Docker-Update-Libyang

tests: Update Dockerfile to a valid libyang version

5 years agotests: Update Dockerfile to a valid libyang version 4910/head
Stephen Worley [Sat, 31 Aug 2019 14:51:34 +0000 (10:51 -0400)]
tests: Update Dockerfile to a valid libyang version

The built docker container was installing an old version of libyang.
Updated it to point to the most recent build for Debian.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoospfd: Cleanup oi->obuf to always be created 4907/head
Donald Sharp [Fri, 30 Aug 2019 20:14:38 +0000 (16:14 -0400)]
ospfd: Cleanup oi->obuf to always be created

This looks like a finish up of the partial cleanup that
ocurred at some point in time in the past.  When we
alloc oi also always alloc the oi->obuf.  When we delete
oi always delete the oi->obuf right before.

This cleans up a bunch of code to be simpler and hopefully
easier to follow.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospfd: tighten up what functions can be used outside of ospf_packet.c
Donald Sharp [Fri, 30 Aug 2019 20:05:26 +0000 (16:05 -0400)]
ospfd: tighten up what functions can be used outside of ospf_packet.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospfd: Do not turn on write thread unless we have something in it
Donald Sharp [Fri, 30 Aug 2019 10:03:09 +0000 (06:03 -0400)]
ospfd: Do not turn on write thread unless we have something in it

I am rarely seeing this crash:

r2: ospfd crashed. Core file found - Backtrace follows:
[New LWP 32748]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/ospfd'.
Program terminated with signal SIGABRT, Aborted.
2019-08-29 15:59:36,149 ERROR: assert failed at "test_ospf_sr_topo1/test_memory_leak":

Which translates to this code:

node = listhead(ospf->oi_write_q);
assert(node);
oi = listgetdata(node);
assert(oi);

So if we get into ospf_write without anything on the oi_write_q
we are stopping the program.

This is happening because in ospf_ls_upd_queue_send we are calling
ospf_write.  Imagine that we have a interface already on the on_write_q
and then ospf_write handles the packet send for all functions.  We
are not clearing the t_write thread and we are popping and causing
a crash.

Additionally modify OSPF_ISM_WRITE_ON(O) to not just blindly
turn on the t_write thread.  Only do so if we have data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd: Remove redundant asserts

assert(oi) is impossible all listgetdata(node) directly proceeding
it already asserts here, besides a node cannot be created
with a null pointer!

If list_isempty is called directly before the listhead call
it is impossilbe that we do not have a valid pointer here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobuild: Fix checks for c_ares 4709/head
Martin Winter [Thu, 29 Aug 2019 01:49:14 +0000 (03:49 +0200)]
build: Fix checks for c_ares

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agobuild: make BMP optional
David Lamparter [Tue, 13 Aug 2019 14:22:22 +0000 (16:22 +0200)]
build: make BMP optional

Sigh.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobgpd/bmp: BMP implementation
David Lamparter [Wed, 24 Apr 2019 17:33:41 +0000 (19:33 +0200)]
bgpd/bmp: BMP implementation

This implements BMP.  There's no fine-grained history here, the non-BMP
preparations are already split out from here so all that remains is BMP
proper.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd/bmp: convert BMP code into module
David Lamparter [Wed, 24 Apr 2019 15:23:09 +0000 (17:23 +0200)]
bgpd/bmp: convert BMP code into module

This is mostly here for documentation purposes to show how some code is
converted into a module.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd/bmp: use bgp packet dump hook
David Lamparter [Wed, 24 Apr 2019 15:19:09 +0000 (17:19 +0200)]
bgpd/bmp: use bgp packet dump hook

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd/bmp: Initial BMP implementation.
Yasuhiro Ohara [Fri, 15 Feb 2019 09:12:10 +0000 (18:12 +0900)]
bgpd/bmp: Initial BMP implementation.

This is the initial BMP skeleton from Yasuhiro Ohara.

(License/Signoff note: code published on github as GPLv2+.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: add timestamp to bgp_adj_in
David Lamparter [Wed, 17 Jul 2019 13:24:28 +0000 (15:24 +0200)]
bgpd: add timestamp to bgp_adj_in

If we reject a received update in a filter, it never turns into a
bgp_path_info but stays in adj_in.  For that case, we don't have any
timestamp for the update.

Currently, this isn't visible anywhere; BMP will make use of this
timestamp (and we can add a CLI option if we want.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: add monotime_to_realtime()
David Lamparter [Wed, 17 Jul 2019 13:26:00 +0000 (15:26 +0200)]
lib: add monotime_to_realtime()

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: add pull-driven data write handler
David Lamparter [Thu, 9 May 2019 08:43:09 +0000 (10:43 +0200)]
lib: add pull-driven data write handler

This - mostly intended for BMP - implements a pull-driven write buffer
filled on demand by a callback with some reasonable buffering logic.

I don't expect it to be that useful in other places, but it's not BMP
specific so it's properly split off in its own place.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #4794 from opensourcerouting/isis_nexthop_v4v6
Donald Sharp [Fri, 30 Aug 2019 15:26:27 +0000 (11:26 -0400)]
Merge pull request #4794 from opensourcerouting/isis_nexthop_v4v6

isisd: reduce IPv4/IPv6 code duplication

5 years agoMerge pull request #4902 from donaldsharp/more_bgp_test_cleanup
Mark Stapp [Thu, 29 Aug 2019 15:25:52 +0000 (11:25 -0400)]
Merge pull request #4902 from donaldsharp/more_bgp_test_cleanup

tests: Ensure topotests are actually waiting appropriately for peers …

5 years agotests: Ensure topotests are actually waiting appropriately for peers to come up 4902/head
Donald Sharp [Thu, 29 Aug 2019 13:33:47 +0000 (09:33 -0400)]
tests: Ensure topotests are actually waiting appropriately for peers to come up

The FRR bgp topotests are employing a luCommand that looks for bgp peering
to be up on the first router with a `wait` sub-command.  Please note that
a variety of tests are using this.  This wait command has a variety of time
outs being used `30`, `90`, and `300`.  BGP peering with how we compile
it have very long timers and 30( and possibly 90) seconds is clearly not enough when
we are waiting, given the nature of our test beds.  Additionally we were employing a model
where once the first summary command succeeded we automatically assumed that all
subsuquent summary commands( to look at other routers ) would not need to
possibly wait.  This is insufficient in that if I have multiple peerings in
multiple vrf's there is no guarantee that one router peers being up will
be sufficient information to know that all the other routers peers are up.

Modify the test cases to be a bit more conformant about this and to
allow peer checks to actually wait a reasonable amount of time for
all peers to have a chance to come up.

Signed-off-by: Donald Sharp <sharpdc@cumulusnetworks.com>
5 years agoMerge pull request #4891 from donaldsharp/bgp_keepalives
Donatas Abraitis [Thu, 29 Aug 2019 13:22:04 +0000 (16:22 +0300)]
Merge pull request #4891 from donaldsharp/bgp_keepalives

bgpd: Shut off keepalives as soon as we shutdown a peer

5 years agoMerge pull request #4847 from vivek-cumulus/evpn-route-import-fix
Sri Mohana Singamsetty [Thu, 29 Aug 2019 12:50:23 +0000 (05:50 -0700)]
Merge pull request #4847 from vivek-cumulus/evpn-route-import-fix

bgpd: Ensure correct checks for EVPN route import

5 years agoMerge pull request #4896 from donaldsharp/docker_dev_build
Donatas Abraitis [Thu, 29 Aug 2019 07:15:52 +0000 (10:15 +0300)]
Merge pull request #4896 from donaldsharp/docker_dev_build

tests: Modify docker build for local to have dev build

5 years agoMerge pull request #4871 from vishaldhingra/ipv4_linklocal
Donatas Abraitis [Thu, 29 Aug 2019 05:39:52 +0000 (08:39 +0300)]
Merge pull request #4871 from vishaldhingra/ipv4_linklocal

zebra: Added a few more information in route_entry while dumping

5 years agoMerge pull request #4852 from ashish12pant/fix_log
Martin Winter [Thu, 29 Aug 2019 02:35:37 +0000 (04:35 +0200)]
Merge pull request #4852 from ashish12pant/fix_log

tests: Enhance execution logs in topojson

5 years agoMerge pull request #4849 from sworleys/Label-Append-Resolve_2
Mark Stapp [Wed, 28 Aug 2019 19:52:27 +0000 (15:52 -0400)]
Merge pull request #4849 from sworleys/Label-Append-Resolve_2

zebra: Append rparent labels when resolving nexthop

5 years agotests: Modify docker build for local to have dev build 4896/head
Donald Sharp [Wed, 28 Aug 2019 19:50:23 +0000 (15:50 -0400)]
tests: Modify docker build for local to have dev build

Allow a local build of a frr docker container to be built with
`--enable-dev-build`.  This allows better decodes of symbols
which could be useful when you are trying to fix something
that is broken inside the docker container.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>