]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agowatchfrr: Convert `wtf` to a more meaningful message
Donald Sharp [Mon, 16 Sep 2019 18:25:55 +0000 (14:25 -0400)]
watchfrr: Convert `wtf` to a more meaningful message

There is a fairly common state we are seeing where watchfrr
has decided that something is not right and is printing out
a `wtf` message.  At this point I am not sure what is going on
or how we are getting here, but let's add a bit more data dump
to the message so that we can figure out what is going on.

This is mainly being done because at this point in time I have no
clue the what/how of how we got here and I cannot reproduce.
Maybe by adding more useful information here I can figure out what is
going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
4 years agodoc: Add watchfrr documentation
Donald Sharp [Mon, 16 Sep 2019 18:22:22 +0000 (14:22 -0400)]
doc: Add watchfrr documentation

Start the documentation for watchfrr.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agowatchfrr: Allow end users to turn off watchfrr for a particular daemon
Donald Sharp [Mon, 16 Sep 2019 17:47:50 +0000 (13:47 -0400)]
watchfrr: Allow end users to turn off watchfrr for a particular daemon

Allow an end user who is debugging behavior, with say gdb, to turn
off watchfrr and it's attempts to keep control of a daemons up/responsiveness

With code change:
donna.cumulusnetworks.com# show watchfrr
watchfrr global phase: Idle
  zebra                Up
  bgpd                 Up/Ignoring Timeout
  staticd              Up

Now grab bgpd with gdb:

sharpd@donna ~/frr4> date ; sudo gdb -p 27893
Mon 16 Sep 2019 01:44:57 PM EDT
GNU gdb (GDB) Fedora 8.3-6.fc30
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 27893
[New LWP 27894]
[New LWP 27895]
[New LWP 27896]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f1787a3e5c7 in poll () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.29-15.fc30.x86_64 gperftools-libs-2.7-5.fc30.x86_64 json-c-0.13.1-4.fc30.x86_64 libcap-2.26-5.fc30.x86_64 libgcc-9.1.1-1.fc30.x86_64 libgcrypt-1.8.4-3.fc30.x86_64 libgpg-error-1.33-2.fc30.x86_64 libstdc++-9.1.1-1.fc30.x86_64 libxcrypt-4.4.6-2.fc30.x86_64 libyang-0.16.105-1.fc30.x86_64 lua-libs-5.3.5-5.fc30.x86_64 lz4-libs-1.8.3-2.fc30.x86_64 pcre-8.43-2.fc30.x86_64 xz-libs-5.2.4-5.fc30.x86_64
(gdb)

In another window we can see when watchfrr thinks it's not responding:

donna.cumulusnetworks.com# show watchfrr
watchfrr global phase: Idle
  zebra                Up
  bgpd                 Unresponsive/Ignoring Timeout
  staticd              Up

Finally exit gdb and watchfrr now believes bgpd is good to go again:

donna.cumulusnetworks.com# show watchfrr
watchfrr global phase: Idle
  zebra                Up
  bgpd                 Up/Ignoring Timeout
  staticd              Up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4834 from srimohans/support_bundle
Donald Sharp [Sat, 14 Sep 2019 11:47:26 +0000 (07:47 -0400)]
Merge pull request #4834 from srimohans/support_bundle

 tools: Modifications to copy support bundle files

4 years agoMerge pull request #4975 from opensourcerouting/disable-ecmp2-test
Donald Sharp [Sat, 14 Sep 2019 11:43:31 +0000 (07:43 -0400)]
Merge pull request #4975 from opensourcerouting/disable-ecmp2-test

Disable bgp-ecmp-topo2 topotest until proper fix is developed

4 years agoMerge pull request #4969 from ton31337/feature/rewrite_bgp_aggregate-address_route...
Sri Mohana Singamsetty [Fri, 13 Sep 2019 18:03:36 +0000 (11:03 -0700)]
Merge pull request #4969 from ton31337/feature/rewrite_bgp_aggregate-address_route-map_test

tests: Improve bgp_aggregate-address_route-map test

4 years agotools: Adding new commands to the list of support bundle commands
Sri Mohana Singamsetty [Tue, 13 Aug 2019 21:55:21 +0000 (14:55 -0700)]
tools: Adding new commands to the list of support bundle commands

Signed-off-by: Sri Mohana Singamsetty <msingamsetty@vmware.com>
4 years agotools: Modifications to copy support bundle files
Sri Mohana Singamsetty [Tue, 13 Aug 2019 21:53:08 +0000 (14:53 -0700)]
tools: Modifications to copy support bundle files

This commit is to copy the support bundle scripts to appropriate directories during installation

Signed-off-by: Sri Mohana Singamsetty <msingamsetty@vmware.com>
4 years agoMerge pull request #4949 from opensourcerouting/mpls-zapi-improvements
Olivier Dugeon [Fri, 13 Sep 2019 15:36:16 +0000 (17:36 +0200)]
Merge pull request #4949 from opensourcerouting/mpls-zapi-improvements

MPLS zapi improvements

4 years agoMerge pull request #4948 from opensourcerouting/show-mpls-table
Olivier Dugeon [Fri, 13 Sep 2019 15:24:52 +0000 (17:24 +0200)]
Merge pull request #4948 from opensourcerouting/show-mpls-table

zebra: improve the output of "show mpls table"

4 years agoMerge pull request #4973 from qlyoung/yang-ipaddr-user-type
Mark Stapp [Fri, 13 Sep 2019 13:24:16 +0000 (09:24 -0400)]
Merge pull request #4973 from qlyoung/yang-ipaddr-user-type

yang: add user type for ip-address

4 years agoMerge pull request #4978 from ton31337/fix/replace_static_integers_with_macros
Donald Sharp [Fri, 13 Sep 2019 13:13:37 +0000 (09:13 -0400)]
Merge pull request #4978 from ton31337/fix/replace_static_integers_with_macros

bgpd: Use defined constants for NHLEN instead of numeric values

4 years agobgpd: Use defined constants for NHLEN instead of numeric values
Donatas Abraitis [Fri, 13 Sep 2019 08:43:44 +0000 (11:43 +0300)]
bgpd: Use defined constants for NHLEN instead of numeric values

This is better in cases when you need to find specific pattern and/or
replacing.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agotests: Improve bgp_aggregate-address_route-map test
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>
4 years agotests: Disable bgp-ecmp-topo2 topotest until proper fix is developed
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>
4 years agoyang: add user type for ip-address
Quentin Young [Wed, 11 Sep 2019 20:22:31 +0000 (20:22 +0000)]
yang: add user type for ip-address

Convert ietf-inet-types:ip-address to struct ipaddr.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4968 from rubenk/fix-surname
Donald Sharp [Thu, 12 Sep 2019 00:29:20 +0000 (20:29 -0400)]
Merge pull request #4968 from rubenk/fix-surname

doc: Djikstra -> Dijkstra

4 years agodoc: Djikstra -> Dijkstra
Ruben Kerkhof [Wed, 11 Sep 2019 18:35:06 +0000 (20:35 +0200)]
doc: Djikstra -> Dijkstra

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoMerge pull request #4722 from ak503/static
Donald Sharp [Wed, 11 Sep 2019 17:36:55 +0000 (13:36 -0400)]
Merge pull request #4722 from ak503/static

staticd: correct update static route when specify nexthop-vrf

4 years agoMerge pull request #4302 from rgirada/fix_pim_upstream
Donald Sharp [Wed, 11 Sep 2019 17:35:32 +0000 (13:35 -0400)]
Merge pull request #4302 from rgirada/fix_pim_upstream

staticd: static route config should get fail if nexthop configured as  its local connected ip.

4 years agoMerge pull request #4950 from donaldsharp/table_summary
Renato Westphal [Wed, 11 Sep 2019 15:34:07 +0000 (12:34 -0300)]
Merge pull request #4950 from donaldsharp/table_summary

Table summary

4 years agoMerge pull request #4954 from qlyoung/yang-interface-ref
Renato Westphal [Wed, 11 Sep 2019 15:31:49 +0000 (12:31 -0300)]
Merge pull request #4954 from qlyoung/yang-interface-ref

yang: create interface reference type

4 years agoMerge pull request #4962 from donaldsharp/large_admin_distance_tests
Mark Stapp [Wed, 11 Sep 2019 14:46:40 +0000 (10:46 -0400)]
Merge pull request #4962 from donaldsharp/large_admin_distance_tests

Large admin distance tests and documentation

4 years agodoc: Add `show ip route summary` documentation
Donald Sharp [Sat, 7 Sep 2019 00:36:28 +0000 (20:36 -0400)]
doc: Add `show ip route summary` documentation

Add a bit of doc for the `show ip route summary` command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Modify `show ip route summary` to allow you to specify a table
Donald Sharp [Sat, 7 Sep 2019 00:31:41 +0000 (20:31 -0400)]
zebra: Modify `show ip route summary` to allow you to specify a table

Add a bit of extra command `show ip route summary table XXX`
To allow end user to specify a specific table that they want
summary information on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Add admin distance 255 static routes
Donald Sharp [Tue, 10 Sep 2019 23:48:21 +0000 (19:48 -0400)]
tests: Add admin distance 255 static routes

Add a couple of test cases to ensure that admin distance of
255 actually causes the route to be accepted by zebra but
not installed into the linux kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Update documentation to talk about Administrative Distance
Donald Sharp [Tue, 10 Sep 2019 23:43:36 +0000 (19:43 -0400)]
doc: Update documentation to talk about Administrative Distance

The FRR documentation had no discussion about how Administrative
Distance is used.  Update the documentation to reflect the reality
on the ground.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4963 from donaldsharp/fix_topotests_due_to_json
Donatas Abraitis [Wed, 11 Sep 2019 06:15:23 +0000 (09:15 +0300)]
Merge pull request #4963 from donaldsharp/fix_topotests_due_to_json

tests: Fix topotests due to json error

4 years agotests: Fix topotests due to json error
Donald Sharp [Wed, 11 Sep 2019 03:16:01 +0000 (23:16 -0400)]
tests: Fix topotests due to json error

Recent commit: 5fba22485b added a new topotest that used
an older version of FRR that referenced some json code
that was changed in between when the PR was submitted
and when it got in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoyang: create interface reference type
Quentin Young [Mon, 9 Sep 2019 16:59:09 +0000 (16:59 +0000)]
yang: create interface reference type

Instead of copy-pasting a 16 character string type for use as an
interface reference, create a new typedef that leafref's the name node
of an interface. This way the constraints change with the constraints on
an interface name itself, and it's self documenting.

Incidentally ripd and ripngd forgot the 16 character constraint in their
offset-list configs and IS-IS forgot it entirely, so this also fixes
minor bugs.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4958 from donaldsharp/pim_assert_a_saurus
Jafar Al-Gharaibeh [Tue, 10 Sep 2019 18:21:29 +0000 (13:21 -0500)]
Merge pull request #4958 from donaldsharp/pim_assert_a_saurus

pimd: Slightly loosen pim assert message length tests

4 years agoMerge pull request #4866 from ton31337/feature/apply_route-map_for_aggregate-address
Lou Berger [Tue, 10 Sep 2019 15:59:10 +0000 (11:59 -0400)]
Merge pull request #4866 from ton31337/feature/apply_route-map_for_aggregate-address

bgpd: Apply route-map for aggregate-address

4 years agoMerge pull request #4933 from chiragshah6/evpn_dev2
Russ White [Tue, 10 Sep 2019 15:53:08 +0000 (11:53 -0400)]
Merge pull request #4933 from chiragshah6/evpn_dev2

bgpd: clear l3vni prefix-only flag upon deletion

4 years agoMerge pull request #4955 from sworleys/GW-IFINDEX-Verify-Resolve
Russ White [Tue, 10 Sep 2019 15:06:34 +0000 (11:06 -0400)]
Merge pull request #4955 from sworleys/GW-IFINDEX-Verify-Resolve

zebra: Don't resolve to diff interface if given

4 years agopimd: Slightly loosen pim assert message length tests
Donald Sharp [Tue, 10 Sep 2019 14:53:15 +0000 (10:53 -0400)]
pimd: Slightly loosen pim assert message length tests

The Pim RFC does not appear to state any length requirements
of pim, other than the checksum must be correct.

Certain vendors are sending extra data at the end of a pim assert
message.  This while not explicitly against the rules was a bit
of surprise to pim when we threw the assert message on the floor
for being too long.

Modify the test to see if length left will allow us to read
the 8 bytes of data that we need.  If it is sufficient for
that allow the packet to be used.

Fixes: #4957
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4951 from qlyoung/doc-fix-edgar-dijkstra-spelling
Renato Westphal [Tue, 10 Sep 2019 04:15:39 +0000 (01:15 -0300)]
Merge pull request #4951 from qlyoung/doc-fix-edgar-dijkstra-spelling

doc: Edgar -> Edsger

4 years agoospfd: avoid installing SR FTNs twice
Renato Westphal [Tue, 10 Sep 2019 03:30:33 +0000 (00:30 -0300)]
ospfd: avoid installing SR FTNs twice

There's no need to install MPLS FTNs using the ZEBRA_ROUTE_ADD
message since the ZEBRA_MPLS_LABELS_ADD message already does that
(in addition to installing an MPLS LSP).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agolib, zebra: add new MPLS zapi message with route replace semantics
Renato Westphal [Thu, 8 Aug 2019 18:57:13 +0000 (15:57 -0300)]
lib, zebra: add new MPLS zapi message with route replace semantics

This new message makes it possible to install/reinstall LSPs with
multiple nexthops using a single ZAPI message.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agozebra: Don't resolve to diff interface if given
Stephen Worley [Mon, 9 Sep 2019 21:20:17 +0000 (17:20 -0400)]
zebra: Don't resolve to diff interface if given

If the nexthop is of type `GATEWAY_IFINDEX` then the nexthop
should not resolve to a nexthop that has a different ifindex
from the one given.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #4952 from mjstapp/fix_bgp_peer_hook
Quentin Young [Mon, 9 Sep 2019 19:12:36 +0000 (15:12 -0400)]
Merge pull request #4952 from mjstapp/fix_bgp_peer_hook

bgpd: fix build breakage after hook re-definition

4 years agobgpd: fix build breakage after hook re-definition
Mark Stapp [Mon, 9 Sep 2019 16:03:30 +0000 (12:03 -0400)]
bgpd: fix build breakage after hook re-definition

A recent merge re-defined a hook, but one file did not get
the appropriate change.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: Edgar -> Edsger
Quentin Young [Mon, 9 Sep 2019 15:02:21 +0000 (15:02 +0000)]
doc: Edgar -> Edsger

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4809 from martonksz/master
Quentin Young [Mon, 9 Sep 2019 14:55:00 +0000 (10:55 -0400)]
Merge pull request #4809 from martonksz/master

bgpd: hook for bgp peer status change events

4 years agoMerge pull request #4934 from donaldsharp/ospf_reject_or_ignore
Russ White [Sat, 7 Sep 2019 21:41:23 +0000 (17:41 -0400)]
Merge pull request #4934 from donaldsharp/ospf_reject_or_ignore

ospfd: Remove flog_warn for a situation user can never do anything with

4 years agostaticd: static route config should fail if gw configured as its local ip.
rgirada [Fri, 10 May 2019 05:35:48 +0000 (22:35 -0700)]
staticd: static route config should fail if gw configured as its local ip.

Fix:
Added a check in staticd upon receiving nexthop update from zebra such that
it will fail to resolve the nexthop if the connected address added as nexthop.

But still allowing to add to staticd database and appears in running config.
Throwing an warning massage to user if such misconfig issued.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoMerge pull request #4947 from sworleys/Docker-Update-Libcap
Donatas Abraitis [Sat, 7 Sep 2019 07:03:34 +0000 (10:03 +0300)]
Merge pull request #4947 from sworleys/Docker-Update-Libcap

topotests: Add libcap-dev to the Dockerfile

4 years agozebra: improve cleanup of MPLS labels when zclient disconnects
Renato Westphal [Thu, 8 Aug 2019 20:08:36 +0000 (17:08 -0300)]
zebra: improve cleanup of MPLS labels when zclient disconnects

Use the zserv_client_close hook to cleanup all MPLS labels advertised
by a zclient when it disconnects. We were doing this cleanup for
ldpd only, but now we have other daemons that are MPLS aware,
like ospfd (due to the new Segment Routing feature).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agolib, zebra: enhance the MPLS zapi messages
Renato Westphal [Thu, 8 Aug 2019 18:51:05 +0000 (15:51 -0300)]
lib, zebra: enhance the MPLS zapi messages

* Add ability to specify the nexthop type;
* Add ability to install or not a FTN (in addition to an LSP).

These two additions will be useful to install local SR Prefix-SIDs
configured with the no-PHP option.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agolib, zebra: rename LSP type used for OSPF SR
Renato Westphal [Thu, 8 Aug 2019 17:08:36 +0000 (14:08 -0300)]
lib, zebra: rename LSP type used for OSPF SR

SR support for IS-IS is coming so we need to be able to distinguish
OSPF and IS-IS LSPs.

While here, add missing case statement for LDP on
lsp_type_from_re_type().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agozebra: identify MPLS FTNs by route type and instance
Renato Westphal [Thu, 8 Aug 2019 16:56:39 +0000 (13:56 -0300)]
zebra: identify MPLS FTNs by route type and instance

Use the route type and instance instead of the route distance
to identify MPLS FTNs. This is a more robust approach since the
routing daemons can modify the distance of their announced routes
via configuration, which can cause inconsistencies.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agolib: introduce encode/decode functions for the MPLS zapi messages
Renato Westphal [Thu, 8 Aug 2019 00:06:03 +0000 (21:06 -0300)]
lib: introduce encode/decode functions for the MPLS zapi messages

Do this for the following reasons:
* Improve modularity of the code by separating the decoding of the
  ZAPI messages from their processing;
* Create an API that is easier to use by the client daemons.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agozebra: add missing case statement in nhlfe2str()
Renato Westphal [Wed, 7 Aug 2019 23:53:06 +0000 (20:53 -0300)]
zebra: add missing case statement in nhlfe2str()

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agotests: remove topotest compatibility with older ldpd versions
Renato Westphal [Wed, 28 Aug 2019 15:14:10 +0000 (12:14 -0300)]
tests: remove topotest compatibility with older ldpd versions

Now that topotest was integrated into the FRR repository, we
don't need to worry anymore about creating tests that work across
different FRR versions. The topotests present on any branch need
to be compatible only with the FRR daemons from that same branch.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agozebra: improve the output of "show mpls table"
Renato Westphal [Thu, 13 Jun 2019 00:43:34 +0000 (21:43 -0300)]
zebra: improve the output of "show mpls table"

Use the table generator to adjust the columns width according to
the table's content.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agotopotests: Add libcap-dev to the Dockerfile
Stephen Worley [Fri, 6 Sep 2019 22:16:24 +0000 (18:16 -0400)]
topotests: Add libcap-dev to the Dockerfile

Add libcap-dev to the Dockerfile now that its a required depency.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agobgpd: clear l3vni prefix-only flag upon deletion
Chirag Shah [Tue, 27 Aug 2019 21:41:00 +0000 (14:41 -0700)]
bgpd: clear l3vni prefix-only flag upon deletion

When L3vni is created with prefix-only flag,
the flag is set at bgp vrf instance level.
In the case of bgp instance is non auto created,
means user configured instance (i.e 'router bgp x vrf <name>')

Upon deletion of l3vni, clear the prefix-only flag from
bgp vrf instance.

Ticket:CM-21894
Reviewed By:CCR-9176
Testing Done:

vrf vrf1
 vni 104001
 exit-vrf
!
router bgp 650030 vrf vrf1
!

tor-21(config)# vrf vrf1
tor-21(config-vrf)# vni 104001 prefix-routes-only
tor-21(config-vrf)# no vni 104001 prefix-routes-only
tor-21(config-vrf)# end

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoMerge pull request #4937 from mjstapp/fix_evpn_brif
Donald Sharp [Fri, 6 Sep 2019 17:47:38 +0000 (13:47 -0400)]
Merge pull request #4937 from mjstapp/fix_evpn_brif

zebra: avoid using zebra datastructs in evpn dataplane path

4 years agoMerge pull request #4939 from opensourcerouting/optimize-nb-cli
Donald Sharp [Fri, 6 Sep 2019 17:17:21 +0000 (13:17 -0400)]
Merge pull request #4939 from opensourcerouting/optimize-nb-cli

lib: optimize non-transactional cli

4 years agoMerge pull request #4935 from ton31337/feature/documentation_for_rfc8212
Donald Sharp [Fri, 6 Sep 2019 17:17:01 +0000 (13:17 -0400)]
Merge pull request #4935 from ton31337/feature/documentation_for_rfc8212

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

4 years agoMerge pull request #4943 from donaldsharp/increase_test_timeout
Donatas Abraitis [Fri, 6 Sep 2019 15:08:25 +0000 (18:08 +0300)]
Merge pull request #4943 from donaldsharp/increase_test_timeout

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

4 years agotests: Ensure we wait 1 bgp timeout period before declaring failure
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>
4 years agoMerge pull request #4863 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Fri, 6 Sep 2019 04:58:36 +0000 (21:58 -0700)]
Merge pull request #4863 from chiragshah6/evpn_dev1

bgpd: evpn convey svi_ip knob to zebra post vni add

4 years agolib: optimize non-transactional cli
Renato Westphal [Thu, 5 Sep 2019 22:43:27 +0000 (19:43 -0300)]
lib: optimize non-transactional cli

Commit eaf6705d7a fixed a problem caused by configuration changes
coming from the kernel. The fix consisted of regenerating the
candidate configuration before every configuration command (when
using the non-transactional CLI mode). There's no need, however,
to regenerate the candidate when it's identical to the running
configuration. Since the northbound keeps track of the version
of each configuration, we can use that information to prevent
regenerating the candidate configuration when that is not necessary.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agozebra: avoid using zebra datastructs in evpn dataplane path
Mark Stapp [Thu, 5 Sep 2019 16:58:58 +0000 (12:58 -0400)]
zebra: avoid using zebra datastructs in evpn dataplane path

Some netlink-facing code used for evpn/vxlan programming was
being run in the dataplane pthread, but accessing zebra core
datastructs. Move some additional data into the dataplane
context, and use it in the netlink path instead.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: Add documentation for `bgp ebgp-requires-policy` command
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>
4 years agoospfd: Remove flog_warn for a situation user can never do anything with
Donald Sharp [Thu, 5 Sep 2019 16:30:26 +0000 (12:30 -0400)]
ospfd: Remove flog_warn for a situation user can never do anything with

When OSPF receives a Database description packet and is in
`Down`, `Attempt` or `2-Way` state we are creating a warning
for the end user.

rfc2328 states(10.6):
Down - The packet should be rejected
Attempt - The packet should be rejected
2-Way - The packet should be ignored

I cannot find any instructions in the rfc to state what the operational
difference is between rejected and ignored.  Neither can I figure
out what FRR expects the end user to do with this information.
I can see this information being useful if we encounter a bug
down the line and we have gathered a bunch of data.  As such
let's modify the code to remove the flog_warn and convert
the message to a debug level message that can be controlled by
appropriate debug statements.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: protect some vxlan debugs
Mark Stapp [Thu, 5 Sep 2019 15:05:03 +0000 (11:05 -0400)]
zebra: protect some vxlan debugs

Some VXLAN debugs weren't covered by 'if debug...' tests.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #4932 from sworleys/Static-Route-Dev-Redist-Fix
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

4 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

4 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

4 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

4 years agostaticd: Re-send/Remove routes on interface events
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>
4 years agozebra: move EVPN VTEP programming to dataplane
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>
4 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

4 years agoisisd: Enabling build with openssl
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>
4 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

4 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)

4 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

4 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

4 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

4 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.

4 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

4 years agolib: Fix erroneously setting pointer values_cnt as NULL
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>
4 years agoeigrpd: Fix SA issue with setting but not using
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>
4 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

4 years agodoc: Update pbr to reflect new mark match command.
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>
4 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

4 years agopbrd: initial fwmark support for pbr matches #4460
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>
4 years agobgpd: Fixes to error message printed for failed peerings
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>
4 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

4 years agozebra: use GNU_LINUX instead of LINUX
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>
4 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

4 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

4 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

4 years agovtysh, lib: allow regexp in `find` command
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>
4 years agodoc: add frr_{each,with} to coding style
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>
4 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>
4 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>
4 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>
4 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>