]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoripd: fix minor issues from the northbound conversion
Renato Westphal [Thu, 29 Nov 2018 19:06:22 +0000 (17:06 -0200)]
ripd: fix minor issues from the northbound conversion

* Always apply the mask of IPv4 prefixes (user data) in the
  northbound callbacks, we shouldn't assume the northbound plugins
  will do that for us.

* Fix a bug in the "distance" command introduced by commit a6233bfcb3b.

* Remove unnecessary check in the
  ripd_instance_redistribute_route_map_delete() function and
  reset the route-map's map pointer for safety as well.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripd: remove leftovers from the old sighup handler
Renato Westphal [Thu, 29 Nov 2018 19:05:40 +0000 (17:05 -0200)]
ripd: remove leftovers from the old sighup handler

Commit bc1bdde2f6 removed the rip_reset() function but didn't remove
other functions that were only called by rip_reset(). Remove them
now (dead code).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobuild: update vtysh scan list for ripd and ripngd
Renato Westphal [Thu, 29 Nov 2018 18:46:00 +0000 (16:46 -0200)]
build: update vtysh scan list for ripd and ripngd

A few files don't have any CLI commands anymore as they were moved
to either rip_cli.c or ripng_cli.c. Update the ripd/ripngd vtysh_scan
variable to account for this.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: implement northbound callbacks to fetch route information
Renato Westphal [Thu, 29 Nov 2018 18:41:43 +0000 (16:41 -0200)]
ripngd: implement northbound callbacks to fetch route information

The "routes" YANG container was copied and adapted from the ietf-rip
module.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: implement northbound callbacks to fetch neighbor information
Renato Westphal [Thu, 29 Nov 2018 18:41:32 +0000 (16:41 -0200)]
ripngd: implement northbound callbacks to fetch neighbor information

The "neighbors" YANG container was copied and adapted from the
ietf-rip module.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: implement the 'clear-ripng-route' YANG RPC
Renato Westphal [Thu, 29 Nov 2018 15:24:26 +0000 (13:24 -0200)]
ripngd: implement the 'clear-ripng-route' YANG RPC

The "clear ipv6 ripng" command was turned into a YANG RPC so that
other northbound plugins can execute it as well. This RPC closely
matches the 'clear-rip-route' RPC from the ietf-rip module.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: fix SIGHUP handling
Renato Westphal [Thu, 29 Nov 2018 15:11:05 +0000 (13:11 -0200)]
ripngd: fix SIGHUP handling

Now that all ripngd commands were converted to the new northbound
model, the ripngd SIGHUP handler is capable of doing a full
configuration reload just by calling the vty_read_config()
function. Nothing else should be done in the SIGHUP handler.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'split-horizon' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 13:44:55 +0000 (11:44 -0200)]
ripngd: retrofit the 'split-horizon' command to the new northbound model

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'timer basic' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 13:21:13 +0000 (11:21 -0200)]
ripngd: retrofit the 'timer basic' command to the new northbound model

Trivial conversion. Use the northbound 'apply_finish()' callback
so we'll call ripng_event() only once even if we change the three
RIPng timers at the same time.

Convert the timers to uint16_t to match their representation in
the YANG model.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'aggregate-address' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 13:02:35 +0000 (11:02 -0200)]
ripngd: retrofit the 'aggregate-address' command to the new northbound model

Trivial conversion. Remove the ripng->aggregate routing table and
associated code because this variable was used only to show the
running configuration.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'route' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 12:56:09 +0000 (10:56 -0200)]
ripngd: retrofit the 'route' command to the new northbound model

Trivial conversion. Remove the ripng->route routing table and
associated code because this variable was used only to show the
running configuration.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'redistribute' commands to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 05:06:38 +0000 (03:06 -0200)]
ripngd: retrofit the 'redistribute' commands to the new northbound model

Trivial conversion. As usual, combine multiple DEFUNs into a single
DEFPY for simplicity.

As a bonus of the northbound conversion, this commit fixes the
redistribution of certain protocols into ripngd. The 'redist_type'
array used by the "redistribute" commands was terribly outdated,
which was preventing the CLI to parse correctly certain protocols
like isis and babel.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'passive-interface' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 04:41:57 +0000 (02:41 -0200)]
ripngd: retrofit the 'passive-interface' command to the new northbound model

Trivial conversion.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'offset-list' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 04:27:16 +0000 (02:27 -0200)]
ripngd: retrofit the 'offset-list' command to the new northbound model

Remove the ripng_offset_list_set() and ripng_offset_list_unset()
functions since they set/unset multiple configuration options at the
same time. The northbound callbacks need to set/unset configuration
options individually.

The frr-ripngd YANG module models the "offset-list" command using a
list keyed by the 'interface' and 'direction' leafs. One important
detail is that the IFNAME parameter is optional, and when it's not
present it means we want to match all interfaces. This is modeled
using an interface name of '*' since list keys are mandatory leafs
by definition in YANG.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'network' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 03:45:02 +0000 (01:45 -0200)]
ripngd: retrofit the 'network' command to the new northbound model

The frr-ripngd YANG module models the ripngd "network" command
using two separate leaf-lists for simplicity: one leaf-list
for interfaces and another leaf-list for actual networks. In the
'cli_show' callbacks, display the "network" command for entries of
both leaf-lists.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'default-metric' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 03:20:28 +0000 (01:20 -0200)]
ripngd: retrofit the 'default-metric' command to the new northbound model

Trivial conversion. ripng->default_metric was converted to an
uint8_t to match the way it's defined in the YANG module.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'default-information' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 03:12:29 +0000 (01:12 -0200)]
ripngd: retrofit the 'default-information' command to the new northbound model

Trivial conversion. 'ripng->default_information' was removed because
it was being used only to display the running configuration and
thus is not necessary anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'allow-ecmp' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 02:57:39 +0000 (00:57 -0200)]
ripngd: retrofit the 'allow-ecmp' command to the new northbound model

Trivial conversion. The ripng->ecmp variable was converted to a boolean
to match the way it's defined in the YANG module.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripngd: retrofit the 'router ripng' command to the new northbound model
Renato Westphal [Thu, 29 Nov 2018 02:49:49 +0000 (00:49 -0200)]
ripngd: retrofit the 'router ripng' command to the new northbound model

* Implement the northbound callbacks associated to the
  '/frr-ripngd:ripngd/instance' YANG path (the code is mostly a copy
  and paste from the original "router ripng" DEFUNs);
* Move ripng_make_socket() out of ripng_create() since creating a
  socket is an error-prone operation and thus needs to be performed
  separately during the NB_EV_PREPARE phase;
* On ripng_create(), fetch the defaults from the frr-ripngd YANG
  model;
* Convert the "[no] router ripng" CLI commands to be dumb wrappers
  around the northbound callbacks;
* On ripng_config_write(), write logic to call all 'cli_show'
  northbound callbacks defined under the '/frr-ripngd:ripngd/instance'
  YANG path.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoyang, ripngd: add 'frr-ripngd.yang' and associated stub callbacks
Renato Westphal [Thu, 29 Nov 2018 01:51:34 +0000 (23:51 -0200)]
yang, ripngd: add 'frr-ripngd.yang' and associated stub callbacks

Introduce frr-ripngd.yang, which defines a model for managing the
FRR ripngd daemon.

Update the 'frr_yang_module_info' array of ripngd with the new
'frr-ripngd' module.

Add two new files (ripng_cli.[ch]) which should contain all ripngd
commands converted to the new northbound model. Centralizing all
commands in a single place will facilitate the process of moving
the CLI to a separate program in the future.

Add automatically generated stub callbacks in
ripng_northbound.c. These callbacks will be implemented gradually
in the following commits.

Add the confd.frr-ripngd.yang YANG module with annotations specific
to the ConfD daemon.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agosharpd: return check (Coverity 1475198)
F. Aragon [Fri, 30 Nov 2018 17:02:09 +0000 (18:02 +0100)]
sharpd: return check (Coverity 1475198)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoRevert "tests/topotests: Change docker build context"
Christian Franke [Sat, 1 Dec 2018 18:40:38 +0000 (19:40 +0100)]
Revert "tests/topotests: Change docker build context"

This reverts commit 659782730bffea2d21e2fa22550db3166017061e.

Apparently, the build context is inferred from the Dockerfile path.
Yay for sensible documentation. :/

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoMerge pull request #3409 from opensourcerouting/feature/cleanup-topotest-docker-docs
Donald Sharp [Sat, 1 Dec 2018 17:46:13 +0000 (12:46 -0500)]
Merge pull request #3409 from opensourcerouting/feature/cleanup-topotest-docker-docs

Feature/cleanup topotest docker docs

5 years agoMerge pull request #3408 from opensourcerouting/revert-empty-init
Donald Sharp [Sat, 1 Dec 2018 16:55:43 +0000 (11:55 -0500)]
Merge pull request #3408 from opensourcerouting/revert-empty-init

Revert "isisd lib ospfd pbrd python: fix empty init"

5 years agotests/topotests: Set -o cache_dir=/tmp
Christian Franke [Sat, 1 Dec 2018 16:16:01 +0000 (17:16 +0100)]
tests/topotests: Set -o cache_dir=/tmp

We are mounting the topotests from the host into the container
and mark them as read-only to avoid any modifications to the host.

Pytest tries to create a .pytest_chache directory in that location
which fails because of the read-only mount.

Configure a different cache dir which is writable to resolve this.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agotests/topotests: Change docker build context
Christian Franke [Sat, 1 Dec 2018 15:54:58 +0000 (16:54 +0100)]
tests/topotests: Change docker build context

In order to support automated builds, the build context needs to be
the repository root.

So adapt our dockerfile and buildscript for this. Also, add files which
should not be included into the build context in .dockerignore to limit
the size of the build context to something sensible.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoRevert "isisd lib ospfd pbrd python: fix empty init"
David Lamparter [Sat, 1 Dec 2018 15:49:45 +0000 (16:49 +0100)]
Revert "isisd lib ospfd pbrd python: fix empty init"

This reverts commit 48944eb65e1d1ced03d46121d923d9d613a480d5.

We're using GNU C, not ISO C - and this commit triggers new (real)
warnings about {0} instead of bogus ones about {}.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3405 from LabNConsulting/working/master/fix-vrf
Donald Sharp [Sat, 1 Dec 2018 15:45:23 +0000 (10:45 -0500)]
Merge pull request #3405 from LabNConsulting/working/master/fix-vrf

bgpd: partially revert e23b9ef6d271223d29c7f91a10d98aa6dcd252b3

5 years agotests/topotests: Update documentation
Christian Franke [Sat, 1 Dec 2018 15:33:34 +0000 (16:33 +0100)]
tests/topotests: Update documentation

The documentation needs an update to match the integrated version.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoMerge pull request #3378 from opensourcerouting/remove-config-lock
Donald Sharp [Fri, 30 Nov 2018 23:50:49 +0000 (18:50 -0500)]
Merge pull request #3378 from opensourcerouting/remove-config-lock

*: remove the configuration lock from all daemons

5 years agoMerge pull request #3386 from pguibert6WIND/bgp_fs_pbr_ignores_null_ip
Donald Sharp [Fri, 30 Nov 2018 23:50:25 +0000 (18:50 -0500)]
Merge pull request #3386 from pguibert6WIND/bgp_fs_pbr_ignores_null_ip

bgpd: bgp pbr ignores bgp fs entries with 0.0.0.0 ips written.

5 years agoMerge pull request #3390 from pguibert6WIND/bgp_flowspec_new_redirect_ip_draft
Donald Sharp [Fri, 30 Nov 2018 23:36:25 +0000 (18:36 -0500)]
Merge pull request #3390 from pguibert6WIND/bgp_flowspec_new_redirect_ip_draft

bgpd: add new draft for redirect ip for flowspec

5 years agoMerge pull request #3403 from opensourcerouting/bfd-fix-mhop-bsd
Donald Sharp [Fri, 30 Nov 2018 23:26:31 +0000 (18:26 -0500)]
Merge pull request #3403 from opensourcerouting/bfd-fix-mhop-bsd

bfdd: fix multihop on FreeBSD

5 years agolib: Cleanup nexthop2str code to be consistent
Donald Sharp [Fri, 30 Nov 2018 21:07:34 +0000 (16:07 -0500)]
lib: Cleanup nexthop2str code to be consistent

We sometimes store ifindex information in the NEXTHOP_TYPE_IPV[4|6]
so let's let us display that information as well when dumping
a nexthop.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3396 from opensourcerouting/feature/topotests-docker
Donald Sharp [Fri, 30 Nov 2018 20:39:50 +0000 (15:39 -0500)]
Merge pull request #3396 from opensourcerouting/feature/topotests-docker

feature: docker image for topotests

5 years agobgpd: partially revert e23b9ef6d271223d29c7f91a10d98aa6dcd252b3
Lou Berger [Fri, 30 Nov 2018 19:35:25 +0000 (19:35 +0000)]
bgpd: partially revert e23b9ef6d271223d29c7f91a10d98aa6dcd252b3
      previous change was to fix rnh module in Zebra for leaked routes
      this reverts that fix, so probably reintroduces the problem.

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobfdd: fix multihop on FreeBSD
Rafael Zalamena [Fri, 30 Nov 2018 17:02:23 +0000 (15:02 -0200)]
bfdd: fix multihop on FreeBSD

Some systems have a extra `struct sockaddr*` field (`_len`) which must
be filled in order for the peer lookup to work.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobgpd: bgp pbr ignores bgp fs entries with 0.0.0.0 ips written.
Philippe Guibert [Tue, 27 Nov 2018 12:35:28 +0000 (13:35 +0100)]
bgpd: bgp pbr ignores bgp fs entries with 0.0.0.0 ips written.

when converting bgp fs entries to bgp pbr entries, the fields of the
flowspec are analysed. In the case src ip or dst ip is set to 0.0.0.0,
that field is ignored, thus preventing from injecting a rule that can
not be injected into the pbr. This can be done by avoiding mentioning
the field in the bitmask structure used to convert data to pbr entries.

PR=61620
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Acked-by: Emmanuel Vize <emmanuel.vize@6wind.com>
5 years agobgpd: add new draft for redirect ip for flowspec
Philippe Guibert [Tue, 27 Nov 2018 15:32:45 +0000 (16:32 +0100)]
bgpd: add new draft for redirect ip for flowspec

that new option will overwrite simpson draft. There is a new ecommunity
option whose type is 0x1 and subtype is 0xc. That option is defined
here on iana.org/assignments/bgp-extended-communities page:
- bgp-extended-communities.xhtml#trans-ipv4
It contains the IP address to redirect traffic to. The understanding of
the draft is the following one:
- if that community is only present, then the ip contained inside will
be chosen as nexthop.
- if that community is provided along with simpson extended community,
then only the new redirect ip draft will be used. however, both will be
displayed.
- in other cases, if there is only the simpson extended community, then
the nexthop IP of the NLRI will be chosen.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: handle neighbor delete from kernel for ipv4 link-local
Don Slice [Wed, 28 Nov 2018 15:57:01 +0000 (15:57 +0000)]
zebra: handle neighbor delete from kernel for ipv4 link-local

Problem reported that kernel neighbor entries could end up in "FAILED"
state when the neighbor entry was deleted.  This fix handles the
notification of the event from netlink messages and re-inserts the
deleted entry.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #3391 from pguibert6WIND/doc_ldp_prefered_connection
Russ White [Thu, 29 Nov 2018 20:27:58 +0000 (15:27 -0500)]
Merge pull request #3391 from pguibert6WIND/doc_ldp_prefered_connection

doc: add ldp information over transport connection

5 years agoMerge pull request #3394 from karamalla0406/frr3360
Russ White [Thu, 29 Nov 2018 20:26:14 +0000 (15:26 -0500)]
Merge pull request #3394 from karamalla0406/frr3360

bgpd: The default IP route not advertised with configured RD

5 years agoMerge pull request #3383 from qlyoung/fix-static-routes-again
Russ White [Thu, 29 Nov 2018 20:24:03 +0000 (15:24 -0500)]
Merge pull request #3383 from qlyoung/fix-static-routes-again

staticd: fix null0 routes (again)

5 years agoMerge pull request #3342 from opensourcerouting/nb-operational-data
Russ White [Thu, 29 Nov 2018 20:19:38 +0000 (15:19 -0500)]
Merge pull request #3342 from opensourcerouting/nb-operational-data

Northbound: improved support for YANG-modeled operational data

5 years agoMerge pull request #3397 from mjstapp/fix_stream_macros
Donald Sharp [Thu, 29 Nov 2018 18:10:02 +0000 (13:10 -0500)]
Merge pull request #3397 from mjstapp/fix_stream_macros

libs,bgpd: remove deprecated stream lib macros

5 years agolib,bgpd: remove deprecated stream lib macros
Mark Stapp [Thu, 29 Nov 2018 16:13:15 +0000 (11:13 -0500)]
lib,bgpd: remove deprecated stream lib macros

A couple of deprecated lib/stream macros have aged out; remove
them, and replace the one remaining use.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agotopotests: Only set -t when input is a terminal
Christian Franke [Thu, 29 Nov 2018 15:05:44 +0000 (16:05 +0100)]
topotests: Only set -t when input is a terminal

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agotopotests: Adapt docker changes for integrated tests
Christian Franke [Thu, 29 Nov 2018 14:22:23 +0000 (15:22 +0100)]
topotests: Adapt docker changes for integrated tests

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agodocker/frr-topotests: Fix missing $ in if check
Christian Franke [Tue, 20 Nov 2018 15:32:09 +0000 (16:32 +0100)]
docker/frr-topotests: Fix missing $ in if check

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agodocker/compile_frr: Don't build with disable shared
Christian Franke [Fri, 9 Nov 2018 14:42:10 +0000 (15:42 +0100)]
docker/compile_frr: Don't build with disable shared

With libyang, we need to build the frr_user_types.so libyang
plugin for FRR to work.

This means we cannot build with disable shared.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agodocker: Improve README and frr-topotests usage
Christian Franke [Mon, 5 Nov 2018 16:44:18 +0000 (17:44 +0100)]
docker: Improve README and frr-topotests usage

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDockerfile: Install libyang
Christian Franke [Mon, 5 Nov 2018 16:23:37 +0000 (17:23 +0100)]
Dockerfile: Install libyang

Recent versions of FRR require libyang to build. So install it from
the FRR CI servers.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDocker: Fail if compilation is unsucessful
Christian Franke [Thu, 1 Nov 2018 17:14:23 +0000 (18:14 +0100)]
Docker: Fail if compilation is unsucessful

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDocker: Document additional environment variables
Christian Franke [Tue, 30 Oct 2018 17:26:38 +0000 (18:26 +0100)]
Docker: Document additional environment variables

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDocker: Use pytest as default command
Christian Franke [Thu, 18 Oct 2018 11:48:55 +0000 (13:48 +0200)]
Docker: Use pytest as default command

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDocker: move openvswitch setup to separate script
Christian Franke [Thu, 18 Oct 2018 11:04:01 +0000 (13:04 +0200)]
Docker: move openvswitch setup to separate script

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDocker: Allow executing topotests while in subdir of FRR repo
Christian Franke [Thu, 18 Oct 2018 10:27:37 +0000 (12:27 +0200)]
Docker: Allow executing topotests while in subdir of FRR repo

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDocker: really cleanup when TOPOTEST_CLEAN is specified
Christian Franke [Thu, 18 Oct 2018 10:27:16 +0000 (12:27 +0200)]
Docker: really cleanup when TOPOTEST_CLEAN is specified

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDocker: Update buildscript not to delete old images
Christian Franke [Thu, 18 Oct 2018 10:07:24 +0000 (12:07 +0200)]
Docker: Update buildscript not to delete old images

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDocker: Call the run script frr-topotests.sh
Christian Franke [Thu, 18 Oct 2018 09:56:20 +0000 (11:56 +0200)]
Docker: Call the run script frr-topotests.sh

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDockerfile: Use iputils-ping instead of inetutils-ping, install strace
Christian Franke [Thu, 18 Oct 2018 09:32:00 +0000 (11:32 +0200)]
Dockerfile: Use iputils-ping instead of inetutils-ping, install strace

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDocker: Update buildscripts to be more efficient
Christian Franke [Thu, 18 Oct 2018 09:31:20 +0000 (11:31 +0200)]
Docker: Update buildscripts to be more efficient

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agodocker: Install topotests into image
Christian Franke [Wed, 17 Oct 2018 18:31:52 +0000 (20:31 +0200)]
docker: Install topotests into image

Also: Change directory layout so we can do an indempotent sync from host
later.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agodocker: reindent shell scripts
Christian Franke [Wed, 17 Oct 2018 17:56:26 +0000 (19:56 +0200)]
docker: reindent shell scripts

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agodocker: Run container with its own network namespace
Christian Franke [Wed, 17 Oct 2018 17:35:15 +0000 (19:35 +0200)]
docker: Run container with its own network namespace

For normal operation, there is no need for the container to run
in the host network environment or to have access to the users
X Session.

To accomodate usecases which need this, there is now a `TOPOTEST_OPTIONS`
environment variable to provide additional options to the docker run
command.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoDockerfile: Move to project root and combine RUNs
Christian Franke [Wed, 17 Oct 2018 16:27:35 +0000 (18:27 +0200)]
Dockerfile: Move to project root and combine RUNs

According to https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run
`apt-get update` should always be combined with `apt-get install` in
the same `RUN` statement, to avoid installation of outdated packages.

Also, combine some more `RUN`s together as to avoid fewer layers.

Finally, remove some comments which are superflous. Comments shouldn't
describe what is done, especially when it's obvious. They should
explain why something is done.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agodocker: add support for running inside container
Rafael Zalamena [Mon, 16 Apr 2018 20:53:25 +0000 (17:53 -0300)]
docker: add support for running inside container

Based on the original @cfra idea of running topotest on docker.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #3384 from donaldsharp/topotests
Christian Franke [Thu, 29 Nov 2018 14:29:08 +0000 (15:29 +0100)]
Merge pull request #3384 from donaldsharp/topotests

Topotests

5 years agobgpd: The default IP route not advertised with configured RD
Kishore Aramalla [Thu, 29 Nov 2018 03:18:08 +0000 (19:18 -0800)]
bgpd: The default IP route not advertised with configured RD

When "default-originate ipv4" is configured, a type-5 route is installed in
the local node and advertised to the peer with auto-rd.

When the above was followed by configuring an RD in IP VRF, Type-5 are
generated for only the non-default routes.

Fixed this issue by withdrawing the default route with auto-rd and advertising
 the route with confiured RD.

Signed-off-by: Kishore Aramalla karamalla@vmware.com
5 years agoMerge pull request #3393 from donaldsharp/rnh_resend
Renato Westphal [Wed, 28 Nov 2018 22:30:15 +0000 (20:30 -0200)]
Merge pull request #3393 from donaldsharp/rnh_resend

zebra: Always resend nexthop information when registered

5 years agoMerge pull request #3389 from pguibert6WIND/ip_prefixes_do_not_look_integer
Renato Westphal [Wed, 28 Nov 2018 17:49:50 +0000 (15:49 -0200)]
Merge pull request #3389 from pguibert6WIND/ip_prefixes_do_not_look_integer

lib: do not convert ip prefixes without '.' or ':'

5 years agoMerge pull request #3377 from opensourcerouting/northbound-improvements
Donald Sharp [Wed, 28 Nov 2018 16:52:47 +0000 (11:52 -0500)]
Merge pull request #3377 from opensourcerouting/northbound-improvements

northbound: API improvements + minor fixes

5 years agozebra: Always resend nexthop information when registered
Donald Sharp [Wed, 28 Nov 2018 16:43:26 +0000 (11:43 -0500)]
zebra: Always resend nexthop information when registered

Always resend the nexthop information when we get a registration
event.  Multiple daemons expect this information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
5 years agolib: do not convert ip prefixes without '.'
Philippe Guibert [Wed, 28 Nov 2018 11:15:09 +0000 (12:15 +0100)]
lib: do not convert ip prefixes without '.'

There are cases where the passed parameter for a vty command is either
an interface name or an ip address. Because the interface name can be a
number, and because the user may want to use a number to define an IP (
for instance 'ping 0' is valid from shell purpose), there is a choice
that needs to be done at frr level. either from the application point of
view, the interface name will be priorized, or each number will be
considered as an ip address. In that commit, the inet_aton procedure is
replaced with the inet_pton procedure that ignores ips with just a
number.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: add ldp information over transport connection
Philippe Guibert [Wed, 28 Nov 2018 13:26:15 +0000 (14:26 +0100)]
doc: add ldp information over transport connection

transport connection prefers ipv6, unless ipv4 is explicitly configured
on ldp.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agotopotests: Add ospf-sr-topo1 back in
Donald Sharp [Tue, 27 Nov 2018 19:12:40 +0000 (14:12 -0500)]
topotests: Add ospf-sr-topo1 back in

Due to weird merge issues ospf-sr-topo1 was not pulled in.
This gets this back into the tree.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
5 years agoAdd a tiny breadcrumb to hopefully help end user
Donald Sharp [Mon, 26 Nov 2018 15:56:56 +0000 (10:56 -0500)]
Add a tiny breadcrumb to hopefully help end user

Add a breadcrumb for people testing to hopefully allow
them to figure out what is going wrong when they
are testing different versions of FRR using
topotests and staticd is not running because
this version of staticd needs to be cleaned up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgp-ecmp-topo1: fix some pylint warnings
Rafael Zalamena [Tue, 6 Nov 2018 15:48:46 +0000 (13:48 -0200)]
bgp-ecmp-topo1: fix some pylint warnings

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobgp-ecmp-topo1: fix vrf default change
Rafael Zalamena [Tue, 6 Nov 2018 15:45:55 +0000 (13:45 -0200)]
bgp-ecmp-topo1: fix vrf default change

Python's `string' method 'replace' doesn't actually modify the string,
instead it returns a new string with the modified content.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobgp-ecmp-topo1: change default vrf name
Philippe Guibert [Tue, 23 Oct 2018 16:22:50 +0000 (18:22 +0200)]
bgp-ecmp-topo1: change default vrf name

By default, default vrf name is default, whereas BGP default vrf was
hardcoded to Default. Because this will be fixes, do not care about the
vrf name field and apply a regexp to move Default to default.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoospf6-topo1: Don't compare link-local routes
Christian Franke [Thu, 18 Oct 2018 12:16:16 +0000 (14:16 +0200)]
ospf6-topo1: Don't compare link-local routes

Topotests would fail with errors like these:

    AssertionError: Linux Kernel IPv6 Routing Table verification failed for router r1:
      --- actual OSPFv3 IPv6 routing table
      +++ expected OSPFv3 IPv6 routing table
      @@ -8,6 +8,6 @@
       fc00:4:4:4::/64 via fe80::__(r3-sw5)__ dev r1-sw5 proto XXXX metric 20 pref medium
       fc00:a:a:a::/64 dev r1-sw5 proto XXXX metric 256 pref medium
       fc00:b:b:b::/64 via fe80::__(r3-sw5)__ dev r1-sw5 proto XXXX metric 20 pref medium
      -fe80::/64 dev lo proto XXXX metric 256 pref medium
       fe80::/64 dev r1-stubnet proto XXXX metric 256 pref medium
      -fe80::/64 dev r1-sw5 proto XXXX metric 256 pref medium
      +fe80::/64 dev r1-sw5 proto XXXX metric 256 pref medium
      +unreachable fe80::/64 dev lo proto XXXX metric 256 error -101 pref medium

Resolve this by not comparing link-local routes.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agolib, lm-proxy-topo1: label manager proxy test
paco [Mon, 4 Jun 2018 14:06:37 +0000 (16:06 +0200)]
lib, lm-proxy-topo1: label manager proxy test

Label proxy manager test covering both LDP and BGP label requests.

lib/topotest.py:restartRouter() function has been fixed in order to
allow propagating options to deamons other than zebra.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agopick ospf6 router-id syntax based on version
Martin Winter [Fri, 7 Sep 2018 00:15:19 +0000 (17:15 -0700)]
pick ospf6 router-id syntax based on version

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agolib: checkRouterVersion to determine version
Martin Winter [Thu, 6 Sep 2018 22:52:43 +0000 (15:52 -0700)]
lib: checkRouterVersion to determine version

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoClean up deprecated usage of router-id
Donald Sharp [Thu, 30 Aug 2018 20:15:29 +0000 (16:15 -0400)]
Clean up deprecated usage of router-id

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agobfd-topo1: import topology picture
Rafael Zalamena [Wed, 8 Aug 2018 15:27:39 +0000 (12:27 -0300)]
bfd-topo1: import topology picture

Import the graphviz file and the generated picture.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfd-topo1: add fast reconvergence test
Rafael Zalamena [Wed, 6 Jun 2018 21:02:34 +0000 (18:02 -0300)]
bfd-topo1: add fast reconvergence test

Test that after a link goes down BGPd will be notified and recovered
quickly. Also test that BFD show command tells us that the peer went
down.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfd-topo1: add convergence tests
Rafael Zalamena [Wed, 28 Feb 2018 16:08:14 +0000 (13:08 -0300)]
bfd-topo1: add convergence tests

Test if BFD peers have found each other and if the BGP neighors have
connected.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agotopogen/topotest: add support for BFDd
Rafael Zalamena [Wed, 28 Feb 2018 16:06:16 +0000 (13:06 -0300)]
topogen/topotest: add support for BFDd

Allow BFDd to be configured and used.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobgp_rfapi_basic_sanity_config2: allow for slow CI
Lou Berger [Wed, 29 Aug 2018 19:28:13 +0000 (19:28 +0000)]
bgp_rfapi_basic_sanity_config2: allow for slow CI

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_rfapi_basic_sanity_config2: added rfapi test with partial table download This...
Lou Berger [Wed, 29 Aug 2018 15:48:37 +0000 (15:48 +0000)]
bgp_rfapi_basic_sanity_config2: added rfapi test with partial table download This is identical to bgp_rfapi_basic_sanity with the exception of non-default config

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_rfapi_basic_sanity: added query only NVE
Lou Berger [Wed, 29 Aug 2018 14:39:37 +0000 (14:39 +0000)]
bgp_rfapi_basic_sanity: added query only NVE

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agolib: Add support for Ubuntu 18.04 with installed FRR package
Martin Winter [Wed, 29 Aug 2018 14:35:51 +0000 (07:35 -0700)]
lib: Add support for Ubuntu 18.04 with installed FRR package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agobgp_rfapi_basic_sanity: added multi-path to timeout test
Lou Berger [Wed, 29 Aug 2018 14:18:02 +0000 (14:18 +0000)]
bgp_rfapi_basic_sanity: added multi-path to timeout test

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_rfapi_basic_sanity: added cost to 2nd MP route
Lou Berger [Wed, 29 Aug 2018 13:42:28 +0000 (13:42 +0000)]
bgp_rfapi_basic_sanity: added cost to 2nd MP route

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_rfapi_basic_sanity: added multi-path and updated responses
Lou Berger [Wed, 29 Aug 2018 12:40:25 +0000 (12:40 +0000)]
bgp_rfapi_basic_sanity: added multi-path and updated responses

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_rfapi_basic_sanity: wait for clean exit
Lou Berger [Tue, 28 Aug 2018 21:47:58 +0000 (21:47 +0000)]
bgp_rfapi_basic_sanity: wait for clean exit

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_rfapi_basic_sanity: added check_timeout (uses FRR PR#2934)
Lou Berger [Tue, 28 Aug 2018 19:58:54 +0000 (19:58 +0000)]
bgp_rfapi_basic_sanity: added check_timeout (uses FRR PR#2934)

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_rfapi_basic_sanity: added close check
Lou Berger [Tue, 28 Aug 2018 18:10:05 +0000 (18:10 +0000)]
bgp_rfapi_basic_sanity: added close check

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_rfapi_basic_sanity: address PR comments (copyright, switch)
Lou Berger [Tue, 28 Aug 2018 16:18:13 +0000 (16:18 +0000)]
bgp_rfapi_basic_sanity: address PR comments (copyright, switch)

Signed-off-by: Lou Berger <lberger@labn.net>