Commit Graph

23768 Commits

Author SHA1 Message Date
Philippe Guibert
d603c0774e 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>
2021-04-13 08:58:49 +02:00
Renato Westphal
b6241291ee
Merge pull request #8389 from idryzhov/route-map-optimization-nb
lib: convert route-map optimization to NB
2021-04-13 00:26:20 -03:00
Renato Westphal
0a6a5721c6
Merge pull request #8396 from achernavin22/ospf_fast_hello_show_run
ospfd: fix output of dead-interval in show running
2021-04-13 00:14:56 -03:00
David Lamparter
1df904706c
Merge pull request #8288 from qlyoung/readd-space-support-to-find-command 2021-04-13 02:22:46 +02:00
David Lamparter
9c2a14e753
Merge pull request #8100 from qlyoung/remove-sample-conf-files 2021-04-13 02:20:53 +02:00
Renato Westphal
0e8c4c1c36
Merge pull request #8451 from idryzhov/bfdd-fix-cli-show
bfdd: fix nb cli show with defaults
2021-04-12 20:26:21 -03:00
Renato Westphal
0da8f4de8d
Merge pull request #8453 from idryzhov/bgpd-fix-transactional-cli
bgpd: fix pending commit check
2021-04-12 20:23:26 -03:00
Lou Berger
d7026eff4c doc: add Ubuntu18.04 and 20.04 container info to building-docker.rst
Signed-off-by: Lou Berger <lberger@labn.net>
2021-04-12 17:14:10 -04:00
Lou Berger
7d8a460923 *: 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>
2021-04-12 16:56:38 -04:00
Lou Berger
60bad451a5 ubuntu20-ci: create a docker 20.04 container for dev / test / ci
Signed-off-by: Lou Berger <lberger@labn.net>
2021-04-12 16:56:38 -04:00
Lou Berger
cd18e08a01 ubuntu18-ci: create a docker 18.04 container for dev / test / ci
Signed-off-by: Lou Berger <lberger@labn.net>
2021-04-12 16:56:38 -04:00
Philippe Guibert
850b2b70ac nhrp: avoid crashing when terminating interface contexts
avoid crashing when terminating interface contexts.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-04-12 19:23:57 +02:00
Philippe Guibert
f468a45af2 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>
2021-04-12 19:23:53 +02:00
Donatas Abraitis
b993aae0d0 doc: Add an option for vtysh to override history file path
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-04-12 17:33:36 +03:00
Donatas Abraitis
69d4cc70ee 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>
2021-04-12 17:33:35 +03:00
Igor Ryzhov
ea1a5c00df 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>
2021-04-12 16:42:51 +03:00
Mark Stapp
53c42c82de
Merge pull request #8421 from opensourcerouting/xrelfo-arm
fix xrelfo on ARM(32) & cross-compile
2021-04-12 08:07:05 -04:00
Igor Ryzhov
613bcbc5d5 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>
2021-04-12 14:21:36 +03:00
Igor Ryzhov
af736200e1 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>
2021-04-12 10:56:04 +03:00
Donatas Abraitis
244e6cab3f doc: Add show [ip] bgp version <version> command
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-04-12 10:43:54 +03:00
Donatas Abraitis
7d3cae70b2 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>
2021-04-12 10:43:53 +03:00
Donatas Abraitis
d89b48fe28 tests: Add BGP RPKI show header to outputs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-04-12 10:34:52 +03:00
Donatas Abraitis
0bcfc1a330 doc: Add BGP RPKI show header to some output examples
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-04-12 10:34:36 +03:00
Donatas Abraitis
9119ef3a8b 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>
2021-04-11 21:42:18 +03:00
Donatas Abraitis
82c298be73 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>
2021-04-11 21:39:46 +03:00
Jafar Al-Gharaibeh
8435eae7bb
Merge pull request #8440 from qlyoung/doc-describe-acceptable-commit-messages
doc: describe acceptable commit messages
2021-04-10 23:07:49 -05:00
Donatas Abraitis
4c3e68492b
Merge pull request #8438 from donaldsharp/doc_on_sleep
doc: Check for convergence, not sleep for convergence
2021-04-10 19:35:52 +03:00
Donatas Abraitis
f14c3c4f33
Merge pull request #8444 from qlyoung/doc-system-requirements
doc: vaguely describe system requirements
2021-04-10 10:04:42 +03:00
Donatas Abraitis
69d5fcfac5
Merge pull request #8445 from qlyoung/doc-bgp-timers
doc: document BGP neighbor timers
2021-04-10 09:57:39 +03:00
Quentin Young
0c969c0fe5 doc: document BGP neighbor timers
The keepalive, hold, and connect timers were undocumented.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-09 18:17:15 -04:00
Quentin Young
c71559de10 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>
2021-04-09 18:05:42 -04:00
David Lamparter
0490ce41c1 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>
2021-04-09 20:41:57 +02:00
Mark Stapp
2fe49c7b35
Merge pull request #8429 from donaldsharp/markit
Markit
2021-04-09 14:24:22 -04:00
Igor Ryzhov
38133c4a11 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>
2021-04-09 20:58:36 +03:00
Igor Ryzhov
895e674b5c
Merge pull request #8435 from opensourcerouting/ospf-bfd-fix
ospfd: fix crash on interface/vrf removal
2021-04-09 20:56:06 +03:00
David Lamparter
636aad9473 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>
2021-04-09 19:56:05 +02:00
Quentin Young
6c8bdfd569 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>
2021-04-09 13:14:30 -04:00
Quentin Young
b27cfd9163 debian: install frr.conf to /etc/frr/
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-09 13:14:30 -04:00
Quentin Young
b832909b42 *: 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>
2021-04-09 13:14:30 -04:00
Quentin Young
ed0c871ecf rpm: install frr.conf by default
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-09 13:14:30 -04:00
Quentin Young
f0492ffdd2
Merge pull request #8427 from mjstapp/fix_pcep_keylen
lib: use platform-neutral value for TCP MD5 signature len
2021-04-09 16:59:05 +00:00
Quentin Young
7bd4560bbd 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>
2021-04-09 12:55:33 -04:00
Philippe Guibert
e63801cd5f 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>
2021-04-09 18:29:58 +02:00
Philippe Guibert
e18747a967 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>
2021-04-09 18:29:58 +02:00
Philippe Guibert
0a27a2fef5 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>
2021-04-09 18:29:58 +02:00
Philippe Guibert
541025d6ff 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>
2021-04-09 18:29:58 +02:00
Philippe Guibert
df948efc56 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>
2021-04-09 18:29:58 +02:00
Philippe Guibert
451e2b8c7e 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>
2021-04-09 18:29:58 +02:00
Philippe Guibert
05657ec2b7 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>
2021-04-09 18:29:58 +02:00
Philippe Guibert
b3b7510464 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>
2021-04-09 18:29:58 +02:00