Quentin Young [Fri, 22 May 2020 20:12:38 +0000 (16:12 -0400)]
bgpd: avoid spamming bgp_accept() on bad vrf sock
bgp_accept() gets called over and over again when a VRF device is
deleted out from under a bgp listener socket that is bound to it.
Prevent this by noting the error and cancelling ourselves, allowing the
vrf status code to clean up the mess when it receives word about the
change from Zebra.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Sun, 31 May 2020 08:10:33 +0000 (04:10 -0400)]
alpine: update packages
Alpine builds have been failing for some time as a consequence of only
installing python 2 development packages when we have build scripts that
require python 3.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Sat, 30 May 2020 19:44:54 +0000 (15:44 -0400)]
bgpd: Improve connection rejection messages
Try to give a bit more useful data about where we
think the connection is trying to come in from.
Hopefully this will let us debug connection issues
a bit faster in cases where there are config issues.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Appu Joseph [Fri, 29 May 2020 14:23:36 +0000 (10:23 -0400)]
bgpd: Fix "malformed communities" for accept-own-nexthop
"set community accept-own-nexthop" returns "malformed communities"
error. This is because the token matching hits an earlier "accept-own"
and leaves "-nexthop" as a separate token to be processed.
Reorder the switch cases so that both are processed correctly.
we were not correctly checking the MPLS-TE status of the area when
adding an IP address to a circuit, and this was preventing the local
address TLV to be populated after an interfaced flap.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Bart Vrancken [Tue, 26 May 2020 07:35:46 +0000 (09:35 +0200)]
doc: Update snmp.rst
Updated documentation for routers with a large route table, which breaks
SNMP/AgentX and in some conditions even crashes FRR. The documentation
proposal amends the SNMP configuration to exclude certain OID's that
are not needed in normal cases.
Format-fixed-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: Bart Vrancken <bart@abuse.io>
Olivier Dugeon [Fri, 15 May 2020 17:18:36 +0000 (19:18 +0200)]
ospfd: Solve crash after removing and adding conf.
Issue number #6291 describes how OSPFd crashes after being deleted and then
added again with configuration when segment routing is used.
The problem occurs in ospf_ri.c because the OspfRI structures retains
the reference to the old area pointer which is mofified when ospfd is
reactivated by configuration. When segment routing is activated, the LSA Router
Information is sent with reference to the old area pointer, instead the new one,
which causes the crash. The same problem is also present in ospf_ext.c with
OspfEXT structure and Extended Link/Prefix structure.
This commit introduces Extended Link/Prefix and Router Information LSAs flusing
when OSPFd is stopped when configuration is removed and adds the correct
initialization to the area pointer in OspfRI and Extended Link/Prefix structure
when OSPFd is re-enabled with the configuration. Area pointer has been removed
from the OspfEXT structure as it is never used with this commit.
vivek [Mon, 25 May 2020 21:17:12 +0000 (14:17 -0700)]
bgpd: During NHT change evaluation, skip inappropriate paths
When there is a NHT change and the paths dependent on that NHT are being
evaluated, skip those that are marked for removal or as history.
When a route gets withdrawn, its valid flag is cleared and it is flagged
for removal; in the case of an EVPN route, it is also unimported from
VRFs (L2 and/or L3). bgp_process is then scheduled. Under rare timing
conditions, an NHT update for the route's next hop may arrive right after,
and if routes flagged for removal are not skipped, they may not only be
incorrectly marked as valid but also re-imported in the case of EVPN,
which will be a serious error.
vivek [Mon, 25 May 2020 20:48:37 +0000 (13:48 -0700)]
bgpd: Enhance BGP NHT show commands
Display next hop resolution information, whether the "detail" option is
specified or not as it is quite fundamental and only minimally increases
the output.
Introduce option to look at a specific NHT entry, which will also show
the paths associated with that entry.
Rafael Zalamena [Thu, 21 May 2020 21:47:00 +0000 (18:47 -0300)]
ospfd: change retransmit-interval minimum value
The command `area ... virtual-link ... retransmit-interval` supports
1-65535 range and the documentation already said
`ip ospf retransmit-interval` supports that, lets make the DEFUN to
accept that value.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
GalaxyGorilla [Fri, 22 May 2020 21:18:46 +0000 (21:18 +0000)]
tests: Fix JSON diff for nested lists
The involved piece of code is supposed to find a 'closest' match for two
JSON structures using another JSON diff. However, it can happen that
during that new diff the JSON structures are altered (elements from a
list are deleted when 'found'). This is in general ok when the deleted
element is part of the JSON structure which 'matches', but when it later
turns out that some other element of the structure doesn't fit, then the
whole structure should be recovered. This is now realized by using a
deepcopy for the besaid new JSON diff such that the original is only
altered (e.g. deleted) when the diff is clean.
Donald Sharp [Thu, 14 May 2020 13:58:36 +0000 (09:58 -0400)]
zebra: Allow zebra to gracefully handle rtadv when not configured
Currently zebra when you compile without router advertisements
will just say something like `cannot handle message 42`. Which
is not terribly useful to an end user.
Add some smarts to the zapi message handling to just do nothing
and output a debug if someone has it turned on.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Allow user to pre-configure peers with a profile. If a peer is using a
profile any configuration made to the peer will take precedence over
the profile configuration.
In order to track the peer configuration we have now an extra copy of
the peer configuration in `peer_profile` inside `struct bfd_session`.
This information will help the profile functions to detect user
configurations and avoid overriding what the user configured. This is
especially important for peers created via other protocols where the
default `shutdown` state is disabled (peers created manually are
`shutdown` by default).
Profiles can be used before they exist: if no profile exists then it
will use the default configuration.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Kuldeep Kashyap [Wed, 13 May 2020 18:38:41 +0000 (18:38 +0000)]
tests: Add bgp-multi-vrf-topo2 testsuite
1. Adding 4 testcases to this testsuite to verify BGP multi-vrf functionality
2. Adding supporting JSON file to create topology and base config
3. Execution time is ~3 mins
Kuldeep Kashyap [Wed, 13 May 2020 18:33:36 +0000 (18:33 +0000)]
tests: Add bgp-multi-vrf-topo1 testsuite
1. Adding 22 testcases to this testsuite to verify BGP multi-vrf functionality
2. Adding supporting JSON file to create topology and base config
3. Execution time is ~7 mins.