]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
4 years agoMerge pull request #6899 from opensourcerouting/bfd-knobs
Donald Sharp [Fri, 14 Aug 2020 12:54:36 +0000 (08:54 -0400)]
Merge pull request #6899 from opensourcerouting/bfd-knobs

bfdd: support passive mode and minimum TTL

4 years agoMerge pull request #6914 from opensourcerouting/rmap-error-msgs
Donald Sharp [Fri, 14 Aug 2020 12:47:19 +0000 (08:47 -0400)]
Merge pull request #6914 from opensourcerouting/rmap-error-msgs

lib: show prefix error message on configuration failure

4 years agoMerge pull request #6892 from opensourcerouting/feature/sr-te-staticd
Donald Sharp [Thu, 13 Aug 2020 23:19:37 +0000 (19:19 -0400)]
Merge pull request #6892 from opensourcerouting/feature/sr-te-staticd

staticd: add support for SR Policies

4 years agolib: show prefix error message on command failure
Rafael Zalamena [Thu, 13 Aug 2020 22:59:47 +0000 (19:59 -0300)]
lib: show prefix error message on command failure

Use `args->errmsg` instead of just `zlog_info` for registering the error
so the users don't need to check their log files.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6913 from ton31337/feature/dump_attributes_for_debugging_if_malformed
Donald Sharp [Thu, 13 Aug 2020 22:35:27 +0000 (18:35 -0400)]
Merge pull request #6913 from ton31337/feature/dump_attributes_for_debugging_if_malformed

bgpd: Dump attributes before returning from bgp_attr_malformed()

4 years agobgpd: Dump attributes before returning from bgp_attr_malformed()
Donatas Abraitis [Thu, 13 Aug 2020 15:42:31 +0000 (18:42 +0300)]
bgpd: Dump attributes before returning from bgp_attr_malformed()

This would be handy for situations when a notification was sent, but it's
absolutely not clear who triggered that.

Just in case dumping all attributes under the debug mode would help finding
the _bad_ attribute.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #6908 from qlyoung/vrrp-add-vrf-module
Renato Westphal [Thu, 13 Aug 2020 14:10:03 +0000 (11:10 -0300)]
Merge pull request #6908 from qlyoung/vrrp-add-vrf-module

vrrpd: add frr-vrf yang module

4 years agoMerge pull request #6869 from xThaid/zebra_arp
Donald Sharp [Thu, 13 Aug 2020 13:47:52 +0000 (09:47 -0400)]
Merge pull request #6869 from xThaid/zebra_arp

lib, zebra: add support for sending ARP requests

4 years agoMerge pull request #6909 from donaldsharp/weird_dump_commands
Sri Mohana Singamsetty [Thu, 13 Aug 2020 03:42:34 +0000 (20:42 -0700)]
Merge pull request #6909 from donaldsharp/weird_dump_commands

tools: Remove zebra commands that have never existed

4 years agotools: Remove zebra commands that have never existed
Donald Sharp [Thu, 13 Aug 2020 00:59:47 +0000 (20:59 -0400)]
tools: Remove zebra commands that have never existed

The support bundle feature(tm) asks for some data
from zebra in the form of a command that has
never existed in FRR.  Looks like some
cruft snuck in remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agovrrpd: add frr-vrf yang module
Quentin Young [Wed, 12 Aug 2020 21:45:06 +0000 (17:45 -0400)]
vrrpd: add frr-vrf yang module

Can't have interfaces without vrf modules, since interfaces cross
reference vrfs.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoospfd: send ARP requests using zebra
Jakub Urbańczyk [Thu, 6 Aug 2020 11:36:22 +0000 (13:36 +0200)]
ospfd: send ARP requests using zebra

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agosharpd: add a command to send ARP/NDP requests
Jakub Urbańczyk [Thu, 6 Aug 2020 11:33:47 +0000 (13:33 +0200)]
sharpd: add a command to send ARP/NDP requests

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agolib, zebra: add support for sending ARP requests
Jakub Urbańczyk [Thu, 6 Aug 2020 11:07:01 +0000 (13:07 +0200)]
lib, zebra: add support for sending ARP requests

We can make the Linux kernel send an ARP/NDP request by adding
a neighbour with the 'NUD_INCOMPLETE' state and the 'NTF_USE' flag.

This commit adds new dataplane operation as well as new zapi message
to allow other daemons send ARP/NDP requests.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agotopotests: new BFD test for multi hop features
Rafael Zalamena [Wed, 12 Aug 2020 00:19:49 +0000 (21:19 -0300)]
topotests: new BFD test for multi hop features

Add a new test to cover the new features for multi hop BFD peers:

- Test that we correctly receive TTL from protocol integration.
- Check minimum TTL usage and 'show' command.
- Check for passive mode.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6906 from donaldsharp/poll_error
Mark Stapp [Wed, 12 Aug 2020 16:23:29 +0000 (12:23 -0400)]
Merge pull request #6906 from donaldsharp/poll_error

Poll error

4 years agotopotests: fix default BFD peer shutdown state
Rafael Zalamena [Wed, 12 Aug 2020 11:26:45 +0000 (08:26 -0300)]
topotests: fix default BFD peer shutdown state

The commit `bfdd: simplify and remove duplicated code` fixed a problem
that was causing the protocol configuration to override the user
configuration.

In this test case: the peer was configured to be disabled (default is
`shutdown`) and the test was expecting it to get activated (`no shutdown`)
when the protocol converged. I changed the peer default state to
`no shutdown`, however another way to get the same effect is to
configure the protocol to use a profile or don't configure a peer at all
(and use the defaults).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6748 from chiragshah6/yang_nb5
Renato Westphal [Wed, 12 Aug 2020 13:52:29 +0000 (10:52 -0300)]
Merge pull request #6748 from chiragshah6/yang_nb5

lib: yang wrapper for getting empty type

4 years agolib: Properly handle POLLERR from poll()
Donald Sharp [Wed, 12 Aug 2020 13:49:20 +0000 (09:49 -0400)]
lib: Properly handle POLLERR from poll()

There are situations where POLLERR will be returned.  But
since we were not handling it.  Thread processing effectively
is turned into an infinite loop, which is bad.

Modify the code so that if we receive a POLLERR we turn it
into a read event to be handled as an error from the handler
function.

This was discovered in pim:

Thread statistics for pimd:
Showing poll FD's for main
--------------------------
Count: 14/1024
     0 fd:     9 events: 1 revents: 0 mroute_read
     1 fd:    12 events: 1 revents: 0 vty_accept
     2 fd:    13 events: 1 revents: 0 vtysh_accept
     3 fd:    11 events: 1 revents: 0 zclient_read
     4 fd:    15 events: 1 revents: 0 mroute_read
     5 fd:    16 events: 1 revents: 0 mroute_read
     6 fd:    17 events: 1 revents: 0 pim_sock_read
     7 fd:    19 events: 1 revents: 0 pim_sock_read
     8 fd:    21 events: 1 revents: 0 pim_igmp_read
     9 fd:    22 events: 1 revents: 0 pim_sock_read
    10 fd:    23 events: 1 revents: 0 pim_sock_read
    11 fd:    20 events: 1 revents: 0 vtysh_read
    12 fd:    18 events: 1 revents: 0 pim_sock_read
    13 fd:    24 events: 0 revents: 0

strace was showing this line over and over and over:

poll([{fd=9, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=11, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}, {fd=23, events=POLLIN}, {fd=20, events=POLLIN}, {fd=18, events=POLLIN}, {fd=6, events=POLLIN}], 14, 20) = 1 ([{fd=21, revents=POLLERR}])

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Fixup comment indentations in thread.c
Donald Sharp [Wed, 12 Aug 2020 13:46:44 +0000 (09:46 -0400)]
lib: Fixup comment indentations in thread.c

Somewhere along the way the indentation for comments got
all messed up.  Let's make it follow our standards and
also look right too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agostaticd: add support for SR Policies
Sebastien Merle [Fri, 14 Feb 2020 14:49:25 +0000 (14:49 +0000)]
staticd: add support for SR Policies

Configuration example:

    ip route 9.9.9.9/32 6.6.6.6 color 123

The SR Policy to be chosen is uniquely identified by the policy
endpoint (6.6.6.6) and the SR-TE color (123). Traffic will be
augmented with an MPLS label stack according to the active
candidate path of that particular policy.

Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
4 years agodoc: add BFD minimum TTL documentation
Rafael Zalamena [Tue, 11 Aug 2020 17:59:09 +0000 (14:59 -0300)]
doc: add BFD minimum TTL documentation

Let the user know what the new command does.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobfdd: implement minimum TTL
Rafael Zalamena [Tue, 11 Aug 2020 17:43:56 +0000 (14:43 -0300)]
bfdd: implement minimum TTL

Initial BFD protocol implementation had a hard coded value of maximum 5
hops, now we have a configurable hop amount with a safe default of 1
hop.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotools: nb generate callback script to use attr
Chirag Shah [Wed, 15 Jul 2020 20:43:04 +0000 (13:43 -0700)]
tools: nb generate callback script to use attr

northbound genrate callback script to use attr->event
in case passed in generated callbacks..

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agolib: yang wrapper for getting empty type
Chirag Shah [Wed, 15 Jul 2020 20:36:47 +0000 (13:36 -0700)]
lib: yang wrapper for getting empty type

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoMerge pull request #6829 from qlyoung/fix-vrrp-northbound-autocreated-uaf
Renato Westphal [Tue, 11 Aug 2020 23:28:30 +0000 (20:28 -0300)]
Merge pull request #6829 from qlyoung/fix-vrrp-northbound-autocreated-uaf

Fix vrrp northbound autocreated uaf

4 years agoMerge pull request #6874 from chiragshah6/mdev
Renato Westphal [Tue, 11 Aug 2020 23:27:00 +0000 (20:27 -0300)]
Merge pull request #6874 from chiragshah6/mdev

zebra: fix crash in vrf-vni mapping

4 years agoMerge pull request #6895 from mjstapp/fix_topo_vpls_timeout
Donald Sharp [Tue, 11 Aug 2020 21:21:08 +0000 (17:21 -0400)]
Merge pull request #6895 from mjstapp/fix_topo_vpls_timeout

tests: add time to ldp vpls testcase

4 years agovrrpd: log errmsg, stricter nb validation
Quentin Young [Tue, 11 Aug 2020 18:24:56 +0000 (14:24 -0400)]
vrrpd: log errmsg, stricter nb validation

* When failing a config transaction due to a VRID conflict, describe the
  error in the provided space
* When validating, allow the NB userdata lookup for interface object to
  soft fail; but when applying, assert if it does not exist

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #6820 from donaldsharp/random_stuff
Mark Stapp [Tue, 11 Aug 2020 20:07:58 +0000 (16:07 -0400)]
Merge pull request #6820 from donaldsharp/random_stuff

Some ad-hoc work that is independent of actual bug fixes/feature work I am doing

4 years agodoc: add BFD passive mode documentation
Rafael Zalamena [Mon, 10 Aug 2020 20:26:24 +0000 (17:26 -0300)]
doc: add BFD passive mode documentation

Let the user know what the new command does.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobfdd: simplify and remove duplicated code
Rafael Zalamena [Mon, 10 Aug 2020 20:17:16 +0000 (17:17 -0300)]
bfdd: simplify and remove duplicated code

Move the session configuration application logic to a single function.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobfdd: implement passive mode
Rafael Zalamena [Thu, 6 Aug 2020 19:25:44 +0000 (16:25 -0300)]
bfdd: implement passive mode

The passive mode is briefly described in the RFC 5880 Bidirectional
Forwarding Detection (BFD), Section 6.1. Overview:

> A system may take either an Active role or a Passive role in session
> initialization.  A system taking the Active role MUST send BFD
> Control packets for a particular session, regardless of whether it
> has received any BFD packets for that session.  A system taking the
> Passive role MUST NOT begin sending BFD packets for a particular
> session until it has received a BFD packet for that session, and thus
> has learned the remote system's discriminator value.  At least one
> system MUST take the Active role (possibly both).  The role that a
> system takes is specific to the application of BFD, and is outside
> the scope of this specification.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoyang: add new BFD configuration leaves
Rafael Zalamena [Thu, 6 Aug 2020 18:51:33 +0000 (15:51 -0300)]
yang: add new BFD configuration leaves

The two new configurations knobs are:

* Passsive mode
* Minimum TTL

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agovrrpd: fix improper NB query during validation
Quentin Young [Thu, 30 Jul 2020 20:44:46 +0000 (16:44 -0400)]
vrrpd: fix improper NB query during validation

We were querying the NB for an interface and expecting it to exist, but
we were doing this during a validation run when the interface hasn't yet
been created, resulting in an abort. Adjust validation checks to handle
this scenario.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agovrrpd: don't allow autocreated vr's in NB layer
Quentin Young [Tue, 2 Jun 2020 19:33:05 +0000 (15:33 -0400)]
vrrpd: don't allow autocreated vr's in NB layer

Changing properties on an autoconfigured VRRP instance results in its
pointer being stored as a userdata in the NB tree, leading to UAF when
autoconfigure deletes the instance and then later NB operations take
place using the now-stale pointer.

Ticket: CM-29850
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #6755 from xThaid/dplane_batching
Donald Sharp [Tue, 11 Aug 2020 17:59:12 +0000 (13:59 -0400)]
Merge pull request #6755 from xThaid/dplane_batching

zebra: dataplane batching

4 years agoMerge pull request #6885 from GalaxyGorilla/ospf_sr_ri_fix
Donald Sharp [Tue, 11 Aug 2020 17:13:28 +0000 (13:13 -0400)]
Merge pull request #6885 from GalaxyGorilla/ospf_sr_ri_fix

ospfd: fix processing of SR RI LSAs

4 years agoMerge pull request #6894 from mjstapp/fix_sa_vxlan
Donald Sharp [Tue, 11 Aug 2020 17:12:08 +0000 (13:12 -0400)]
Merge pull request #6894 from mjstapp/fix_sa_vxlan

zebra: clean up SA warning in vxlan code

4 years agoMerge pull request #6893 from DmitriyEshenko/dmvpn-example
Donald Sharp [Tue, 11 Aug 2020 17:05:24 +0000 (13:05 -0400)]
Merge pull request #6893 from DmitriyEshenko/dmvpn-example

docs: Add dmvpn example

4 years agoMerge pull request #6870 from donaldsharp/test_fixups
Mark Stapp [Tue, 11 Aug 2020 16:40:52 +0000 (12:40 -0400)]
Merge pull request #6870 from donaldsharp/test_fixups

Test fixups

4 years agodoc: Update sharp watch command documentation slightly
Donald Sharp [Sat, 11 Jul 2020 01:59:23 +0000 (21:59 -0400)]
doc: Update sharp watch command documentation slightly

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agosharpd: Cleanup help text
Donald Sharp [Sat, 11 Jul 2020 01:52:54 +0000 (21:52 -0400)]
sharpd: Cleanup help text

Help text was a bit inconsistent/wrong.  Fix it like you mixed it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Only note time of first nht registration
Donald Sharp [Sat, 11 Jul 2020 01:48:05 +0000 (21:48 -0400)]
zebra: Only note time of first nht registration

We were noticing registration time of the last nht time.
Let's just store the original time, although I am a bit
dubious about the usefulness of this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6801 from ton31337/feature/force_maximum-prefix_for_filtered_routes
Russ White [Tue, 11 Aug 2020 15:52:05 +0000 (11:52 -0400)]
Merge pull request #6801 from ton31337/feature/force_maximum-prefix_for_filtered_routes

bgpd: Add a knob to force maximum-prefix even for filtered routes

4 years agotests: add time to ldp vpls testcase
Mark Stapp [Tue, 11 Aug 2020 13:33:39 +0000 (09:33 -0400)]
tests: add time to ldp vpls testcase

Add some more wait time to an LDP vpls testcase - it seems to have
trouble in the CI sometimes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: clean up SA warning in vxlan code
Mark Stapp [Tue, 11 Aug 2020 12:39:25 +0000 (08:39 -0400)]
zebra: clean up SA warning in vxlan code

Resolve an SA warning in the vxlan code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodocs: Add dmvpn example
DmitriyEshenko [Mon, 10 Aug 2020 19:45:50 +0000 (22:45 +0300)]
docs: Add dmvpn example

Signed-off-by: Dmitriy Eshenko <dmitriy.eshenko@vyos.io>
4 years agoMerge pull request #6888 from qlyoung/doc-ebgp-mulithop
Donald Sharp [Tue, 11 Aug 2020 12:20:11 +0000 (08:20 -0400)]
Merge pull request #6888 from qlyoung/doc-ebgp-mulithop

doc: document effect of ebgp-multihop

4 years agoMerge pull request #6886 from opensourcerouting/grpc-doc
Quentin Young [Mon, 10 Aug 2020 20:53:48 +0000 (16:53 -0400)]
Merge pull request #6886 from opensourcerouting/grpc-doc

doc: initial documentation for gRPC

4 years agodoc: add documentation for the dataplane batching
Jakub Urbańczyk [Mon, 10 Aug 2020 18:34:31 +0000 (20:34 +0200)]
doc: add documentation for the dataplane batching

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agotests: zebra netlink testcases
Jakub Urbańczyk [Mon, 3 Aug 2020 18:23:56 +0000 (20:23 +0200)]
tests: zebra netlink testcases

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: design changes in netlink batching code
Jakub Urbańczyk [Mon, 3 Aug 2020 14:51:56 +0000 (16:51 +0200)]
zebra: design changes in netlink batching code

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: remove old kernel one-update-at-a-time api
Jakub Urbańczyk [Thu, 30 Jul 2020 22:15:51 +0000 (00:15 +0200)]
zebra: remove old kernel one-update-at-a-time api

The old one is replaced by the api that is suitable for the batching.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: netlink message batching
Jakub Urbańczyk [Wed, 15 Jul 2020 13:14:08 +0000 (15:14 +0200)]
zebra: netlink message batching

Integrate existing functions with batching infrastructure.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agoMerge pull request #6887 from donaldsharp/pim_sec_addr_fixup
Jafar Al-Gharaibeh [Mon, 10 Aug 2020 19:40:57 +0000 (14:40 -0500)]
Merge pull request #6887 from donaldsharp/pim_sec_addr_fixup

pimd: Allow multiple secondary addresses to work

4 years agodoc: initial documentation for gRPC
Rafael Zalamena [Sun, 9 Aug 2020 21:04:30 +0000 (18:04 -0300)]
doc: initial documentation for gRPC

Give the FRR users some examples of gRPC usage in scripts to let them
start experimenting with the new configuration interface provided by
YANG/northbound.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: document effect of ebgp-multihop
Quentin Young [Mon, 10 Aug 2020 19:32:38 +0000 (15:32 -0400)]
doc: document effect of ebgp-multihop

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agozebra: add netlink message batching infrastructure
Jakub Urbańczyk [Wed, 15 Jul 2020 13:13:18 +0000 (15:13 +0200)]
zebra: add netlink message batching infrastructure

Add helpers to batch several messages into one single netlink datagram.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: remove "PENDING" dplane request state
Jakub Urbańczyk [Wed, 15 Jul 2020 13:12:22 +0000 (15:12 +0200)]
zebra: remove "PENDING" dplane request state

This request state is redundant with new message batching interface.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: prepare dplane for batching
Jakub Urbańczyk [Wed, 15 Jul 2020 13:11:21 +0000 (15:11 +0200)]
zebra: prepare dplane for batching

Extend kernel interface to allow the data plane to send many kernel
updates at once.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agoMerge pull request #6783 from opensourcerouting/feature/sr-te
Russ White [Mon, 10 Aug 2020 19:31:35 +0000 (15:31 -0400)]
Merge pull request #6783 from opensourcerouting/feature/sr-te

lib, zebra: Add SR-TE policy infrastructure to zebra

4 years agopimd: Allow multiple secondary addresses to work
Donald Sharp [Mon, 10 Aug 2020 14:32:17 +0000 (10:32 -0400)]
pimd: Allow multiple secondary addresses to work

Suppose you have more than 2 addresses on a pim interface:
lo              up      default         10.255.0.1/32
                                        10.255.0.101/32
                                        10.255.0.254/32

A `show ip pim int lo` gives us this:

eva# show ip pim interface lo
Interface  : lo
State      : up
Address    : 10.255.0.1 (primary)
             10.255.0.101/32

When we go look at the code that pulls secondary addresses in
we are using a prefix_cmp to know if we know about a secondary already
but were expecting true values instead of -1/0/1 being returned.

Modify code so that pim sees all secondary addresses

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoospfd: fix processing of SR RI LSAs
GalaxyGorilla [Mon, 10 Aug 2020 10:25:16 +0000 (10:25 +0000)]
ospfd: fix processing of SR RI LSAs

Router Information are contained in opaque LSAs and when such a LSA
is received a new SR node for the advertising router is created.

However, the RI related data is currently not set when such a SR node
already exists. This can happen when e.g. link and prefix information
arrive before the RI and therefore an SR node is created.

This is now fixed by setting the data everytime the RI is received,
independent of the SR node already existing or not.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agoMerge pull request #6483 from sylane/router-id-v6
Donald Sharp [Mon, 10 Aug 2020 12:39:51 +0000 (08:39 -0400)]
Merge pull request #6483 from sylane/router-id-v6

zebra: add IPv6 router-id

4 years agoMerge pull request #6877 from opensourcerouting/misc-docstring-fix
Donatas Abraitis [Sun, 9 Aug 2020 18:49:03 +0000 (21:49 +0300)]
Merge pull request #6877 from opensourcerouting/misc-docstring-fix

bgpd,lib: add missing doc strings

4 years agoMerge pull request #6879 from LabNConsulting/working/lb/valgrind-supp-libyang
Donald Sharp [Sun, 9 Aug 2020 00:15:16 +0000 (20:15 -0400)]
Merge pull request #6879 from LabNConsulting/working/lb/valgrind-supp-libyang

bgpd: suppress new libyang_1.0 related loss reports

4 years agobgpd: suppress new libyang_1.0 related loss reports
Lou Berger [Sat, 8 Aug 2020 21:56:18 +0000 (17:56 -0400)]
bgpd: suppress new libyang_1.0 related loss reports

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agozebra: fix crash in vrf-vni mapping
Chirag Shah [Thu, 6 Aug 2020 18:18:42 +0000 (11:18 -0700)]
zebra: fix crash in vrf-vni mapping

As part of PR 6758 vrf vni converted to transactional cli.
Handle a scenario where vrf is not created yet (inactive) and vni
is mapped to the inactive vrf.

Testing Done:

bharat(config-vrf)# do show vrf
vrf vrf1 id 11 table 1001
vrf vrf5 inactive (configured)

bharat(config)# vrf vrf5
bharat(config-vrf)# vni 5005

bharat(config-vrf)# do show vrf vni
VRF                                   VNI        VxLAN IF             L3-SVI               State Rmac
vrf5                                  5005       None                 None                 Down  None

bharat(config-vrf)# no vni 5005
bharat(config-vrf)# do show vrf vni
VRF                                   VNI        VxLAN IF             L3-SVI               State Rmac

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agolib: fix missing doc string in route map
Rafael Zalamena [Fri, 7 Aug 2020 17:37:02 +0000 (14:37 -0300)]
lib: fix missing doc string in route map

Add the missing route map doc string for call command.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobgpd: fix missing doc string in evpn
Rafael Zalamena [Fri, 7 Aug 2020 17:32:58 +0000 (14:32 -0300)]
bgpd: fix missing doc string in evpn

Add the missing EVPN doc string in the show command.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6875 from opensourcerouting/bgpd-fsm-legacy-cleanup
Donald Sharp [Fri, 7 Aug 2020 16:44:48 +0000 (12:44 -0400)]
Merge pull request #6875 from opensourcerouting/bgpd-fsm-legacy-cleanup

bgpd: fsm legacy thread reset cleanup

4 years agoMerge pull request #6517 from vishaldhingra/submodule
Donald Sharp [Fri, 7 Aug 2020 15:09:25 +0000 (11:09 -0400)]
Merge pull request #6517 from vishaldhingra/submodule

lib: Add support to load submodules in embedded modules framework

4 years agoMerge pull request #6872 from vincentbernat/fix/bgp4mib-vrf
Donatas Abraitis [Fri, 7 Aug 2020 15:04:47 +0000 (18:04 +0300)]
Merge pull request #6872 from vincentbernat/fix/bgp4mib-vrf

bgpd: implement bgpPeerTable accross VRFs

4 years agobgpd: fsm legacy thread reset cleanup
David Schweizer [Thu, 6 Aug 2020 14:58:45 +0000 (16:58 +0200)]
bgpd: fsm legacy thread reset cleanup

* Removed old timer thread resets, since this has been taken care of
  after execution of the threads by the thread_fetch function in
  lib/thread.c for quite some time now.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
4 years agolib, zebra: Add SR-TE policy infrastructure to zebra
Sebastien Merle [Mon, 20 Jul 2020 11:43:54 +0000 (13:43 +0200)]
lib, zebra: Add SR-TE policy infrastructure to zebra

For the sake of Segment Routing (SR) and Traffic Engineering (TE)
Policies there's a need for additional infrastructure within zebra.
The infrastructure in this PR is supposed to manage such policies
in terms of installing binding SIDs and LSPs. Also it is capable of
managing MPLS labels using the label manager, keeping track of
nexthops (for resolving labels) and notifying interested parties about
changes of a policy/LSP state. Further it enables a route map mechanism
for BGP and SR-TE colors such that learned BGP routes can be mapped
onto SR-TE Policies.

This PR does not introduce any usable features by now, it is just
infrastructure for other upcoming PRs which will introduce 'pathd',
a new SR-TE daemon.

Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
4 years agolib: add possibility to search non-recursively for NB node entries
GalaxyGorilla [Tue, 10 Mar 2020 09:30:20 +0000 (09:30 +0000)]
lib: add possibility to search non-recursively for NB node entries

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agozebra: Fix selection of label chunks in label manager
GalaxyGorilla [Thu, 27 Feb 2020 12:57:13 +0000 (12:57 +0000)]
zebra: Fix selection of label chunks in label manager

For allocating a new label range the label manager will loop
the existing label chunks and compare the start and end labels
with the label range in question. In case a label range should
be re-allocated to the existing label chunk, the end label
of the chunk is not honored correctly, e.g. the new label
range has to be a true subset of the existing label chunk.

This is very easy reproducable by re-allocating a single label.
e.g. a label range of size 1.

This problem is fixed by allowing the mentioned 'end' labels to
be equal.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agolib: add generic struct ipaddr comparison function
Sebastien Merle [Wed, 11 Dec 2019 15:40:39 +0000 (16:40 +0100)]
lib: add generic struct ipaddr comparison function

Signed-off-by: Sebastien Merle <sebastien@netdef.org>
4 years agoMerge pull request #6616 from mobash-rasool/yang-fix
Renato Westphal [Thu, 6 Aug 2020 22:07:56 +0000 (19:07 -0300)]
Merge pull request #6616 from mobash-rasool/yang-fix

ospfd: YANG Model definition for OSPFv2

4 years agotests: `no learning` is not accepted
Donald Sharp [Thu, 30 Jul 2020 13:43:42 +0000 (09:43 -0400)]
tests: `no learning` is not accepted

The vxlan `ip... ` command is failing because we are passing in
`no learning` and that is failing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Add some small clues to what dut is having the issue
Donald Sharp [Thu, 30 Jul 2020 13:42:52 +0000 (09:42 -0400)]
tests: Add some small clues to what dut is having the issue

Add a bit of a clue to the test_evpn_type5_topo1.py script
to what dut is failing, when things go south.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Fix off by one error in no vni command
Donald Sharp [Thu, 6 Aug 2020 12:29:34 +0000 (08:29 -0400)]
zebra: Fix off by one error in no vni command

Commit: e2bcfa3946aadc62af53cf53ff8d2f9fe7e5bab1

Introduced a off by one error in the `no vni XXX` command:
@@ -2337,12 +2336,10 @@ DEFUN (no_vrf_vni_mapping,
        "VNI-ID\n"
        "prefix-routes-only\n")
 {
-       int ret = 0;
        int filter = 0;
-       char err[ERR_STR_SZ];
-       vni_t vni = strtoul(argv[2]->arg, NULL, 10);

        ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+       vni_t vni = strtoul(argv[1]->arg, NULL, 10);

        assert(vrf);
        assert(zvrf);

Fix it.

Fixes: #6867
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6873 from mjstapp/fix_topo_retry_sigterm
Donald Sharp [Thu, 6 Aug 2020 20:28:25 +0000 (16:28 -0400)]
Merge pull request #6873 from mjstapp/fix_topo_retry_sigterm

tests: stop daemons consistently in mem leak path

4 years agoMerge pull request #6587 from AnuradhaKaruppiah/evpn-mh-pr-1
Rafael Zalamena [Thu, 6 Aug 2020 19:49:14 +0000 (19:49 +0000)]
Merge pull request #6587 from AnuradhaKaruppiah/evpn-mh-pr-1

EVPN Multihoming part-1

4 years agobgpd: implement bgpPeerTable accross VRFs
Vincent Bernat [Thu, 6 Aug 2020 15:23:06 +0000 (17:23 +0200)]
bgpd: implement bgpPeerTable accross VRFs

Currently, bgpPeerTable only looks the default BGP instance. Most
vendors return all the available peers in this table. This commit
exposes all BGP instances.

The other tables are unchanged as it doesn't make sense to expose
routes from random VRFs into a single table. Vendors are using SNMP
contexts for that but we don't have support for it. Therefore, do
nothing.

Fix #6077

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
4 years agotests: stop daemons consistently in mem leak path
Mark Stapp [Thu, 6 Aug 2020 15:47:12 +0000 (11:47 -0400)]
tests: stop daemons consistently in mem leak path

When the topotest mem-leak reporting is enabled, use the same
two-step daemon stop procedure that's used in
the topogen.stop_topology path.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoospfd: YANG Model definition for OSPFv2
Mobashshera Rasool [Fri, 19 Jun 2020 09:05:49 +0000 (09:05 +0000)]
ospfd: YANG Model definition for OSPFv2

Initial version of OSPF configuration Yang.

Raised new PR with review comment fixes on top of PR
https://github.com/FRRouting/frr/pull/6055

Revision History:
1. Fixed review comments.
2. Removed ospf list with id as key, name can be used as key
3. Corrected the alignment

Co-authored-by : Santosh P K <sapk@vmware.com>
Co-authored-by : Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
4 years agoMerge pull request #6871 from CHKDSK88/doc_openwrt
Donald Sharp [Thu, 6 Aug 2020 13:51:03 +0000 (09:51 -0400)]
Merge pull request #6871 from CHKDSK88/doc_openwrt

doc: Update instructions for building for OpenWrt

4 years agoMerge pull request #6854 from mjstapp/sharp_lsp_update
Donald Sharp [Thu, 6 Aug 2020 13:43:12 +0000 (09:43 -0400)]
Merge pull request #6854 from mjstapp/sharp_lsp_update

sharpd: support 'update lsp' zapi testing

4 years agoMerge pull request #6859 from mjstapp/fix_dplane_sa_again
Donald Sharp [Thu, 6 Aug 2020 13:42:33 +0000 (09:42 -0400)]
Merge pull request #6859 from mjstapp/fix_dplane_sa_again

zebra: fix coverity SA warning in dataplane

4 years agodoc: Update instructions for building for OpenWrt
Pawel Dembicki [Thu, 6 Aug 2020 12:32:38 +0000 (14:32 +0200)]
doc: Update instructions for building for OpenWrt

Frr was added to official OpenWrt repo. No need to use
unofficial sources from Github PR.

Signed-off-by: Pawel Dembicki <p.dembicki@wb.com.pl>
4 years agoMerge pull request #6866 from chiragshah6/mdev
Renato Westphal [Thu, 6 Aug 2020 00:00:24 +0000 (21:00 -0300)]
Merge pull request #6866 from chiragshah6/mdev

lib: yang afi-safi identityref translation

4 years agoMerge pull request #6864 from volta-networks/fix_ldp_oc_withdraw
Renato Westphal [Wed, 5 Aug 2020 23:59:22 +0000 (20:59 -0300)]
Merge pull request #6864 from volta-networks/fix_ldp_oc_withdraw

ldpd: ldp-oc withdraw fix

4 years agolib: yang afi-safi identityref translation
Chirag Shah [Wed, 5 Aug 2020 21:38:49 +0000 (14:38 -0700)]
lib: yang afi-safi identityref translation

Add more afi safis in conversion to-from string
to indentityref.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoldpd: ldp-oc withdraw fix
lynne [Wed, 5 Aug 2020 19:22:08 +0000 (15:22 -0400)]
ldpd: ldp-oc withdraw fix

When LDP is configured in Order Control mode and we receive a
label withdraw message, we should only resend label withdraws to
peers that are the NH for that fec being withdrawn.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
4 years agoMerge pull request #6847 from donaldsharp/time_to_rerun
Donatas Abraitis [Wed, 5 Aug 2020 14:34:46 +0000 (17:34 +0300)]
Merge pull request #6847 from donaldsharp/time_to_rerun

Time to rerun

4 years agoMerge pull request #6850 from mobash-rasool/pim-fixes
Donald Sharp [Wed, 5 Aug 2020 14:03:50 +0000 (10:03 -0400)]
Merge pull request #6850 from mobash-rasool/pim-fixes

pimd: crash fix when RP is removed

4 years agotopotests: initial set of tests for evpn multihoming
Anuradha Karuppiah [Thu, 16 Jul 2020 21:09:03 +0000 (14:09 -0700)]
topotests: initial set of tests for evpn multihoming

The base topology is a two level CLOS with two racks. There are
two PEs/TORs in each rack that provide active-active redundancy to
two dual-attached servers in the rack. And EVPN-PIM is used for
flooded traffic.
Reference: evpn-mh-topo-tests.pdf

Tests have been added for the following functionality -
1. ES management
2. EAD/Type-1 route handling
3. Type-2 route with non-zero ESI
4. MAC sync and remote MAC (with remote-ES destination) handling

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: add ESI to the "show evpn mac vni <> mac <> json" output
Anuradha Karuppiah [Mon, 20 Jul 2020 15:37:46 +0000 (08:37 -0700)]
zebra: add ESI to the "show evpn mac vni <> mac <> json" output

Sample output -
=============
anuradhak-VirtualBox# anuradhak-VirtualBox# show evpn mac vni 1000 mac 00:00:00:00:00:22 json

{
  "00:00:00:00:00:22":{
    "type":"remote",
    "remoteVtep":"0.0.0.0",
    "localSequence":0,
    "remoteSequence":0,
    "detectionCount":0,
    "isDuplicate":false,
    "syncNeighCount":0,
    "esi":"03:44:38:39:ff:ff:02:00:00:02", >>>>>>>>>>>>>>>>
    "neighbors":"none"
  }
}

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>