]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #6939 from sworleys/NH-Vrf-Del
Mark Stapp [Wed, 19 Aug 2020 16:15:56 +0000 (12:15 -0400)]
Merge pull request #6939 from sworleys/NH-Vrf-Del

lib: fix crash in show nexthop when vrf deleted

4 years agoMerge pull request #6941 from donaldsharp/bgp_json_crash
Renato Westphal [Wed, 19 Aug 2020 15:08:44 +0000 (12:08 -0300)]
Merge pull request #6941 from donaldsharp/bgp_json_crash

bgpd: Prevent crash when displaying json of a vrf all command

4 years agoMerge pull request #6920 from opensourcerouting/nb-errors-apply-phase
Donald Sharp [Wed, 19 Aug 2020 12:15:24 +0000 (08:15 -0400)]
Merge pull request #6920 from opensourcerouting/nb-errors-apply-phase

lib: don't ignore error messages generated during the commit apply phase

4 years agoMerge pull request #6943 from ton31337/fix/replace_sizeof_instead_of_constant_for_bgp...
Renato Westphal [Wed, 19 Aug 2020 10:36:13 +0000 (07:36 -0300)]
Merge pull request #6943 from ton31337/fix/replace_sizeof_instead_of_constant_for_bgp_dump_attr

bgpd: Use sizeof() in bgp_dump_attr()

4 years agolib: fix crash in show nexthop when vrf deleted
Stephen Worley [Tue, 18 Aug 2020 15:24:22 +0000 (11:24 -0400)]
lib: fix crash in show nexthop when vrf deleted

Fix a crash where if we issue a show run after a vrf has been
deleted we would crash here due to not null checking.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agobgpd: Use sizeof() in bgp_dump_attr()
Donatas Abraitis [Tue, 18 Aug 2020 18:43:07 +0000 (21:43 +0300)]
bgpd: Use sizeof() in bgp_dump_attr()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Prevent crash when displaying json of a vrf all command
Donald Sharp [Tue, 18 Aug 2020 17:54:03 +0000 (13:54 -0400)]
bgpd: Prevent crash when displaying json of a vrf all command

When iterating over a `show ip bgp vrf all neighbors json` command
bgp is crashing.

The json variable was being double freed.  When freeing it, set it
to NULL and then check to make sure it exists before we free.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5702 from vishaldhingra/bgp_nb
Quentin Young [Tue, 18 Aug 2020 15:50:09 +0000 (11:50 -0400)]
Merge pull request #5702 from vishaldhingra/bgp_nb

bgpd : bgp yang definition

4 years agoMerge pull request #6929 from donaldsharp/bgp_relax_do_not_do_it
Russ White [Tue, 18 Aug 2020 15:23:52 +0000 (11:23 -0400)]
Merge pull request #6929 from donaldsharp/bgp_relax_do_not_do_it

bgpd: Actually respect RFC 6286 for router_id

4 years agoMerge pull request #6937 from donaldsharp/git_blame_can_be_awesome
Lou Berger [Tue, 18 Aug 2020 15:23:06 +0000 (11:23 -0400)]
Merge pull request #6937 from donaldsharp/git_blame_can_be_awesome

*: Give git a clue about our whitespace changes

4 years agoMerge pull request #6918 from opensourcerouting/bgp-double-statement-removal
Quentin Young [Tue, 18 Aug 2020 15:11:07 +0000 (11:11 -0400)]
Merge pull request #6918 from opensourcerouting/bgp-double-statement-removal

bgpd: removal of double statement.

4 years ago*: Give git a clue about our whitespace changes
Donald Sharp [Tue, 18 Aug 2020 11:54:07 +0000 (07:54 -0400)]
*: Give git a clue about our whitespace changes

If you issue this command:

`git config blame.ignoreRevsFile .git-blame-ignore-revs`

Then when you do a git blame XXX, git will ignore the whitespace
changes we made in mass.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Actually respect RFC 6286 for router_id
Donald Sharp [Mon, 17 Aug 2020 17:52:19 +0000 (13:52 -0400)]
bgpd: Actually respect RFC 6286 for router_id

The RFC states:
      The BGP Identifier is a 4-octet, unsigned, non-zero integer that
      should be unique within an AS.  The value of the BGP Identifier
      for a BGP speaker is determined on startup and is the same for
      every local interface and every BGP peer.

We were going slightly beyond this and ensuring that the address
was a specific range of addresses which is no longer relevant.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6724 from Niral-Networks/niral_dev_vrf_isis_core_pr4
Donald Sharp [Sat, 15 Aug 2020 11:16:29 +0000 (07:16 -0400)]
Merge pull request #6724 from Niral-Networks/niral_dev_vrf_isis_core_pr4

ISIS VRF: Transformational changes to support different VRFs.

4 years agolib: don't ignore error messages generated during the commit apply phase
Renato Westphal [Fri, 14 Aug 2020 22:49:41 +0000 (19:49 -0300)]
lib: don't ignore error messages generated during the commit apply phase

While a configuration transaction can't be rejected once it reaches
the APPLY phase, we should allow NB callbacks to generate error
or warning messages when a configuration change is being applied.
That should be useful, for example, to return warnings back to
the user informing that the applied configuration has some kind of
inconsistency or is missing something in order to be effectively
activated. The infrastructure for this was already present, but the
northbound layer was ignoring all errors/warnings generated during
the apply/abort phases instead of returning them to the user. This
commit changes that.

In the gRPC plugin, extend the Commit() RPC adding a new
"error_message" field to the response type. This is necessary to
allow errors/warnings to be returned even when the commit operation
succeeds (since grpc::Status::OK doesn't support error messages
like the other status codes).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd : Transformational changes to support different VRFs.
Kaushik [Mon, 13 Jul 2020 12:37:59 +0000 (05:37 -0700)]
isisd : Transformational changes to support different VRFs.

1. Created a structure "isis master".
2. All the changes are related to handle ISIS with different vrf.
3. A new variable added in structure "isis" to store the vrf name.
4. The display commands for isis is changed to support different VRFs.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
4 years agoMerge pull request #6898 from opensourcerouting/grpc-proto-relicensing
Quentin Young [Fri, 14 Aug 2020 18:57:12 +0000 (14:57 -0400)]
Merge pull request #6898 from opensourcerouting/grpc-proto-relicensing

grpc: relicense the northbound service description file

4 years agoMerge pull request #6889 from opensourcerouting/isisd-assorted-fixes
Donald Sharp [Fri, 14 Aug 2020 16:50:03 +0000 (12:50 -0400)]
Merge pull request #6889 from opensourcerouting/isisd-assorted-fixes

isisd minor fixes and enhancements

4 years agoMerge pull request #6863 from donaldsharp/bfd_v6_shenanigans
Rafael Zalamena [Fri, 14 Aug 2020 16:12:47 +0000 (16:12 +0000)]
Merge pull request #6863 from donaldsharp/bfd_v6_shenanigans

bfdd: Allow it to work when V6 is completely turned off

4 years agobgpd: yang defination
vdhingra [Wed, 27 May 2020 08:30:34 +0000 (01:30 -0700)]
bgpd: yang defination

Yang files for bgpd to use northbound APIs

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: vishaldhingra <vdhingra@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
4 years agobfdd: Allow it to work when V6 is completely turned off
Donald Sharp [Wed, 5 Aug 2020 17:10:27 +0000 (13:10 -0400)]
bfdd: Allow it to work when V6 is completely turned off

Experimental patch to allow us to discuss if we should
allow bfdd to work when v6 is turned off in the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6883 from pjdruddy/evpn-refactor
Donald Sharp [Fri, 14 Aug 2020 13:02:25 +0000 (09:02 -0400)]
Merge pull request #6883 from pjdruddy/evpn-refactor

Evpn refactor

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 agobgpd: removal of double statement.
David Schweizer [Fri, 14 Aug 2020 04:50:40 +0000 (06:50 +0200)]
bgpd: removal of double statement.

This fix removes an unnecessary second occurrence of a statement.

Signed-off-by: David Schweizer <david.schweizer@davischw.ch>
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 agozebra: clean up SA warning in EVPN code
Pat Ruddy [Wed, 12 Aug 2020 12:01:22 +0000 (13:01 +0100)]
zebra: clean up SA warning in EVPN code

Use asserts rather thank test where the values should definitely
not be NULL.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
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 agozebra: Revert "zebra: probe local inactive neigh"
Chirag Shah [Fri, 7 Aug 2020 20:01:58 +0000 (13:01 -0700)]
zebra: Revert "zebra: probe local inactive neigh"

Reverting probing of neigh entry. There is a timing where
probe and remote macip add request comes at the same time resulting
in neigh to remain in local state event though it should be remote.

In mobility case, the host moves to remote VTEP, first MAC only type-2
route is received which triggers a PROBE of neighs (associated to MAC).
PROBE request can go via network port to remote VTEP.

PROBE request picks up local neigh with MAC entry's outgoing port is
remote VTEP tunnel port.
The PROBE reply and MAC-IP (containing IP) almost comes same time at
DUT.

DUT first processes remote macip and installs neigh as remote.
Followed by receives neigh as REACHABLE which marks neigh as LOCAL.

FRR does have BPF filter which does not allow its own netlink request
to receive. Otherwise frr's request to program neigh as remote can move
neigh from local to remote.

Though ordering can not be guranteed that REACHABLE (PROBE's repsonse)
can come at anytime and move it to LOCAL.

This fix would not suffice the needs of converging LOCAL inactive neighs
to remove from DB. As mobility draft sugges to PROBE local neigh when
MAC moves to remote but it is not working with current framework.

Ticket:CM-22864

This reverts commit 44bc8ae5508975f216ad1cbb42884579896e7258

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agozebra: fix SA NULL ptr access warning in evpn_mh
Anuradha Karuppiah [Tue, 11 Aug 2020 15:04:25 +0000 (08:04 -0700)]
zebra: fix SA NULL ptr access warning in evpn_mh

Warning logs -
Logic error: Dereference of null pointer in zebra_evpn_mh.c, function zebra_evpn_es_evi_show_vni, line 360
See https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13544/artifact/shared/static_analysis/report-b1eb72.html#EndPath

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: extract core EVPN functions from zebra_vxlan.c
Pat Ruddy [Mon, 10 Aug 2020 16:40:48 +0000 (17:40 +0100)]
zebra: extract core EVPN functions from zebra_vxlan.c

extract the core EVPN functions from zebra_vxlan.c and put them in
a new file zebra_evpn.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: clone zebra_vxlan.c to zebra_evpn.c
Pat Ruddy [Mon, 27 Apr 2020 10:15:35 +0000 (11:15 +0100)]
zebra: clone zebra_vxlan.c to zebra_evpn.c

clone zebra_vxlan.c to create a file zebra_evpn.c for core
EVPN functions whilst retaining the history of zebra_vxlan.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: extract neighbor processing from kernel_neigh_del
Pat Ruddy [Fri, 24 Apr 2020 14:04:19 +0000 (15:04 +0100)]
zebra: extract neighbor processing from kernel_neigh_del

extract the neighbor uninstall part of
zebra_vxlan_handle_kernel_neigh_del into a new function
zebra_evpn_neigh_del_ip in zebra_evpn_neigh.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: extract neighbor processing from process_remote_macip_del
Pat Ruddy [Fri, 24 Apr 2020 13:50:23 +0000 (14:50 +0100)]
zebra: extract neighbor processing from process_remote_macip_del

extract the neighbor uninstall  part of process_remote_macip_add
into a new function zebra_evpn_neigh_remote_uninstall in
zebra_evpn_neigh.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: extract neigbor processing from zevpn_gw_macip_add
Pat Ruddy [Fri, 24 Apr 2020 13:27:49 +0000 (14:27 +0100)]
zebra: extract neigbor processing from zevpn_gw_macip_add

extract the neighbor part of process_remote_macip_add into a new
function zebra_evpn_neigh_gw_macip_add in zebra_evpn_neigh.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: extract neigbor processing from remote_macip_add
Pat Ruddy [Fri, 24 Apr 2020 12:48:31 +0000 (13:48 +0100)]
zebra: extract neigbor processing from remote_macip_add

extract the neighbor part of process_remote_macip_add into a new
function process_neigh_remote_macip_add in zebra_evpn_neigh.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: extract neighbor functions from zebra_vxlan.c
Pat Ruddy [Thu, 23 Jul 2020 22:30:23 +0000 (15:30 -0700)]
zebra: extract neighbor functions from zebra_vxlan.c

Move neighbor processing functions to new zebra_evpn_neigh.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: clone zebra_vxlan.c to zebra_evpn_neigh.c
Pat Ruddy [Thu, 23 Apr 2020 09:22:17 +0000 (10:22 +0100)]
zebra: clone zebra_vxlan.c to zebra_evpn_neigh.c

clone zebra_vxlan.c to create a file zebra_evpn_neigh.c for neighbor
dB functions whilst retaining the history of zebra_vxlan.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: extract gateway mac add from zebra_vxlan.c
Pat Ruddy [Wed, 22 Apr 2020 15:30:52 +0000 (16:30 +0100)]
zebra: extract gateway mac add from zebra_vxlan.c

extract mac_gateway add code from zevi_gw_macip_add and move it to
a new generic function zebra_evpn_mac_gw_macip_add in zebra_evpn_mac.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: extract local mac del from zebra_vxlan.c
Pat Ruddy [Wed, 22 Apr 2020 15:12:08 +0000 (16:12 +0100)]
zebra: extract local mac del from zebra_vxlan.c

extract generic local mac add code from zebra_vxlan_local_mac_del
into a new function zebra_evpn_del_local_mac in zebra_evpn_mac.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: extract local mac add code from vxlan
Pat Ruddy [Thu, 23 Jul 2020 22:04:53 +0000 (15:04 -0700)]
zebra: extract local mac add code from vxlan

extract the local mac add code from zebra_vxlan_local_mac_add_update
and create a new generic local mac add function
zebra_evpn_add_update_local_mac

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: split out mac_add code from process_remote_macip_add
Pat Ruddy [Wed, 22 Apr 2020 11:37:08 +0000 (12:37 +0100)]
zebra: split out mac_add code from process_remote_macip_add

Move MAC add code from process_remote_macip_add in zebra_vxlan.c
to a generic function process_mac_remote_macip_add in
zebra_evpn_mac.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: extract evpn mac functions from zebra_vxlan.c
Pat Ruddy [Thu, 23 Jul 2020 21:58:45 +0000 (14:58 -0700)]
zebra: extract evpn mac functions from zebra_vxlan.c

Move MAC dB specific functions to zebra_evpn_mac.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: clone zebra_vxlan.c to zebra_evpn_mac.c
Pat Ruddy [Tue, 21 Apr 2020 14:12:09 +0000 (15:12 +0100)]
zebra: clone zebra_vxlan.c to zebra_evpn_mac.c

clone zebra_vxlan.c to create a file zebra_evpn_mac.c for MAC dB
functions whilst retaining the history of zebra_vxlan.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: rename vni to evpn where appropriate
Pat Ruddy [Thu, 23 Jul 2020 21:51:10 +0000 (14:51 -0700)]
zebra: rename vni to evpn where appropriate

The main zebra_vni_t hash structure has been renamed to zebra_evpn_t
to allow for other transport underlays. Rename functions and variables
to reflect this change.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agotests: remove ifindex from VNI JSON comparison
Pat Ruddy [Tue, 2 Jun 2020 10:47:24 +0000 (11:47 +0100)]
tests: remove ifindex from VNI JSON comparison

Since the values of ifindices cannot be relied upon across
distributions, simpy remove them from the VNI JSON being compared.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agotests: add EVPN IP learning tests
Pat Ruddy [Fri, 17 Apr 2020 11:29:13 +0000 (12:29 +0100)]
tests: add EVPN IP learning tests

add tests to check IP address/MAC address associations are learned
from netlink NEWNEIGH messages and are propagated to the remote PE

Signed-off-by: Pat Ruddy <pat@voltanet.io>
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 agogrpc: relicense the northbound service description file
Renato Westphal [Tue, 11 Aug 2020 23:58:00 +0000 (20:58 -0300)]
grpc: relicense the northbound service description file

The GPL license is too restrictive and can "contaminate" client scripts
using language bindings auto-generated from this file. We don't want
this to happen. Adopt the BSD-2-Clause license to avoid any problem
of this nature.

Signed-off-by: Renato Westphal <renato@opensourcerouting.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 agolib: introduce new list_dup() API
Renato Westphal [Tue, 11 Aug 2020 02:21:59 +0000 (23:21 -0300)]
lib: introduce new list_dup() API

This new function will be used by the upcoming TI-LFA code.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
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 agoisisd: make calculation of the SPF run duration more correct
Renato Westphal [Tue, 11 Aug 2020 02:20:05 +0000 (23:20 -0300)]
isisd: make calculation of the SPF run duration more correct

Don't use the same starting time for all SPF trees otherwise the
results won't be accurate (they will accumulate instead of being
computed separately).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: introduce per-area list of IS-IS adjacencies
Renato Westphal [Tue, 11 Aug 2020 02:09:12 +0000 (23:09 -0300)]
isisd: introduce per-area list of IS-IS adjacencies

This should simplify all code that needs to iterate over all
adjacencies of a given area (iterating over all adjacencies of all
circuits is cumbersome).

While here, repurpose isis_adj_exists() into a lookup function,
making it more generally useful.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: remove unnecessary QOBJ usage
Renato Westphal [Tue, 11 Aug 2020 02:04:19 +0000 (23:04 -0300)]
isisd: remove unnecessary QOBJ usage

The global isis structure can't be created/destroyed using the CLI,
so there's no need to define a QOBJ for it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: use ISIS_LEVELS instead of hardcoded array sizes whenever possible
Renato Westphal [Tue, 11 Aug 2020 02:01:15 +0000 (23:01 -0300)]
isisd: use ISIS_LEVELS instead of hardcoded array sizes whenever possible

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: modify signature of isis_area_destroy()
Renato Westphal [Mon, 10 Aug 2020 15:23:14 +0000 (12:23 -0300)]
isisd: modify signature of isis_area_destroy()

Make that function accept an IS-IS area pointer instead of an
area name, making it more in line with the rest of the code base
(*delete() functions shouldn't perform lookups internally).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: normalize CLI help strings to always use IS-IS
Renato Westphal [Mon, 10 Aug 2020 14:42:31 +0000 (11:42 -0300)]
isisd: normalize CLI help strings to always use IS-IS

Some commands were using IS-IS while others were using ISIS. Fix
this inconsistency (prefer the former option for obvious reasons).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>