If we mount the tests into the container from the host, we also
mount any `*.pyc` files with them, which will lead to issues
as the mount is done read-only to avoid any changes to the host.
Since the tests are now integrated and we already create a writeable
copy of the FRR tree, just use the tests from the FRR tree to avoid
this issue.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Chirag Shah [Mon, 3 Dec 2018 03:08:22 +0000 (19:08 -0800)]
zebra: dup addr detect clear cmd non-zero return
Clear dup address vni needs to return non-zero value
in case of command is not successful.
Ticket:CM-23122
Testing Done:
run clear command and check upon failure return code is non-zero.
root@TORS1:~# vtysh -c "clear evpn dup-addr vni 1000 ip 45.0.1.26"
% Requested IP's associated MAC 00:01:02:03:04:05 is still in duplicate
% state
root@TORS1:~# echo $?
1
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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