ospf6d: External LSAs reoriginates on every redistribute CLI
Problem Statement:
==================
Everytime redistribute CLI is executed, external LSAs are
re-originated. When there is no change in the CLI parameters
the LSAs should not get re-originated.
Fix:
=================
Check if the CLI params are same, do not re-originate the LSA.
Christian Hopps [Sat, 21 Aug 2021 07:04:42 +0000 (03:04 -0400)]
tests: uniq vrf names when using netns
- In order to run tests in parallel the netns-based vrfs need to
have unique names primarily bc they are all tracked/looked-up in
`/run/netns` which is not network namespace nesting friendly
- use ip(8) exclusively rather than a mix of `ip` and `ifconfig`
and `vconfig`, reducing required pkg count by a couple.
Christian Hopps [Fri, 20 Aug 2021 12:24:23 +0000 (08:24 -0400)]
tests: fix broken bgp GR test (non-deterministic)
- bugs in the support library function `verify_gr_address_family`
allowed this test to pass depending on ordering of python dictinoary
keys. Fix the bugs, fix the test.
Christian Hopps [Tue, 3 Aug 2021 22:22:09 +0000 (22:22 +0000)]
pimd: change ranges to 1..max, type align with IETF YANG.
While defaults are good picks for "reasonable" guesses, min and max
range values really aren't. Operators and experimenters often like to
configure "unreasonable" values to stress test, tests boundary
conditions and explore innovations.
With that in mind, change all ranges to 1..max (of type).
While we're here add optional ignored values in the "no" CLI forms.
Philippe Guibert [Tue, 17 Aug 2021 14:43:37 +0000 (16:43 +0200)]
bgpd: imported evpn rt5 routes copy igpmetric
when doing BGP over an IGP platform, the expectation is that
the path calculation for a given prefix takes into account the
igpmetric given by IGP.
This is true with prefixes obtained in a given BGP instance where
peering occurs. For instance, ipv4 unicast entries or l2vpn evpn
entries work this way. The igpmetric is obtained through nexthop
tracking, like below:
however, for imported EVPN RT5 entries, the igpmetric was not
copied from the parent path info. Fix it. In this way, the
imported route entries use the igpmetric of the parent pi.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
ospfd: Summarised External LSA is not flushed in one scenario
Fix CI Failure test_ospf_type5_summary_tc45_p0
Problem Statement:
==================
Summarised LSA is not flushed in OSPFv2 in below scenario:
1. Configure summary-address in ospfv2
2. redistribute static and connected.
3. Check the LSAs are received on neighbor.
4. Now remove all OSPFv2 configs, so neighbor will still have the summarised LSA.
5. Configure router ospf with redistribute static and connected.
6. Check the DB, summarised LSA is present although the configuration is not present.
7. Now configure the summary-address and remove the configuration after sometime.
8. The summarised LSA will be still present.
RCA:
==================
When self originated LSA is received from the neighbor and that
LSA is summarised one, the LSA is refreshed but a flag is not set
due to which it was not able to remove it later.
Fix:
==================
Set the originated flag when refreshing summarised LSA.
Donald Sharp [Mon, 16 Aug 2021 14:59:20 +0000 (10:59 -0400)]
bgpd: Add code to output expire and retry interval for rpki
The code to output during a `show run` is missing for both
the expire_interval and the retry_interval in rpki.
Let's add it in so the end user can see what they
are set to if not set to the default.
Donald Sharp [Sun, 15 Aug 2021 14:22:50 +0000 (10:22 -0400)]
bgpd: Continue processing rpki nodes
We are prematurely stopping processing of bgp_path_info's
when bgp_update returns a -1. The only place that this
happens when we cross some prefix limit. But we still
need to continiue processing other nodes in the list too.
Donald Sharp [Sun, 15 Aug 2021 14:15:38 +0000 (10:15 -0400)]
bgpd: Limit processing to what is needed in rpki validation
The processing was looping over all bgp instances then
over all peers then over all safi's to find a match
for a prefix received in order to validate it.
Suppose you have 100 peers each sending you the same
prefix. This code will cause it to look at each node 100
times since we look at for each peer. This is especially
egregarious because we never ever do anything with the peer
when we are looping over them.
Remove the peer loop, significantly reduce processing.
Directory name for a new topotest must not contain hyphen (-) characters.
To separate words, use underscores (_). For example, tests/topotests/bgp_new_example.
Don Slice [Wed, 11 Aug 2021 12:45:23 +0000 (08:45 -0400)]
bgpd: Stop prepending peer-as if self-originated and lastas configured
Problem seen where if "set aspath-prepend last-as" configured and
applied outbound, we prepend the peer's asn which causes our self-
originated routes to be denied.
Igor Ryzhov [Thu, 12 Aug 2021 16:07:53 +0000 (19:07 +0300)]
bgpd: fix segfault when re-adding "match evpn default-route" rule
When using "match evpn default-route" rule, match_arg is NULL and strcmp
is not happy with that. There's already a special function named rulecmp
that handles such situations.
Mark Stapp [Wed, 11 Aug 2021 17:58:13 +0000 (13:58 -0400)]
zebra: mpls validation and static lsp fixes
Handle TYPE_IFINDEX nexthops more consistently in a few places;
be more specific about a few integer return values that were
being treated as booleans.
Igor Ryzhov [Thu, 12 Aug 2021 12:49:54 +0000 (15:49 +0300)]
ospfd: fix initialization when vrf doesn't exist yet
There are a couple of things that are not initialized if the OSPF router
is created in a non-existent VRF:
- ospf_lsa_maxage_walker
- ospf_lsa_refresh_walker
- ospf_opaque_type11_lsa_init
Rearrange some code to always initialize them and make it easier to find
similar problems in the future.
Igor Ryzhov [Wed, 11 Aug 2021 14:46:31 +0000 (17:46 +0300)]
vtysh, pathd: fix pcep node-entering commands
pce-config, pce and pcc node-entering commands in vtysh include no-form,
which is incorrect. Currently, when user passes a no-form command like
`no pcc`, vtysh enters the node while pathd deletes the node and this
leads to a desynchronization.
Regular and no-form commands should be defined separately to fix this.
Martin Winter [Mon, 9 Aug 2021 23:52:05 +0000 (01:52 +0200)]
redhat: Install frr.conf only if no per daemon config exists
Install frr.conf template as a template file, but only install it
as a config file if no per daemon file exists. This will use the
integrated config with new setups, but keeps the per-daemon config
for existing users
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Igor Ryzhov [Tue, 10 Aug 2021 19:10:56 +0000 (22:10 +0300)]
yang: mark a couple of prefix-list/access-list leafs as mandatory
The code assumes that these leafs always exist when their complementary
leafs exist. For example, when processing `ipv4-exact-match`, the code
always expects to have access to `ipv4-prefix`. If those leafs are not
provided, code crashes. It doesn't happen when using the CLI because it
always does the right thing, but it can happen when using other
frontends.
Also fix incorrect description for prefix-list sequence leaf.