Donald Sharp [Wed, 4 Aug 2021 12:05:12 +0000 (08:05 -0400)]
tests: Remove sleep(200) from bgp-evpn-overlay-index-gateway
Remove a 200 second sleep from bgp-evpn-overlay-index-gateway.
There does not seem to be any evidence that this is needed
and I cannot make the test fail without it.
Fixes: #9035 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
vivek [Tue, 3 Aug 2021 05:06:28 +0000 (22:06 -0700)]
bgpd: Handle quick flaps of an EVPN prefix properly
When an EVPN prefix flaps too quickly such that the new advertisement
is received prior to the full processing of the prior withdraw, we may
get into a state where the route doesn't get imported properly into
MAC or IP VRFs. Ensure that we do the route import in such cases.
Igor Ryzhov [Thu, 29 Jul 2021 17:21:00 +0000 (20:21 +0300)]
zebra: remove checks for src address existence when using "set src"
1. This check is absolutely useless. Nothing keeps user from deleting
the address right after this check.
2. This check prevents zebra from correctly reading the user config with
"set src" because of a race with interface startup (see #4249).
3. NO OPERATIONAL DATA USAGE ON VALIDATION STAGE.
bgpd: Set extended msg size only if we advertised and received capability
If we don't advertise any capabilities (dont-capability-negotiate), we
shouldn't set msg size to 65k only if received this capability from another
peer.
Before:
```
~/frr# vtysh -c 'show ip bgp update-group' | grep 'Max packet size'
Max packet size: 65535
```
After:
```
~/frr# vtysh -c 'show ip bgp update-group' | grep 'Max packet size'
Max packet size: 4096
```
Philippe Guibert [Fri, 26 Mar 2021 09:48:38 +0000 (10:48 +0100)]
bgpd: flowspec redirect vrf uses vrf table instead of allocated table id
Until now, when bgp flowspec entry action was to redirect to a vrf, a
default route was installed in a specific table. that route was a vrf
route leak one. The process can be simplified, as vrf-lite already
has a table identifier. Actually, because policy routing is used to
redirect traffic to a defined table (with ip rule command), use
the table identifier of the VRF.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd: Use strict AS4 capability when processing parsing/generating pkts
PeerA sets `dont-capability-negotiate` for PeerB. It does not send any
capabilities to PeerB. This leads to situation when PeerA received AS4 cap,
while it doesn't send AS4 to PeerB and tries parsing AS_PATH using 32bits.
Igor Ryzhov [Fri, 30 Jul 2021 11:11:33 +0000 (14:11 +0300)]
ospfd: fix "no ip ospf passive" command
This command is currently always treated as an "unset" command, assuming
that active is the default type of the interface. In reality, the default
type of the interface can be changed using "passive-interface default"
command. Both "no" and regular commands can be "set" commands, depending
on the default value. They are treated as an "unset" when there's already
a config of the opposite type.
All this logic is in ospf_passive_interface_update.
Igor Ryzhov [Thu, 29 Jul 2021 12:31:34 +0000 (15:31 +0300)]
bgpd: use double-linked list instead of single-linked list in dampening
This code always used double-linked list before this rework in 8.0 that
introduced all these crashes and memory leaks. Using single-linked list
is actually a performance regression, because there are frequent removes
here and single-linked list obviously handles removes much worse.
Igor Ryzhov [Wed, 28 Jul 2021 22:17:50 +0000 (01:17 +0300)]
bgpd: fix incorrect usage of slist in dampening
Current code is a complete misuse of SLIST structure. Instead of just
adding a SLIST_ENTRY to struct bgp_damp_info, it allocates a separate
structure to be a node in the list.
Igor Ryzhov [Thu, 29 Jul 2021 18:34:56 +0000 (21:34 +0300)]
*: cleanup interface node installation
The only difference in daemons' interface node definition is the config
write function. No need to define the node in every daemon, just pass
the callback as an argument to a library function and define the node
there.
Igor Ryzhov [Thu, 29 Jul 2021 11:42:16 +0000 (14:42 +0300)]
bgpd: fix missing list add in dampening
One more crash in dampening code...
When bgp_damp_withdraw is called, if there's already a BDI structure,
bgp_damp_info_claim is called to re-assign the bdi->config in case it
was changed. The problem is that bgp_damp_info_claim actually removes
the BDI from the reuse list of the old config and never adds it to the
reuse list of the new config. We must do this to prevent the crash
because all the code assumes that BDI is always in some list.
Donald Sharp [Wed, 28 Jul 2021 20:25:54 +0000 (16:25 -0400)]
tests: Set addresses before we use snmpd
The test_simple_snmp.py test starts bgp, zebra and snmpd at the
same time. Then zebra configuration is read in and interface
addresses are applied. If snmp start slower than zebra
the snmp process can properly get it's ip address to bind to
if it is faster than zebra, it will fail. Ensure that the
test has addresses before we start daemons.
batmancn [Mon, 30 Nov 2020 12:04:44 +0000 (20:04 +0800)]
zebra: bugfix of error quit of zebra, due to no nexthop ACTIVE
There exists some rare situations where fpm will attempt
to send a route update with no valid nexthops. In that
case an assert would be hit. This is not good for
trying to keep your routing daemons up and running
when we can safely just recover the situation.
Fixes #7588 Signed-off-by: batmancn <batmanustc@gmail.com>
<fixed commit message, and used zlog_err> Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Introduced this crash. Removing the part of the commit
that was causing the crash in the test. This is mainly
to get `make check` working again for those people using
zeromq in their builds.
Fixes: #9176 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Tue, 27 Jul 2021 13:38:14 +0000 (09:38 -0400)]
tests: Increase timeout for loaded systems
When running this test on a locally loaded system I am seeing the
static route as `queued` still after 1 second. Let's just blanket
increase the timeout to something longer to give a very loaded system
more time to install the route.