]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #8437 from donaldsharp/verify_bgp_community_no_sleep
Martin Winter [Thu, 15 Apr 2021 12:03:37 +0000 (14:03 +0200)]
Merge pull request #8437 from donaldsharp/verify_bgp_community_no_sleep

tests: Do not sleep(5) when verifying bgp communities

3 years agoMerge pull request #8477 from opensourcerouting/lib-bfd-fix
Igor Ryzhov [Thu, 15 Apr 2021 06:32:23 +0000 (09:32 +0300)]
Merge pull request #8477 from opensourcerouting/lib-bfd-fix

3 years agoMerge pull request #8467 from idryzhov/fix-acl-delete
Renato Westphal [Thu, 15 Apr 2021 02:58:39 +0000 (23:58 -0300)]
Merge pull request #8467 from idryzhov/fix-acl-delete

lib: fix access-list deletion

3 years agoMerge pull request #8469 from mjstapp/fix_bgp_nhg_mpath
Renato Westphal [Thu, 15 Apr 2021 02:54:08 +0000 (23:54 -0300)]
Merge pull request #8469 from mjstapp/fix_bgp_nhg_mpath

bgpd: don't overrun fixed zapi array of nexthops

3 years agoMerge pull request #8470 from mjstapp/fix_nhrp_cov_socket
Renato Westphal [Thu, 15 Apr 2021 02:52:39 +0000 (23:52 -0300)]
Merge pull request #8470 from mjstapp/fix_nhrp_cov_socket

nhrpd: fix coverity warning about os_socket()

3 years agolib: fix BFD crash on interface removal
Rafael Zalamena [Wed, 14 Apr 2021 18:28:09 +0000 (15:28 -0300)]
lib: fix BFD crash on interface removal

- Handle badly formatted messages (don't set `ifp` in that case)
- Handle unread messages (e.g. when family is not don't trigger `assert`)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #8003 from donaldsharp/timings
Patrick Ruddy [Wed, 14 Apr 2021 17:33:18 +0000 (18:33 +0100)]
Merge pull request #8003 from donaldsharp/timings

lib: Differentiate between real and cpu bound processes

3 years agoMerge pull request #8356 from LabNConsulting/working/lb/docker-ci-v2
Quentin Young [Wed, 14 Apr 2021 16:27:39 +0000 (16:27 +0000)]
Merge pull request #8356 from LabNConsulting/working/lb/docker-ci-v2

3 years agoMerge pull request #8450 from ton31337/feature/frr_history_turn_on_off
Donald Sharp [Wed, 14 Apr 2021 13:59:09 +0000 (09:59 -0400)]
Merge pull request #8450 from ton31337/feature/frr_history_turn_on_off

vtysh: Set history file on demand

3 years agonhrpd: fix coverity warning about os_socket()
Mark Stapp [Wed, 14 Apr 2021 13:57:41 +0000 (09:57 -0400)]
nhrpd: fix coverity warning about os_socket()

Ensure we don't try to use an invalid fd in nhrpd, reported
by coverity.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agobgpd: don't overrun fixed zapi array of nexthops
Mark Stapp [Wed, 14 Apr 2021 13:24:37 +0000 (09:24 -0400)]
bgpd: don't overrun fixed zapi array of nexthops

Avoid overrunning the fixed-size array of nexthops in a
zapi_nhg.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #8320 from idryzhov/prefix-list-seqnum
Donald Sharp [Wed, 14 Apr 2021 13:21:28 +0000 (09:21 -0400)]
Merge pull request #8320 from idryzhov/prefix-list-seqnum

lib: remove "ip prefix-list sequence-number" command

3 years agolib: fix access-list deletion
Igor Ryzhov [Wed, 14 Apr 2021 10:08:18 +0000 (13:08 +0300)]
lib: fix access-list deletion

Problems with the current implementation:
* Delete hook is called before the deletion of the access-list from the
  master list, which means that daemons processing this hook successfully
  find this access-list, store a pointer to it in their structures, and
  right after that the access-list is freed. Daemons end up having stale
  pointer to the freed structure.
* Route-maps are not notified of the deletion.

This commit fixes both issues.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8446 from ton31337/fix/json_output_for_specific_vs_global_should_...
Sri Mohana Singamsetty [Wed, 14 Apr 2021 00:33:17 +0000 (17:33 -0700)]
Merge pull request #8446 from ton31337/fix/json_output_for_specific_vs_global_should_be_the_same

bgpd: Add `show bgp json detail` command

3 years agoMerge pull request #8448 from ton31337/feature/show_rpki_state_in_global_show_bgp
Sri Mohana Singamsetty [Wed, 14 Apr 2021 00:32:37 +0000 (17:32 -0700)]
Merge pull request #8448 from ton31337/feature/show_rpki_state_in_global_show_bgp

bgpd: Show RPKI short state in `show bgp <afi> <safi>`

3 years agodoc: Add `show bgp json detail` command to print more verbose JSON output
Donatas Abraitis [Sat, 10 Apr 2021 19:59:02 +0000 (22:59 +0300)]
doc: Add `show bgp json detail` command to print more verbose JSON output

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Add `show bgp json detail` command
Donatas Abraitis [Sat, 10 Apr 2021 07:27:06 +0000 (10:27 +0300)]
bgpd: Add `show bgp json detail` command

Print detailed version for JSON output when dumping ALL BGP table with
`show bgp <afi> <safi> json detail`.

This output should be at some sort of identical to show_ip_bgp_route_cmd.

To avoid breaking backward-compatibility for `show bgp json`, adding
'detail' keyword for that.

In long-term it's easier for operators to compare stuff just looking at global
view instead of per-prefix for details.

Before:

```
],"192.168.100.1/32": [
  {
    "valid":true,
    "bestpath":true,
    "selectionReason":"First path received",
    "pathFrom":"external",
    "prefix":"192.168.100.1",
    "prefixLen":32,
    "network":"192.168.100.1\/32",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"0.0.0.0",
        "hostname":"exit1-debian-9",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
] }  }
```

After:
```
],"192.168.100.1/32": [
  {
    "aspath":{
      "string":"Local",
      "segments":[
      ],
      "length":0
    },
    "origin":"incomplete",
    "metric":0,
    "weight":32768,
    "valid":true,
    "sourced":true,
    "bestpath":{
      "overall":true,
      "selectionReason":"First path received"
    },
    "lastUpdate":{
      "epoch":1618040124,
      "string":"Sat Apr 10 07:35:24 2021\n"
    },
    "nexthops":[
      {
        "ip":"0.0.0.0",
        "hostname":"exit1-debian-9",
        "afi":"ipv4",
        "metric":0,
        "accessible":true,
        "used":true
      }
    ],
    "peer":{
      "peerId":"0.0.0.0",
      "routerId":"192.168.100.1"
    }
  }
] }  }
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8153 from reubendowle/nhrp-multicast
Jafar Al-Gharaibeh [Tue, 13 Apr 2021 17:49:28 +0000 (12:49 -0500)]
Merge pull request #8153 from reubendowle/nhrp-multicast

nhrp, ospf: add nhrp multicast for OSPF DMVPN

3 years agoMerge pull request #8414 from idryzhov/fix-filter-cli
Russ White [Tue, 13 Apr 2021 15:38:51 +0000 (11:38 -0400)]
Merge pull request #8414 from idryzhov/fix-filter-cli

various acl/plist cli fixes

3 years agoMerge pull request #8431 from ton31337/feature/show_bgp_version_per_prefix
Russ White [Tue, 13 Apr 2021 15:33:22 +0000 (11:33 -0400)]
Merge pull request #8431 from ton31337/feature/show_bgp_version_per_prefix

bgpd: Add `show bgp version <version>` command

3 years agoMerge pull request #8426 from idryzhov/fix-interface-nb-stale-pointers
Quentin Young [Tue, 13 Apr 2021 15:26:51 +0000 (15:26 +0000)]
Merge pull request #8426 from idryzhov/fix-interface-nb-stale-pointers

lib: fix interface nb stale pointers

3 years agoMerge pull request #8145 from pguibert6WIND/nhrp_use_zebra
Mark Stapp [Tue, 13 Apr 2021 12:02:56 +0000 (08:02 -0400)]
Merge pull request #8145 from pguibert6WIND/nhrp_use_zebra

nhrp: use zebra

3 years agozebra, lib: replace ZEBRA_ROUTE_NEIGH with simplified version
Philippe Guibert [Mon, 5 Apr 2021 19:40:37 +0000 (21:40 +0200)]
zebra, lib: replace ZEBRA_ROUTE_NEIGH with simplified version

do not add a new route type, and consider 0 as a value meaning
that zebra should be the owner.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrpd: remove useless typedef
Philippe Guibert [Mon, 29 Mar 2021 19:25:43 +0000 (21:25 +0200)]
nhrpd: remove useless typedef

this typedef was useless. remote it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrp, zebra, lib: enforce usage of zapi_neigh_ip structure
Philippe Guibert [Wed, 17 Mar 2021 17:12:26 +0000 (18:12 +0100)]
nhrp, zebra, lib: enforce usage of zapi_neigh_ip structure

zapi_nbr structure is renamed to zapi_neigh_ip.
Initially used to set a neighbor ip entry for gre interfaces, this
structure is used to get events from the zebra layer to nhrp layer.

The ndm state has been added, as it is needed on both sides.
The zebra dplane layer is slightly modified.

Also, to clarify what ZEBRA_NEIGH_ADD/DEL means, a rename is done:
it is called now ZEBRA_NEIGH_IP_ADD/DEL, and it signified that this
zapi interface permits to set link operations by associating ip
addresses to link addresses.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #8389 from idryzhov/route-map-optimization-nb
Renato Westphal [Tue, 13 Apr 2021 03:26:20 +0000 (00:26 -0300)]
Merge pull request #8389 from idryzhov/route-map-optimization-nb

lib: convert route-map optimization to NB

3 years agoMerge pull request #8396 from achernavin22/ospf_fast_hello_show_run
Renato Westphal [Tue, 13 Apr 2021 03:14:56 +0000 (00:14 -0300)]
Merge pull request #8396 from achernavin22/ospf_fast_hello_show_run

ospfd: fix output of dead-interval in show running

3 years agoMerge pull request #8288 from qlyoung/readd-space-support-to-find-command
David Lamparter [Tue, 13 Apr 2021 00:22:46 +0000 (02:22 +0200)]
Merge pull request #8288 from qlyoung/readd-space-support-to-find-command

3 years agoMerge pull request #8100 from qlyoung/remove-sample-conf-files
David Lamparter [Tue, 13 Apr 2021 00:20:53 +0000 (02:20 +0200)]
Merge pull request #8100 from qlyoung/remove-sample-conf-files

3 years agoMerge pull request #8451 from idryzhov/bfdd-fix-cli-show
Renato Westphal [Mon, 12 Apr 2021 23:26:21 +0000 (20:26 -0300)]
Merge pull request #8451 from idryzhov/bfdd-fix-cli-show

bfdd: fix nb cli show with defaults

3 years agoMerge pull request #8453 from idryzhov/bgpd-fix-transactional-cli
Renato Westphal [Mon, 12 Apr 2021 23:23:26 +0000 (20:23 -0300)]
Merge pull request #8453 from idryzhov/bgpd-fix-transactional-cli

bgpd: fix pending commit check

3 years agodoc: add Ubuntu18.04 and 20.04 container info to building-docker.rst
Lou Berger [Mon, 29 Mar 2021 11:45:49 +0000 (07:45 -0400)]
doc: add Ubuntu18.04 and 20.04 container info to building-docker.rst

Signed-off-by: Lou Berger <lberger@labn.net>
3 years ago*: add initial .travis.yml
Lou Berger [Sun, 28 Mar 2021 01:33:21 +0000 (21:33 -0400)]
*: add initial .travis.yml

   Supports centos7 and 8 docker builds
   and Ubuntu18.04 and 20.04 build and minimal CI

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agoubuntu20-ci: create a docker 20.04 container for dev / test / ci
Lou Berger [Sun, 28 Mar 2021 11:44:16 +0000 (07:44 -0400)]
ubuntu20-ci: create a docker 20.04 container for dev / test / ci

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agoubuntu18-ci: create a docker 18.04 container for dev / test / ci
Lou Berger [Sun, 28 Mar 2021 01:24:07 +0000 (21:24 -0400)]
ubuntu18-ci: create a docker 18.04 container for dev / test / ci

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agonhrp: avoid crashing when terminating interface contexts
Philippe Guibert [Thu, 11 Mar 2021 15:02:46 +0000 (16:02 +0100)]
nhrp: avoid crashing when terminating interface contexts

avoid crashing when terminating interface contexts.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrpd: add a zebra api to configure neighbor table per interface
Philippe Guibert [Mon, 16 Dec 2019 12:34:43 +0000 (13:34 +0100)]
nhrpd: add a zebra api to configure neighbor table per interface

neighbor table per interface is being configured per interface, via
zebra api.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agodoc: Add an option for vtysh to override history file path
Donatas Abraitis [Mon, 12 Apr 2021 08:57:11 +0000 (11:57 +0300)]
doc: Add an option for vtysh to override history file path

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agovtysh: Set history file on demand
Donatas Abraitis [Mon, 12 Apr 2021 08:28:51 +0000 (11:28 +0300)]
vtysh: Set history file on demand

It's sometimes needed to disable logging all FRR commands at all.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: fix pending commit check
Igor Ryzhov [Mon, 12 Apr 2021 13:42:51 +0000 (16:42 +0300)]
bgpd: fix pending commit check

Calling nb_cli_pending_commit_check only makes sense after nb_cli_apply_changes.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8421 from opensourcerouting/xrelfo-arm
Mark Stapp [Mon, 12 Apr 2021 12:07:05 +0000 (08:07 -0400)]
Merge pull request #8421 from opensourcerouting/xrelfo-arm

fix xrelfo on ARM(32) & cross-compile

3 years agobfdd: fix nb cli show with defaults
Igor Ryzhov [Mon, 12 Apr 2021 11:17:30 +0000 (14:17 +0300)]
bfdd: fix nb cli show with defaults

The idea of the "with-defaults" flag is to show the default values for
parameters that were not configured by the user. But bfdd incorrectly
shows the default values for all parameters, including the
user-configured ones.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: fix interface nb stale pointers
Igor Ryzhov [Thu, 8 Apr 2021 12:43:07 +0000 (15:43 +0300)]
lib: fix interface nb stale pointers

The first change in this commit is the processing of the VRF termination.
When we terminate the VRF, we should not delete the underlying interfaces,
because there may be pointers to them in the northbound configuration. We
should move them to the default VRF instead.

Because of the first change, the VRF interface itself is also not deleted
when deleting the VRF. It should be handled in netlink_link_change. This
is done by the second change.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agodoc: Add `show [ip] bgp version <version>` command
Donatas Abraitis [Fri, 9 Apr 2021 07:30:38 +0000 (10:30 +0300)]
doc: Add `show [ip] bgp version <version>` command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Filter BGP routes by prefix version
Donatas Abraitis [Fri, 9 Apr 2021 06:33:41 +0000 (09:33 +0300)]
bgpd: Filter BGP routes by prefix version

The idea is to find out prefixes including specific BGP table version and
above.

Let's say I have a converged network and suddently I noticed a couple of
prefixes seems hijacked.

I want to look what new prefixes arrived with a specific BGP table version.

```
exit1-debian-9# show ip bgp version 8
BGP table version is 9, local router ID is 192.168.100.1, vrf id 0
Default local pref 100, local AS 65534
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*  192.168.2.0/24   192.168.0.2              0             0 65030 ?
*>                  192.168.0.2              0             0 65030 ?
*  192.168.3.0/24   192.168.0.2              0             0 65030 ?
*>                  192.168.0.2              0             0 65030 ?

Displayed  2 routes and 18 total paths
exit1-debian-9#
```

```
exit1-debian-9# show ip bgp version 8 json
{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 9,
 "routerId": "192.168.100.1",
 "defaultLocPrf": 100,
 "localAS": 65534,
 "routes": { "192.168.2.0/24": [
  {
    "valid":true,
    "pathFrom":"external",
    "prefix":"192.168.2.0",
    "prefixLen":24,
    "network":"192.168.2.0\/24",
    "version":8,
    "metric":0,
    "weight":0,
    "peerId":"2a02:bbd::2",
    "path":"65030",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"192.168.0.2",
        "hostname":"home-spine1.donatas.net",
        "afi":"ipv4",
        "used":true
      }
    ]
  },
  {
    "valid":true,
    "bestpath":true,
    "selectionReason":"Neighbor IP",
    "pathFrom":"external",
    "prefix":"192.168.2.0",
    "prefixLen":24,
    "network":"192.168.2.0\/24",
    "version":8,
    "metric":0,
    "weight":0,
    "peerId":"192.168.0.2",
    "path":"65030",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"192.168.0.2",
        "hostname":"home-spine1.donatas.net",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
],"192.168.3.0/24": [
  {
    "valid":true,
    "pathFrom":"external",
    "prefix":"192.168.3.0",
    "prefixLen":24,
    "network":"192.168.3.0\/24",
    "version":9,
    "metric":0,
    "weight":0,
    "peerId":"2a02:bbd::2",
    "path":"65030",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"192.168.0.2",
        "hostname":"home-spine1.donatas.net",
        "afi":"ipv4",
        "used":true
      }
    ]
  },
  {
    "valid":true,
    "bestpath":true,
    "selectionReason":"Neighbor IP",
    "pathFrom":"external",
    "prefix":"192.168.3.0",
    "prefixLen":24,
    "network":"192.168.3.0\/24",
    "version":9,
    "metric":0,
    "weight":0,
    "peerId":"192.168.0.2",
    "path":"65030",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"192.168.0.2",
        "hostname":"home-spine1.donatas.net",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
] }  }

```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotests: Add BGP RPKI show header to outputs
Donatas Abraitis [Mon, 12 Apr 2021 07:34:52 +0000 (10:34 +0300)]
tests: Add BGP RPKI show header to outputs

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agodoc: Add BGP RPKI show header to some output examples
Donatas Abraitis [Mon, 12 Apr 2021 07:34:36 +0000 (10:34 +0300)]
doc: Add BGP RPKI show header to some output examples

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Show BGP table version which was used for a particular prefix
Donatas Abraitis [Thu, 8 Apr 2021 19:55:00 +0000 (22:55 +0300)]
bgpd: Show BGP table version which was used for a particular prefix

This is useful to go back in the past and check when was that prefix appeared,
changed, etc.

```
exit1-debian-9# show ip bgp 172.16.16.1/32
BGP routing table entry for 172.16.16.1/32, version 6
Paths: (2 available, best #2, table default)
  Advertised to non peer-group peers:
  home-spine1.donatas.net(192.168.0.2) home-spine1.donatas.net(2a02:bbd::2)
  65030
    192.168.0.2 from home-spine1.donatas.net(2a02:bbd::2) (172.16.16.1)
      Origin incomplete, metric 0, valid, external
      Last update: Thu Apr  8 20:15:25 2021
  65030
    192.168.0.2 from home-spine1.donatas.net(192.168.0.2) (172.16.16.1)
      Origin incomplete, metric 0, valid, external, best (Neighbor IP)
      Last update: Thu Apr  8 20:15:25 2021
exit1-debian-9#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Show RPKI short state in `show bgp <afi> <safi>`
Donatas Abraitis [Sun, 11 Apr 2021 18:27:10 +0000 (21:27 +0300)]
bgpd: Show RPKI short state in `show bgp <afi> <safi>`

Just to be more informant, copying from Cisco.

```
exit1-debian-9# sh ip bgp
BGP table version is 4, local router ID is 192.168.100.1, vrf id 0
Default local pref 100, local AS 65534
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

   Network          Next Hop            Metric LocPrf Weight Path
N*> 10.0.2.0/24      0.0.0.0                  0         32768 ?
N*> 192.168.0.0/24   0.0.0.0                  0         32768 ?
N*> 192.168.10.0/24  0.0.0.0                  0         32768 ?
N*> 192.168.100.1/32 0.0.0.0                  0         32768 ?

Displayed  4 routes and 4 total paths
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8440 from qlyoung/doc-describe-acceptable-commit-messages
Jafar Al-Gharaibeh [Sun, 11 Apr 2021 04:07:49 +0000 (23:07 -0500)]
Merge pull request #8440 from qlyoung/doc-describe-acceptable-commit-messages

doc: describe acceptable commit messages

3 years agoMerge pull request #8438 from donaldsharp/doc_on_sleep
Donatas Abraitis [Sat, 10 Apr 2021 16:35:52 +0000 (19:35 +0300)]
Merge pull request #8438 from donaldsharp/doc_on_sleep

doc: Check for convergence, not sleep for convergence

3 years agoMerge pull request #8444 from qlyoung/doc-system-requirements
Donatas Abraitis [Sat, 10 Apr 2021 07:04:42 +0000 (10:04 +0300)]
Merge pull request #8444 from qlyoung/doc-system-requirements

doc: vaguely describe system requirements

3 years agoMerge pull request #8445 from qlyoung/doc-bgp-timers
Donatas Abraitis [Sat, 10 Apr 2021 06:57:39 +0000 (09:57 +0300)]
Merge pull request #8445 from qlyoung/doc-bgp-timers

doc: document BGP neighbor timers

3 years agodoc: document BGP neighbor timers
Quentin Young [Fri, 9 Apr 2021 22:17:15 +0000 (18:17 -0400)]
doc: document BGP neighbor timers

The keepalive, hold, and connect timers were undocumented.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodoc: vaguely describe system requirements
Quentin Young [Fri, 9 Apr 2021 22:05:42 +0000 (18:05 -0400)]
doc: vaguely describe system requirements

Lame attempt at describing the factors involved in choosing resources
for running FRR

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agopceplib: add missing endian.h and config.h
David Lamparter [Fri, 9 Apr 2021 18:38:56 +0000 (20:38 +0200)]
pceplib: add missing endian.h and config.h

endian.h supplies be*toh() and htobe*() functions.  This fixes the build
on musl libc.  On other systems it seems endian.h comes in transitively
from some other header.

(Also, all .c files should have config.h or zebra.h as the first
include, even if it works without that it's b0rked and only works due to
luck.)

Tested-by: Lucian Cristian <lucian.cristian@gmail.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agoMerge pull request #8429 from donaldsharp/markit
Mark Stapp [Fri, 9 Apr 2021 18:24:22 +0000 (14:24 -0400)]
Merge pull request #8429 from donaldsharp/markit

Markit

3 years agolib, doc: add "route-map NAME optimization" command
Igor Ryzhov [Fri, 9 Apr 2021 16:42:23 +0000 (19:42 +0300)]
lib, doc: add "route-map NAME optimization" command

Currently we have a "route-map optimization" command which is entered
from inside the route-map entry but actually applies to the whole
route-map. In addition, this command is not shown in the running-config
and not stored to the startup-config during "write".

Let's add a new command on the config node level to control this setting
and show it in the running-config to make possible to save it during
"write".

The old command is saved for the backward compatibility but hidden and
marked as deprecated.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8435 from opensourcerouting/ospf-bfd-fix
Igor Ryzhov [Fri, 9 Apr 2021 17:56:06 +0000 (20:56 +0300)]
Merge pull request #8435 from opensourcerouting/ospf-bfd-fix

ospfd: fix crash on interface/vrf removal

3 years agobuild: don't link pathd/path_main.c twice
David Lamparter [Fri, 9 Apr 2021 17:56:05 +0000 (19:56 +0200)]
build: don't link pathd/path_main.c twice

Can't have things duplicate in libpath.a and pathd directly, they'll
crash into eath other on linking.  No idea why this doesn't error out in
our CI builds, but it definitely breaks LTO builds.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agotools: add note to users re: frr.conf overwrite
Quentin Young [Fri, 9 Apr 2021 17:13:45 +0000 (13:13 -0400)]
tools: add note to users re: frr.conf overwrite

Most software doesn't overwrite its own config files; vtysh's 'wr mem'
may be confusing, so add a note to the config file explaining changes
made may be overwritten.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodebian: install frr.conf to /etc/frr/
Quentin Young [Wed, 7 Apr 2021 20:54:36 +0000 (16:54 -0400)]
debian: install frr.conf to /etc/frr/

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years ago*: remove *.conf.sample files
Quentin Young [Tue, 16 Feb 2021 23:05:38 +0000 (18:05 -0500)]
*: remove *.conf.sample files

Most of these are many, many years out of date. All of them vary
randomly in quality. They show up by default in packages where they
aren't really useful now that we use integrated config. Remove them.

The useful ones have been moved to the docs.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agorpm: install frr.conf by default
Quentin Young [Wed, 7 Apr 2021 19:58:00 +0000 (15:58 -0400)]
rpm: install frr.conf by default

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #8427 from mjstapp/fix_pcep_keylen
Quentin Young [Fri, 9 Apr 2021 16:59:05 +0000 (16:59 +0000)]
Merge pull request #8427 from mjstapp/fix_pcep_keylen

lib: use platform-neutral value for TCP MD5 signature len

3 years agodoc: describe acceptable commit messages
Quentin Young [Fri, 9 Apr 2021 16:55:33 +0000 (12:55 -0400)]
doc: describe acceptable commit messages

Update workflow.rst to state that commit messages consisting solely of
program output, or that otherwise fail to adequately summarize the
changes being made, are unacceptable.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agotopotests: add standard nhrp test between spoke and hub
Philippe Guibert [Wed, 10 Mar 2021 15:08:55 +0000 (16:08 +0100)]
topotests: add standard nhrp test between spoke and hub

This test establishes a binding between nbma ip of a spoke and its
protocol address. This information is pushed to hub.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agozebra: move neighbor table configuration to dplane contexts
Philippe Guibert [Fri, 26 Feb 2021 09:04:25 +0000 (10:04 +0100)]
zebra: move neighbor table configuration to dplane contexts

Instead of directly configuring the neighbor table after read from zapi
interface, a zebra dplane context is prepared to host the interface and
the family where the neighbor table is updated. Also, some other fields
are hosted: app_probes, ucast_probes, and mcast_probes. More information
on those fields can be found on ip-ntable configuration.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agozebra, lib: handle NEIGH_ADD/DELETE to zebra dataplane framework
Philippe Guibert [Thu, 25 Feb 2021 10:12:34 +0000 (11:12 +0100)]
zebra, lib: handle NEIGH_ADD/DELETE to zebra dataplane framework

EVPN neighbor operations were already done in the zebra dataplane
framework. Now that NHRP is able to use zebra to perform neighbor IP
operations (by programming link IP operations), handle this operation
under dataplane framework:
- assign two new operations NEIGH_IP_INSTALL and NEIGH_IP_DELETE; this
is reserved for GRE like interfaces:
example: ip neigh add A.B.C.D lladdr E.F.G.H
- use 'struct ipaddr' to store and encode the link ip address
- reuse dplane_neigh_info, and create an union with mac address
- reuse the protocol type and use it for neighbor operations; this
permits to store the daemon originating this neighbor operation.
a new route type is created: ZEBRA_ROUTE_NEIGH.
- the netlink level functions will handle a pointer, and a type; the
type indicates the family of the pointer: AF_INET or AF_INET6 if the
link type is an ip address, mac address otherwise.
- to keep backward compatibility with old queries, as no extension was
done, an option NEIGH_NO_EXTENSION has been put in place
- also, 2 new state flags are used: NUD_PERMANENT and NUD_FAILED.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agozebra: handler for configuring neighbor table
Philippe Guibert [Mon, 16 Dec 2019 12:34:00 +0000 (13:34 +0100)]
zebra: handler for configuring neighbor table

neighbor table api in zebra is added. a netlink api is created for that.
the handler is called from the api defined in the previous commit.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agozebra: fixes NDA_DST in netlink_neigh_update() function
Philippe Guibert [Thu, 25 Feb 2021 14:06:23 +0000 (15:06 +0100)]
zebra: fixes NDA_DST in netlink_neigh_update() function

When netlink_neigh_update() is called, the link registration was
failing, due to bad request length.
Also, the query was failing if NDA_DST was an ipv6 address.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agolib: add api to configure neighbor table per interface
Philippe Guibert [Mon, 16 Dec 2019 12:32:28 +0000 (13:32 +0100)]
lib: add api to configure neighbor table per interface

this api is needed for nhrp. the goal is to implement it in zebra, while
other daemon will used it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrp, lib, zebra: add/del neighbor entry possible from nhrp
Philippe Guibert [Fri, 13 Dec 2019 17:09:11 +0000 (18:09 +0100)]
nhrp, lib, zebra: add/del neighbor entry possible from nhrp

a zebra api is extended to offer ability to add or remove neighbor
entry from daemon. Also this extension makes possible to add neigh
entry, not only between IPs and macs, but also between IPs and NBMA IPs.
This API supports configuring ipv6/ipv4 entries with ipv4/ipv6 lladdr.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrpd: link layer registration to notifications
Philippe Guibert [Thu, 12 Dec 2019 15:08:26 +0000 (16:08 +0100)]
nhrpd: link layer registration to notifications

neighbor notifications are done in zebra. so, instead of relying on
nhrp, rely on zebra by using zebra api interface.
Consequently, the code originally used in nhrp for netlink neighor
notification is no more used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agozebra: link layer config and notification, implementation in zebra
Philippe Guibert [Thu, 12 Dec 2019 15:06:59 +0000 (16:06 +0100)]
zebra: link layer config and notification, implementation in zebra

zebra implements zebra api for configuring link layer information. that
can be an arp entry (for ipv4) or ipv6 neighbor discovery entry. This
can also be an ipv4/ipv6 entry associated to an underlay ipv4 address,
as it is used in gre point to multipoint interfaces.
this api will also be used as monitoring. an hash list is instantiated
into zebra (this is the vrf bitmap). each client interested in those entries
in a specific vrf, will listen for following messages: entries added, removed,
or who-has messages.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agolib: link layer neighbor registration and notification, define API msgs
Philippe Guibert [Thu, 12 Dec 2019 15:05:14 +0000 (16:05 +0100)]
lib: link layer neighbor registration and notification, define API msgs

This patch implements new zapi api to get neighbor information that zebra knows
and that other daemons may need to know. Actually, nhrp daemons is
interested in getting the neighbor information on gre interfaces, and
the API will be used for that.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrpd: use CALLOC instead of MALLOC
Philippe Guibert [Tue, 16 Jul 2019 13:04:33 +0000 (15:04 +0200)]
nhrpd: use CALLOC instead of MALLOC

in order to apply a memset to a non initialised structure, use CALLOC
instead of MALLOC

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrpd: lookup appropriate ipsec path
Philippe Guibert [Tue, 16 Jul 2019 13:21:29 +0000 (15:21 +0200)]
nhrpd: lookup appropriate ipsec path

lookup appropriate ipsec path. there are systems where the path where
the charon.vici file is not in standard paths. For that, 'ipsec
--piddir' may help in solving the path.

result of ipsec --piddir is as follow for example:
'
/etc/ike/ipsec.d/run
'

Note that the assumption is done that even if there are several
instances of strongswan across the vrfs, the charon.vici path file is
the same across vrfs. Consequently, as there is a thread per vrf that
performs vici initialisation, and file path retrieval is part of the
vici initialisation procedure, in order to avoid intempestive system
calls, use a boolean 'vici_charon_filepath_done' to avoid doing
unnecessary calls.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agodoc: Check for convergence, not sleep for convergence
Donald Sharp [Fri, 9 Apr 2021 16:06:55 +0000 (12:06 -0400)]
doc: Check for convergence, not sleep for convergence

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Do not sleep(5) when verifying bgp communities
Donald Sharp [Fri, 9 Apr 2021 16:02:18 +0000 (12:02 -0400)]
tests: Do not sleep(5) when verifying bgp communities

There are better ways of ensuring that the remote side
has your change instead of sleeping

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8432 from ton31337/fix/use_bool_for_use32bit_asn
Quentin Young [Fri, 9 Apr 2021 15:59:38 +0000 (15:59 +0000)]
Merge pull request #8432 from ton31337/fix/use_bool_for_use32bit_asn

bgpd: Use bool type to check if use32bit ASN

3 years agoMerge pull request #8428 from idryzhov/show-memory-daemon
Donald Sharp [Fri, 9 Apr 2021 15:18:25 +0000 (11:18 -0400)]
Merge pull request #8428 from idryzhov/show-memory-daemon

vtysh: add "show memory" for a single daemon

3 years agoMerge pull request #8433 from ton31337/fix/mpls_prd_dead_code
Donald Sharp [Fri, 9 Apr 2021 15:17:49 +0000 (11:17 -0400)]
Merge pull request #8433 from ton31337/fix/mpls_prd_dead_code

bgpd: Remove dead code regarding prefix_rd allocation

3 years agoospfd: fix crash on interface/vrf removal
Rafael Zalamena [Fri, 9 Apr 2021 13:54:23 +0000 (10:54 -0300)]
ospfd: fix crash on interface/vrf removal

The interface parameters deletion must be called before
`route_table_finish` due to the usage of the route data structures to
search neighbors in the same interface. If the route info is removed
before that we get the following crash:

```
 6  0x00007f5c6ed50394 in core_handler at lib/sigevent.c:255
 7  <signal handler called>
 8  ospf_interface_bfd_apply (ifp=<optimized out>) at ospfd/ospf_bfd.c:130
 9  0x000055d4c306d076 in ospf_interface_disable_bfd at ospfd/ospf_bfd.c:159
 10 0x000055d4c3071781 in ospf_del_if_params at ospfd/ospf_interface.c:553
 11 0x000055d4c3071900 in ospf_if_delete_hook at ospfd/ospf_interface.c:704
 12 0x00007f5c6ed17935 in hook_call_if_del at lib/if.c:59
 13 if_delete_retain at lib/if.c:290
 14 0x00007f5c6ed19bc5 in if_delete at lib/if.c:313
 15 0x00007f5c6ed19d88 in if_terminate at lib/if.c:1067
 16 0x00007f5c6ed63a04 in vrf_delete at lib/vrf.c:297
 17 0x00007f5c6ed76784 in zclient_vrf_delete at lib/zclient.c:1974
 18 zclient_read at lib/zclient.c:3686
 19 0x00007f5c6ed60f85 in thread_call at lib/thread.c:1815
 20 0x00007f5c6ed20228 in frr_run at lib/libfrr.c:1149
 21 0x000055d4c306bc70 in main at ospfd/ospf_main.c:233
```

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agotests: More black fixups
Donald Sharp [Thu, 8 Apr 2021 17:04:26 +0000 (13:04 -0400)]
tests: More black fixups

Just another round of fixups found by running black on the code

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add some more pytest marks for bgpd
Donald Sharp [Thu, 8 Apr 2021 17:03:36 +0000 (13:03 -0400)]
tests: Add some more pytest marks for bgpd

Just another round of trying to add pytest.mark.bgpd.  Not finished yet just
what I could stand doing for a few minutes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8422 from idryzhov/fix-show-ip-ospf
Donald Sharp [Fri, 9 Apr 2021 12:14:17 +0000 (08:14 -0400)]
Merge pull request #8422 from idryzhov/fix-show-ip-ospf

ospfd: fix crash on "show ip ospf neighbor detail"

3 years agolib: use platform-neutral value for TCP MD5 signature len
Mark Stapp [Thu, 8 Apr 2021 12:56:32 +0000 (08:56 -0400)]
lib: use platform-neutral value for TCP MD5 signature len

Use a pcep-specific value for MD5SIG_MAXLEN, use the OS value if
present.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agobgpd: Remove dead code regarding prefix_rd allocation
Donatas Abraitis [Fri, 9 Apr 2021 07:52:36 +0000 (10:52 +0300)]
bgpd: Remove dead code regarding prefix_rd allocation

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Use bool type to check if use32bit ASN
Donatas Abraitis [Fri, 9 Apr 2021 07:43:11 +0000 (10:43 +0300)]
bgpd: Use bool type to check if use32bit ASN

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8430 from ton31337/fix/revert_0b6d35324ef3fd2b4d5997103795cad73eb...
Patrick Ruddy [Fri, 9 Apr 2021 11:25:21 +0000 (12:25 +0100)]
Merge pull request #8430 from ton31337/fix/revert_0b6d35324ef3fd2b4d5997103795cad73eb72954

Revert "bgpd: BGP session not established for ipv6 link local address…

3 years agodoc: add "show memory [DAEMON]"
Igor Ryzhov [Fri, 9 Apr 2021 08:30:49 +0000 (11:30 +0300)]
doc: add "show memory [DAEMON]"

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: fix crash on "show ip ospf neighbor detail"
Igor Ryzhov [Wed, 7 Apr 2021 23:14:34 +0000 (02:14 +0300)]
ospfd: fix crash on "show ip ospf neighbor detail"

Fixes #8419.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8424 from taspelund/allow_no_advertise_evpn
Donatas Abraitis [Fri, 9 Apr 2021 07:55:11 +0000 (10:55 +0300)]
Merge pull request #8424 from taspelund/allow_no_advertise_evpn

bgpd: always allow no advertise-svi-ip/default-gw

3 years agoRevert "bgpd: BGP session not established for ipv6 link local address with vrf config"
Donatas Abraitis [Fri, 9 Apr 2021 07:14:32 +0000 (10:14 +0300)]
Revert "bgpd: BGP session not established for ipv6 link local address with vrf config"

This reverts commit 0b6d35324ef3fd2b4d5997103795cad73eb72954.

3 years agovtysh: add "show memory" for a single daemon
Igor Ryzhov [Thu, 8 Apr 2021 15:47:43 +0000 (18:47 +0300)]
vtysh: add "show memory" for a single daemon

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8402 from opensourcerouting/debian10-topotest-fix
Patrick Ruddy [Thu, 8 Apr 2021 13:54:54 +0000 (14:54 +0100)]
Merge pull request #8402 from opensourcerouting/debian10-topotest-fix

tests: fix for l3mdev topotests on kernel 4.19

3 years agobgpd: always allow no advertise-svi-ip/default-gw
Trey Aspelund [Thu, 8 Apr 2021 07:25:22 +0000 (07:25 +0000)]
bgpd: always allow no advertise-svi-ip/default-gw

Current behavior has an EVPN_ENABLED check for both standard and 'no'
forms of 'advertise-svi-ip' and 'advertise-default-gw'. This prevents a
user from removing either command from running config if
'advertise-all-vni' is not present.
This commit removes/adjusts the EVPN_ENABLED checks to always allow the
'no' command so config doesn't get stuck.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
3 years agoMerge pull request #7434 from sudhanshukumar22/bgp-link-local-address
Donatas Abraitis [Thu, 8 Apr 2021 06:26:55 +0000 (09:26 +0300)]
Merge pull request #7434 from sudhanshukumar22/bgp-link-local-address

bgpd: BGP session not established for ipv6 link local address with vrf config

3 years agopython: fix 32-bit pointers in xrelfo container_of
David Lamparter [Wed, 7 Apr 2021 22:00:27 +0000 (00:00 +0200)]
python: fix 32-bit pointers in xrelfo container_of

This was mistakenly using the host platform's pointer size rather than
the ELF file's.  Only noticeable when cross compiling...

Signed-off-by: David Lamparter <equinox@diac24.net>