]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
4 years agobgp: rename bgp_node to bgp_dest 6630/head
Donald Sharp [Thu, 26 Mar 2020 23:11:58 +0000 (19:11 -0400)]
bgp: rename bgp_node to bgp_dest

This is the bulk part extracted from "bgpd: Convert from `struct
bgp_node` to `struct bgp_dest`".  It should not result in any functional
change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoMerge pull request #6625 from ton31337/fix/network_check_import_for_static_bgp
Russ White [Tue, 23 Jun 2020 10:55:53 +0000 (06:55 -0400)]
Merge pull request #6625 from ton31337/fix/network_check_import_for_static_bgp

bgpd: Do not treat the route as martian for static BGP routes

4 years agoMerge pull request #6626 from volta-networks/fix_stream_getf
Quentin Young [Mon, 22 Jun 2020 20:47:25 +0000 (16:47 -0400)]
Merge pull request #6626 from volta-networks/fix_stream_getf

lib: fix STREAM_GETF macro

4 years agolib: fix STREAM_GETF macro 6626/head
Emanuele Di Pascale [Mon, 22 Jun 2020 17:02:56 +0000 (19:02 +0200)]
lib: fix STREAM_GETF macro

a missing '!' operator was making any STREAM_GETF fail
when in fact it should have succeeded. As a consequence
of this, for example, many link-params of an interface
were not being read and populated.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #6600 from mjstapp/fix_ldp_zlog_tmp
Renato Westphal [Mon, 22 Jun 2020 16:14:21 +0000 (13:14 -0300)]
Merge pull request #6600 from mjstapp/fix_ldp_zlog_tmp

ldpd: clean up temp zlog files

4 years agobgpd: Do not treat the route as martian for static BGP routes 6625/head
Donatas Abraitis [Mon, 22 Jun 2020 13:23:24 +0000 (16:23 +0300)]
bgpd: Do not treat the route as martian for static BGP routes

If we have something like:
```
ip route 1.1.1.0/24 Null0
!
router bgp 100
 no bgp ebgp-requires-policy
 neighbor 192.168.0.2 remote-as 200
 !
 address-family ipv4 unicast
  network 1.1.1.0/24
  redistribute connected
 exit-address-family
!
line vty
!
```

1.1.1.0/24 is not advertised due to martian nexthop (0.0.0.0). It starts
working only when we use `redistribute static`.

By checking if it's a BGP static route we able to announce
1.1.1.0/24 with `network 1.1.1.0/24` without redistribute even when
`bgp import-check` is enabled.

Disabling `bgp import-check` works as well, but it's enabled by default
since 7.4.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #6601 from Jafaral/version
Donald Sharp [Mon, 22 Jun 2020 12:03:08 +0000 (08:03 -0400)]
Merge pull request #6601 from Jafaral/version

build: Allow removal of build configs from version string

4 years agoldpd: clean up temp zlog files 6600/head
Mark Stapp [Wed, 17 Jun 2020 14:00:03 +0000 (10:00 -0400)]
ldpd: clean up temp zlog files

Clean up the temp zlog dirs in /var/tmp/frr/ that the ldpd
child processes were leaving. The child processes do a non-
standard lib init/deinit, so they need to explicitly deinit
the zlog module.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6617 from Niral-Networks/niral_dev_isis_vrf
Donald Sharp [Fri, 19 Jun 2020 20:45:23 +0000 (16:45 -0400)]
Merge pull request #6617 from Niral-Networks/niral_dev_isis_vrf

ISIS VRF: Route info with vrf_id from ISIS to Zebra

4 years agoISIS VRF: Route info with vrf_id from ISIS to Zebra 6617/head
Kaushik [Fri, 19 Jun 2020 18:46:12 +0000 (11:46 -0700)]
ISIS VRF: Route info with vrf_id from ISIS to Zebra

1. The "VRF_DEFAULT" param is changed to "isis->vrf_id" before
   sending the routes to zebra.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
4 years agobuild: Allow removal of build configs from version string 6601/head
Jafar Al-Gharaibeh [Wed, 17 Jun 2020 16:48:34 +0000 (11:48 -0500)]
build: Allow removal of build configs from version string

A new config option `--disable-version-build-config`
allows you to show short version string by dropping
"configured with:" and all of its build configs

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agoMerge pull request #6615 from opensourcerouting/build-assorted-20200619
Donald Sharp [Fri, 19 Jun 2020 10:18:20 +0000 (06:18 -0400)]
Merge pull request #6615 from opensourcerouting/build-assorted-20200619

build: assorted fixes (protobuf, frr-format)

4 years agoMerge pull request #6613 from donaldsharp/monotonic_mononity
Jafar Al-Gharaibeh [Fri, 19 Jun 2020 04:47:40 +0000 (23:47 -0500)]
Merge pull request #6613 from donaldsharp/monotonic_mononity

bgpd: Use time since epoch for timestamps for bmp updates

4 years agoMerge pull request #6556 from mjstapp/sharp_multi_session
Jafar Al-Gharaibeh [Fri, 19 Jun 2020 04:46:17 +0000 (23:46 -0500)]
Merge pull request #6556 from mjstapp/sharp_multi_session

sharpd: add zclient session create and delete

4 years agoMerge pull request #6614 from qlyoung/fix-evpnmh-reload
Jafar Al-Gharaibeh [Fri, 19 Jun 2020 04:41:55 +0000 (23:41 -0500)]
Merge pull request #6614 from qlyoung/fix-evpnmh-reload

tools: 'evpn mh' is a new one-line context

4 years agoMerge pull request #6610 from donaldsharp/too_much_pim
Jafar Al-Gharaibeh [Fri, 19 Jun 2020 04:39:41 +0000 (23:39 -0500)]
Merge pull request #6610 from donaldsharp/too_much_pim

pimd: Poorly ported code fix

4 years agoMerge pull request #6606 from opensourcerouting/bfdd-fixes
Donald Sharp [Fri, 19 Jun 2020 01:24:00 +0000 (21:24 -0400)]
Merge pull request #6606 from opensourcerouting/bfdd-fixes

topotests: stabilize bfd-vrf-topo1

4 years agobuild: fix frr-format warnings 6615/head
David Lamparter [Thu, 18 Jun 2020 23:09:10 +0000 (01:09 +0200)]
build: fix frr-format warnings

Unfortunately, the way the frr-format plugin is set up, snprintf() with
PRId64 can generate false warnings :|.  Easy workaround is to use
snprintfrr().

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobuild: fix protobuf dependencies
David Lamparter [Thu, 18 Jun 2020 23:07:58 +0000 (01:07 +0200)]
build: fix protobuf dependencies

Need to list #include'd header files in Makefile to make sure it builds
correctly.

Fixes: #6576
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agotools: 'evpn mh' is a new one-line context 6614/head
Quentin Young [Wed, 17 Jun 2020 20:52:43 +0000 (16:52 -0400)]
tools: 'evpn mh' is a new one-line context

frr-reload.py needs to know about config-level commands, otherwise it
assumes they are contexts

Ticket: CM-30128
Ticket: CM-30077
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: Use time since epoch for timestamps for bmp updates 6613/head
Donald Sharp [Thu, 18 Jun 2020 19:56:44 +0000 (15:56 -0400)]
bgpd: Use time since epoch for timestamps for bmp updates

RFC states that time should be in seconds since the epoch.
The code was using system uptime in seconds.

Fixes: #6549
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: attempt to fix test convergence failure 6606/head
Rafael Zalamena [Thu, 18 Jun 2020 11:42:59 +0000 (08:42 -0300)]
bgpd: attempt to fix test convergence failure

Don't reset BFD peer on BGP session establishment.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agopimd: Poorly ported code fix 6610/head
Donald Sharp [Thu, 18 Jun 2020 14:37:51 +0000 (10:37 -0400)]
pimd: Poorly ported code fix

This section of code was ported incorrectly and is causing
issues when running against some tests.  Fix the missed
code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6602 from donaldsharp/allow_installation
Mark Stapp [Thu, 18 Jun 2020 12:30:07 +0000 (08:30 -0400)]
Merge pull request #6602 from donaldsharp/allow_installation

zebra: When installing a nexthop-group success is vital

4 years agotopotests: bump BFD test convergence time
Rafael Zalamena [Thu, 18 Jun 2020 11:42:11 +0000 (08:42 -0300)]
topotests: bump BFD test convergence time

Lets make the test more resilient to failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotests: remove old FRR version support
Rafael Zalamena [Thu, 18 Jun 2020 11:02:34 +0000 (08:02 -0300)]
topotests: remove old FRR version support

Removes a few lines of code.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agozebra: When installing a nexthop-group success is vital 6602/head
Donald Sharp [Thu, 18 Jun 2020 03:36:42 +0000 (23:36 -0400)]
zebra: When installing a nexthop-group success is vital

When installing a nexthop-group the recent commit:
commit 0be6e7d75dbbbfae33c3b51ae7c160d35b228915

reversed the logic for testing if adding data to
the netlink message succeeded and we thought we did
not thus not creating the nexthop group.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6577 from rtrlib/2020-06-12-master-fixes
Philippe Guibert [Wed, 17 Jun 2020 07:09:02 +0000 (09:09 +0200)]
Merge pull request #6577 from rtrlib/2020-06-12-master-fixes

bgpd: rpki fixes (master)

4 years agosharpd: add zclient session create and delete 6556/head
Mark Stapp [Tue, 9 Jun 2020 20:36:45 +0000 (16:36 -0400)]
sharpd: add zclient session create and delete

Add a couple of clis and some simple support that allows sharpd to
create extra zapi client sessions.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6569 from xThaid/dplane_batching_cleanup
Mark Stapp [Tue, 16 Jun 2020 16:06:11 +0000 (12:06 -0400)]
Merge pull request #6569 from xThaid/dplane_batching_cleanup

Clean up the zebra's Netlink API

4 years agoMerge pull request #6581 from volta-networks/fix_frr_reload_daemon
David Lamparter [Tue, 16 Jun 2020 15:45:54 +0000 (17:45 +0200)]
Merge pull request #6581 from volta-networks/fix_frr_reload_daemon

tools: fix frr-reload.py daemon option

4 years agoMerge pull request #6390 from opensourcerouting/bfd-cp-fix
Russ White [Tue, 16 Jun 2020 11:56:03 +0000 (07:56 -0400)]
Merge pull request #6390 from opensourcerouting/bfd-cp-fix

bfdd: tell peer when our control plane is dead

4 years agoMerge pull request #6575 from mjstapp/fix_avoid_clang_add_fetch
Russ White [Tue, 16 Jun 2020 11:53:06 +0000 (07:53 -0400)]
Merge pull request #6575 from mjstapp/fix_avoid_clang_add_fetch

zebra: avoid an atomic builtin that clang doesn't like

4 years agoMerge pull request #6584 from donaldsharp/increase_timeout
Russ White [Tue, 16 Jun 2020 11:46:55 +0000 (07:46 -0400)]
Merge pull request #6584 from donaldsharp/increase_timeout

bgpd: Allow extending peer timeout in rare case

4 years agoMerge pull request #6585 from donaldsharp/fix_pbr_topo
Russ White [Tue, 16 Jun 2020 11:43:48 +0000 (07:43 -0400)]
Merge pull request #6585 from donaldsharp/fix_pbr_topo

tests: Modify pbr test to give a reasonable amount of time to succeed

4 years agotests: Modify pbr test to give a reasonable amount of time to succeed 6585/head
Donald Sharp [Mon, 15 Jun 2020 20:59:38 +0000 (16:59 -0400)]
tests: Modify pbr test to give a reasonable amount of time to succeed

Under heavy load some systems may still be processing.  Let's give
the system some time to figure out what is going wrong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6582 from streambinder/master
Donald Sharp [Mon, 15 Jun 2020 16:32:24 +0000 (12:32 -0400)]
Merge pull request #6582 from streambinder/master

lib: prefix: add prefix_rd type

4 years agobgpd: fix rpki revalidation for invalid announcements 6577/head
Marcel Röthke [Thu, 11 Jun 2020 14:11:09 +0000 (16:11 +0200)]
bgpd: fix rpki revalidation for invalid announcements

Announcements that are marked as invalid were previously not revalidated.
This was fixed by replacing the range lookup with a subtree lookup.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
4 years agobgpd: Allow extending peer timeout in rare case 6584/head
Donald Sharp [Mon, 15 Jun 2020 14:35:50 +0000 (10:35 -0400)]
bgpd: Allow extending peer timeout in rare case

Currently the I/O pthread handles incoming/outgoing data
communication with all peers.  There is no attempt at modifying
the hold timers.  It's sole goal is to read/write data to appropriate
channels.  All this data is handled as *events* on the master pthread
in BGP.   The problem is that if the master pthread is extremely busy
then any packet read that would be treated as a keepalive event may
happen after the hold timer pops, due to the way thread events are handled
in lib/thread.c.

In a last gap attempt, if we notice that we have incoming data
to proceses on the input Queue, slightly delay the hold timer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: prefix: add prefix_rd type 6582/head
streambinder [Mon, 15 Jun 2020 13:21:19 +0000 (15:21 +0200)]
lib: prefix: add prefix_rd type

Signed-off-by: streambinder <posta@davidepucci.it>
4 years agotools: fix frr-reload.py daemon option 6581/head
Emanuele Di Pascale [Mon, 15 Jun 2020 12:44:05 +0000 (14:44 +0200)]
tools: fix frr-reload.py daemon option

the refactored frr-reload.py is adding 'no-header' to the
'show running' command of vtysh, but if a daemon is specified
the no-header option should only be added after the daemon name.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #6578 from ton31337/fix/constants
Sri Mohana Singamsetty [Sun, 14 Jun 2020 22:00:50 +0000 (15:00 -0700)]
Merge pull request #6578 from ton31337/fix/constants

bgpd: Use constants for nexthop length instead of just numbers

4 years agozebra: more clean-ups in netlink code 6569/head
Jakub Urbańczyk [Sat, 13 Jun 2020 11:31:13 +0000 (13:31 +0200)]
zebra: more clean-ups in netlink code

 * Use nl_attr_add32 instead of nl_attr_add where it is possible.
 * Move common code from build_singlepath() and build_multipath()
   to separate function.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: check for buffer boundary
Jakub Urbańczyk [Wed, 10 Jun 2020 09:44:31 +0000 (11:44 +0200)]
zebra: check for buffer boundary

 * Move code encoding Netlink messages to separate functions
 * Add buffer bounds checking while creating Nelink messages

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: clean up netlink api
Jakub Urbańczyk [Mon, 8 Jun 2020 21:37:26 +0000 (23:37 +0200)]
zebra: clean up netlink api

 * Rename netlink utility functions like addattr to be less ambiguous
 * Replace rta_attr_* functions with nl_attr_* since they introduced
   inconsistencies in the code
 * Add helper functions for adding rtnexthop struct to the Netlink
   message

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agobgpd: Use constants for nexthop length instead of just numbers 6578/head
Donatas Abraitis [Sat, 13 Jun 2020 17:36:59 +0000 (20:36 +0300)]
bgpd: Use constants for nexthop length instead of just numbers

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: preinitialize rtrlib tr structures
Marcel Röthke [Tue, 24 Mar 2020 13:36:04 +0000 (14:36 +0100)]
bgpd: preinitialize rtrlib tr structures

The tr_*_config structs were previously not pre initialized because
every field is initialized explicitly. But future rtrlib version will
introduce additional fields. Preinitialising the entire struct will
ensure forward compatibility.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
4 years agozebra: avoid an atomic builtin that clang doesn't like 6575/head
Mark Stapp [Fri, 12 Jun 2020 20:31:22 +0000 (16:31 -0400)]
zebra: avoid an atomic builtin that clang doesn't like

We had special-cased use of atomic_add_fetch, because clang just
does not like that builtin. Just use atomic_fetch_add instead.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6563 from donaldsharp/scale_tests
Donatas Abraitis [Fri, 12 Jun 2020 06:11:09 +0000 (09:11 +0300)]
Merge pull request #6563 from donaldsharp/scale_tests

tests: Add some scale tests to ensure things work

4 years agoMerge pull request #6564 from dslicenc/leak-bgp-xcommunity
Donatas Abraitis [Fri, 12 Jun 2020 05:54:56 +0000 (08:54 +0300)]
Merge pull request #6564 from dslicenc/leak-bgp-xcommunity

bgpd: remove extcommunity attribute on leaked route if empty

4 years agoMerge pull request #6566 from mjstapp/fix_daemon_fini
Donald Sharp [Thu, 11 Jun 2020 22:47:01 +0000 (18:47 -0400)]
Merge pull request #6566 from mjstapp/fix_daemon_fini

*: have daemons call frr_fini() at termination

4 years agolib: don't try to change/reset capabilities if process has none 6566/head
Mark Stapp [Thu, 11 Jun 2020 19:30:36 +0000 (15:30 -0400)]
lib: don't try to change/reset capabilities if process has none

A couple of daemons take/use no capabilities/privs; allow cleanup
of the privs/capabilities library module even if a daemon has no
caps.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years ago*: have daemons call frr_fini() at termination
Mark Stapp [Thu, 11 Jun 2020 15:16:02 +0000 (11:16 -0400)]
*: have daemons call frr_fini() at termination

Fix a number of library and daemon issues so that daemons can
call frr_fini() during normal termination. Without this,
temporary logging files are left behind in /var/tmp/frr/.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6565 from donaldsharp/clear_longer
Mark Stapp [Thu, 11 Jun 2020 15:55:20 +0000 (11:55 -0400)]
Merge pull request #6565 from donaldsharp/clear_longer

tests: After clear give bgp more than 90 seconds to come up

4 years agotests: After clear give it more than 90 seconds to come up 6565/head
Donald Sharp [Thu, 11 Jun 2020 13:47:15 +0000 (09:47 -0400)]
tests: After clear give it more than 90 seconds to come up

Error Message seen:
2020-06-11 14:00:35,288 ERROR: assert failed at "test_ebgp_ecmp_topo2/test_ecmp_after_clear_bgp[redist_static]": Testcase test_ecmp_after_clear_bgp[redist_static] : Failed
   Error: TIMEOUT!! BGP is not converged in 30 seconds for router r3
assert 'TIMEOUT!! BGP is not converged in 30 seconds for router r3' is True

if a retry for a failed connection is 120 seconds we should wait slightly
longer than a retry session, which this clear test was not doing.
Especially since we know our topotests are lossy on data under load.

Apparently I changed this earlier to 90 seconds, but a retry window
is 120.  Not sure wtf I was thinking

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: remove extcommunity attribute on leaked route if empty 6564/head
Don Slice [Mon, 8 Jun 2020 18:05:40 +0000 (18:05 +0000)]
bgpd: remove extcommunity attribute on leaked route if empty

Problem reported where bgp sessions were being torn down for ibgp
peers with the reason being optional attribute error.  Found that
when a route was leaked, the RTs were stripped but the actual
EXTCOMMUNUNITY attribute was not cleared so an empty ecommunity
attribute stayed in the bgp table and was sent in updates.

Ticket: CM-30000
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agoMerge pull request #6509 from donaldsharp/mlag_missed_upstream
Russ White [Thu, 11 Jun 2020 10:15:31 +0000 (06:15 -0400)]
Merge pull request #6509 from donaldsharp/mlag_missed_upstream

pimd: Allow mlag to create ifchannel

4 years agotests: Add some scale tests to ensure things work 6563/head
Donald Sharp [Thu, 11 Jun 2020 03:12:34 +0000 (23:12 -0400)]
tests: Add some scale tests to ensure things work

Add some basic route scale tests to ensure that we can
install a large number of routes.  Also grab some timings
so that we can keep track and see if anything substantially
changes over time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6559 from mjstapp/fix_zebra_rnh_sa
Renato Westphal [Thu, 11 Jun 2020 02:26:51 +0000 (23:26 -0300)]
Merge pull request #6559 from mjstapp/fix_zebra_rnh_sa

zebra: fix SA warning in zebra_rnh.c

4 years agoMerge pull request #6531 from chiragshah6/yang_nb5
Renato Westphal [Thu, 11 Jun 2020 01:56:27 +0000 (22:56 -0300)]
Merge pull request #6531 from chiragshah6/yang_nb5

yang, zebra: redefine nexthop model

4 years agozebra: rib nb changes with redefined nexthop model 6531/head
Chirag Shah [Fri, 5 Jun 2020 22:45:12 +0000 (15:45 -0700)]
zebra: rib nb changes with redefined nexthop model

RIB operational northbound changes based on redfined
nexthop model.

Testing Done:

{
  "afi-safi-name": "ipv4-unicast",
  "table-id": 254,
  "route": [
    {
      "prefix": "0.0.0.0/0",
      "route-entry": [
        {
          "protocol": "kernel",
          "distance": 0,
          "metric": 100,
          "selected": [null],
          "installed": [null],
          "internal-flags": 8,
          "internal-status": 16,
          "uptime": "2020-06-06T00:28:26.139797Z",
          "nexthop-group": {
            "id": 15,
            "nexthop": [
              {
                "nh-type": "ip4-ifindex",
                "vrf": "0",
                "gateway": "10.0.2.2",
                "interface": "enp0s3",
                "active": [null],
                "fib": [null]
              }
            ]
          }
        }
      ]
    },
    {
      "prefix": "1.1.1.4/32",
      "route-entry": [
        {
          "protocol": "kernel",
          "distance": 0,
          "metric": 0,
          "selected": [null],
          "installed": [null],
          "internal-flags": 8,
          "internal-status": 16,
          "uptime": "2020-06-06T00:28:26.139790Z",
          "nexthop-group": {
            "id": 16,
            "nexthop": [
              {
                "nh-type": "ifindex",
                "vrf": "0",
                "gateway": "",
                "interface": "dummy4",
                "active": [null],
                "fib": [null]
              }
            ]
          }
        }
      ]
    }
  ]
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoyang: redefine nexthop operational model
Chirag Shah [Fri, 29 May 2020 04:44:37 +0000 (21:44 -0700)]
yang: redefine nexthop operational model

Separate out nexthop config and operational models.
nexthop-group config model has list of nexthop-groups
where else operational nexthop group is single entity
underneath list of nexthops.

The common code is fectored into grouping to use among
config and operational model.

nexthop operational model caters to RIB operational model.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoMerge pull request #6471 from volta-networks/fix_zebra_register_rnh_pseudowire
Donald Sharp [Wed, 10 Jun 2020 23:03:06 +0000 (19:03 -0400)]
Merge pull request #6471 from volta-networks/fix_zebra_register_rnh_pseudowire

zebra: Every time zebra receives a ZEBRA_PW_SET, zebra should evaluate nh

4 years agoMerge pull request #6557 from opensourcerouting/zlogbuf-litter
Donald Sharp [Wed, 10 Jun 2020 22:59:25 +0000 (18:59 -0400)]
Merge pull request #6557 from opensourcerouting/zlogbuf-litter

lib: set up TLS log buffer after forking

4 years agoMerge pull request #6542 from mjstapp/zebra_opaque_unicast
Renato Westphal [Wed, 10 Jun 2020 22:06:16 +0000 (19:06 -0300)]
Merge pull request #6542 from mjstapp/zebra_opaque_unicast

Zebra opaque unicast messages

4 years agosharpd,zebra: unicast support for zapi messages 6542/head
Mark Stapp [Mon, 8 Jun 2020 20:38:36 +0000 (16:38 -0400)]
sharpd,zebra: unicast support for zapi messages

Distinguish between unicast and broadcast opaque messages
in zebra handler code. Add cli and internal api changes to
have sharpd send unicast opaque messages. Add opaque cli
commands to the sharp user doc.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: fix SA warning in zebra_rnh.c 6559/head
Mark Stapp [Wed, 10 Jun 2020 18:57:30 +0000 (14:57 -0400)]
zebra: fix SA warning in zebra_rnh.c

Fix an SA warning... that I introduced while resolving
a different SA warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: set up TLS log buffer after forking 6557/head
David Lamparter [Wed, 10 Jun 2020 18:30:02 +0000 (20:30 +0200)]
lib: set up TLS log buffer after forking

... it contains our pid, so doing it before fork leads to littering
buffers since we try to clean up with the forked pid...

Fixes: #6541
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoMerge pull request #6528 from mjstapp/fix_zebra_mpls_sa
Donald Sharp [Wed, 10 Jun 2020 17:57:02 +0000 (13:57 -0400)]
Merge pull request #6528 from mjstapp/fix_zebra_mpls_sa

zebra: fix coverity SA warnings

4 years agoMerge pull request #6555 from mjstapp/fix_ebgp_policy_topo_timeout
Donald Sharp [Wed, 10 Jun 2020 17:56:38 +0000 (13:56 -0400)]
Merge pull request #6555 from mjstapp/fix_ebgp_policy_topo_timeout

tests: raise convergence timeout in bgp_ebgp_requires_policy

4 years agoMerge pull request #6543 from volta-networks/fix_isis_afset_noarea
Donald Sharp [Wed, 10 Jun 2020 17:56:00 +0000 (13:56 -0400)]
Merge pull request #6543 from volta-networks/fix_isis_afset_noarea

isisd: fix segfault in isis_circuit_af_set

4 years agoMerge pull request #6414 from opensourcerouting/nb-error-handling
Santosh P K [Wed, 10 Jun 2020 17:17:07 +0000 (22:47 +0530)]
Merge pull request #6414 from opensourcerouting/nb-error-handling

NB context + enhanced error handling

4 years agoMerge pull request #6465 from xThaid/iprules
Stephen Worley [Wed, 10 Jun 2020 16:35:36 +0000 (12:35 -0400)]
Merge pull request #6465 from xThaid/iprules

zebra: move ip rule installation to use dplane thread

4 years agoMerge pull request #6460 from rgirada/ospf_external_lsa
Donald Sharp [Wed, 10 Jun 2020 16:35:17 +0000 (12:35 -0400)]
Merge pull request #6460 from rgirada/ospf_external_lsa

ospfd: External LSA lookup in LSDB failed in a specific scenario

4 years agotests: raise convergence timeout in bgp_ebgp_requires_policy 6555/head
Mark Stapp [Wed, 10 Jun 2020 15:01:47 +0000 (11:01 -0400)]
tests: raise convergence timeout in bgp_ebgp_requires_policy

Timeout was 30 seconds, raise it to 130.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoisisd: prevent segfault in isis_circuit_af_set 6543/head
Emanuele Di Pascale [Wed, 10 Jun 2020 12:29:02 +0000 (14:29 +0200)]
isisd: prevent segfault in isis_circuit_af_set

before the last commit, it was possible under some
circumstances to call isis_circuit_af_set on a circuit
with a NULL area, e.g. if the circuit was deconfigured
due to a validation error. While this should not happen
now, let's add an explicit check to avoid crashing if
a regression is introduced.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoisisd: keep circuit config on conf->up failure
Emanuele Di Pascale [Tue, 9 Jun 2020 16:01:25 +0000 (18:01 +0200)]
isisd: keep circuit config on conf->up failure

if we are not able to bring a circuit up due to some config
issue, e.g. a low MTU compared to the area lsp-mtu, we should
not remove the configuration, as this will push out of sync
with the YANG state and create more issues down the line.
Instead, keeping the circuit state at C_STATE_CONF should be
sufficient.

For the specific case of the MTU mismatch above, this also means
that when we receive a new IF_UP_FROM_Z when the MTU is changed
we will be able to bring the circuit up as we should.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agozebra: separate code encoding netlink msg 6465/head
Jakub Urbańczyk [Mon, 1 Jun 2020 16:07:18 +0000 (18:07 +0200)]
zebra: separate code encoding netlink msg

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agotopotest: add pbr test suite
Jakub Urbańczyk [Tue, 26 May 2020 16:24:16 +0000 (18:24 +0200)]
topotest: add pbr test suite

Add some basic tests for installing PBR rules into the kernel.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: convert ip rule installation to use dplane thread
Jakub Urbańczyk [Sun, 24 May 2020 17:03:25 +0000 (19:03 +0200)]
zebra: convert ip rule installation to use dplane thread

 * Implement new dataplane operations
 * Convert existing code to use dataplane context object
 * Modify function preparing netlink message to use dataplane
   context object

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: prepare dplane to deal with pbr rules
Jakub Urbańczyk [Sun, 24 May 2020 16:44:36 +0000 (18:44 +0200)]
zebra: prepare dplane to deal with pbr rules

This commit is the first step to convert IP rule installation to
use dplane thread.
 * Add dataplane's internal representation of a pbr rule
 * Add dplane stats related to rules
 * Introduce a new type of dplane operation

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agoMerge pull request #6544 from mjstapp/fix_topo_lib_bgp_timeout
Donald Sharp [Wed, 10 Jun 2020 13:19:26 +0000 (09:19 -0400)]
Merge pull request #6544 from mjstapp/fix_topo_lib_bgp_timeout

tests: include lib/bgp.py convergence timeout to 130

4 years agolib,sharpd: add a SHARP_STR alias
Mark Stapp [Thu, 4 Jun 2020 17:26:50 +0000 (13:26 -0400)]
lib,sharpd: add a SHARP_STR alias

Add a vty-friendly protocol name alias for sharpd.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib,zebra,sharpd: modify opaque zapi message to support unicast
Mark Stapp [Thu, 4 Jun 2020 17:11:35 +0000 (13:11 -0400)]
lib,zebra,sharpd: modify opaque zapi message to support unicast

Start modifying the OPAQUE zapi message to include optional
unicast destination zapi client info. Add a 'decode' api and
opaque msg struct to encapsulate that optional info.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib,zebra: rename opaque decode api
Mark Stapp [Thu, 4 Jun 2020 13:40:35 +0000 (09:40 -0400)]
lib,zebra: rename opaque decode api

Change name of an opaque zapi api to 'decode' to align with the
other zapi message parsing apis. Missed that in the original
opaque commits.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6493 from opensourcerouting/workflow-debian
Donald Sharp [Wed, 10 Jun 2020 12:15:35 +0000 (08:15 -0400)]
Merge pull request #6493 from opensourcerouting/workflow-debian

doc/workflow: write down debian/* branch semantics

4 years agoMerge pull request #6532 from wesleycoakley/pbrd-moretopo
Mark Stapp [Wed, 10 Jun 2020 12:14:39 +0000 (08:14 -0400)]
Merge pull request #6532 from wesleycoakley/pbrd-moretopo

tests: Expand pbrd topology tests

4 years agotests: include lib/bgp.py convergence timeout to 130 6544/head
Mark Stapp [Tue, 9 Jun 2020 19:05:16 +0000 (15:05 -0400)]
tests: include lib/bgp.py convergence timeout to 130

The convergence timeout in lib/bgp.py was something like 40 secs;
that's not really long enough for the CI. Raise the timeout to
40 x 3 secs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6537 from volta-networks/fix_isis_adj_up_init
Donald Sharp [Wed, 10 Jun 2020 12:13:34 +0000 (08:13 -0400)]
Merge pull request #6537 from volta-networks/fix_isis_adj_up_init

isisd: fix adj up->init transition

4 years agoMerge pull request #6550 from ton31337/fix/bgp_dampening_vty_bug
Donald Sharp [Wed, 10 Jun 2020 12:12:01 +0000 (08:12 -0400)]
Merge pull request #6550 from ton31337/fix/bgp_dampening_vty_bug

bgpd: Duplicate `bgp dampening ...` stuff

4 years agozebra: fix coverity SA warnings 6528/head
Mark Stapp [Mon, 8 Jun 2020 11:58:19 +0000 (07:58 -0400)]
zebra: fix coverity SA warnings

Fix a few coverity warnings.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6546 from opensourcerouting/topofixes-2
Mark Stapp [Wed, 10 Jun 2020 11:57:31 +0000 (07:57 -0400)]
Merge pull request #6546 from opensourcerouting/topofixes-2

topotests: stabilize ospf-sr

4 years agoMerge pull request #5323 from opensourcerouting/filter-nb
Donald Sharp [Wed, 10 Jun 2020 10:59:32 +0000 (06:59 -0400)]
Merge pull request #5323 from opensourcerouting/filter-nb

lib: migrate FRR filter to northbound

4 years agobgpd: Allow setting dampening for more address families 6550/head
Donatas Abraitis [Wed, 10 Jun 2020 07:10:18 +0000 (10:10 +0300)]
bgpd: Allow setting dampening for more address families

Until now, it was possible to set only for ipv4 unicast/multicast.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Print dampening configuration per AF, not per neighbor
Donatas Abraitis [Wed, 10 Jun 2020 07:09:01 +0000 (10:09 +0300)]
bgpd: Print dampening configuration per AF, not per neighbor

This caused duplicate `bgp dampening ...` to be printed per neighbor.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #6548 from qlyoung/alpine-chown
Donatas Abraitis [Wed, 10 Jun 2020 06:49:12 +0000 (09:49 +0300)]
Merge pull request #6548 from qlyoung/alpine-chown

docker: don't fail on chown /etc/frr

4 years agodocker: don't fail on chown /etc/frr 6548/head
Quentin Young [Wed, 10 Jun 2020 04:20:04 +0000 (00:20 -0400)]
docker: don't fail on chown /etc/frr

If we can chown /etc/frr then fine, but there's circumstances where we
won't be able to - for instance, if running FRR in Kubernetes where
/etc/frr/* is actually a virtual filesystem.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agotopotests: MPLS table output is not ordered 6546/head
Rafael Zalamena [Tue, 9 Jun 2020 21:45:29 +0000 (18:45 -0300)]
topotests: MPLS table output is not ordered

Don't expect ordered output from `show mpls table json`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoisisd: fix adj up->init transition 6537/head
Emanuele Di Pascale [Mon, 8 Jun 2020 16:00:42 +0000 (18:00 +0200)]
isisd: fix adj up->init transition

there are some paths, e.g. when an established neighbor
sends us hellos with a different IS level, where we go
from adj_state UP to INIT. In such cases we might not
update our SPFs or the circuit state, as the state change
function was only testing for the UP and DOWN cases.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #6510 from donaldsharp/useful_timings
Mark Stapp [Tue, 9 Jun 2020 19:15:04 +0000 (15:15 -0400)]
Merge pull request #6510 from donaldsharp/useful_timings

tests: Allow a useful amount of time for bgp to converge