Commit Graph

36550 Commits

Author SHA1 Message Date
Russ White
8287c0b316
Merge pull request #15605 from donaldsharp/evpn_local_table_warning
bgpd: Ensure evpn local table display shows route send status
2024-09-03 10:19:34 -04:00
Jafar Al-Gharaibeh
66144d34b2
Merge pull request #16725 from chiragshah6/bgp_dev1
bgpd: fix proper json format for unicast statistics for non exists vrf
2024-09-03 10:02:01 -04:00
Donald Sharp
1e2ccf1697
Merge pull request #16726 from LabNConsulting/native-munet-topotest
fix native munet topotest
2024-09-03 07:15:32 -04:00
Christian Hopps
a88f3c2d1c tests: improve example munet test
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-03 00:45:55 -04:00
Christian Hopps
08253740ef tests: fix munet native topotest runs
Enabe/fix using a munet.yaml config file for topology configuration.
Easier test writing.

This also uses the standard `frrinit.sh` to launch and teardown
FRR, so we actually test what most users use.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-03 00:45:48 -04:00
Sindhu Parvathi Gopinathan
40c0b891e3 bgpd: fix proper json format for unicast statistics for non exists vrf
Ticket: #4060069

show bgp vrf afi unicast statistics json output is not return in json
format for non exists vrf.

Fix:
Json output is formatted for non exists vrf cases.

Command supported:

```
show bgp vrf <VRFNAME> ipv4/ipv6 unicast statistics json
show bgp vrf <VRFNAME> l2vpn evpn statistics json
```

Before Fix:

```
leaf11#
leaf11# show bgp vrf test ipv4 unicast statistics json
View/Vrf test is unknown
leaf11#
leaf11#
leaf11# show bgp vrf test ipv6 unicast statistics json
View/Vrf test is unknown
leaf11#
leaf11#
leaf11# show bgp vrf default1 l2vpn evpn statistics json
View/Vrf default1 is unknown
leaf11#

```

After Fix:

```
leaf11#
leaf11# show bgp vrf test ipv4 unicast statistics json
{
  "warning":"View/Vrf is unknown"
}
leaf11#
leaf11#
leaf11# show bgp vrf test ipv6 unicast statistics json
{
  "warning":"View/Vrf is unknown"
}
leaf11#
leaf11# show bgp vrf default1 l2vpn evpn statistics json
{
  "warning":"View/Vrf is unknown"
}
leaf11#
```

Ticket: #4060069

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
2024-09-02 17:22:01 -07:00
Carmine Scarpitta
8be8864ffd isisd: Add missing exit statement
Add missing `exit` statement to `show running-config` output.

```
router isis ISIS_CORE
 is-type level-2-only
 net 49.0001.0000.0000.0004.00
 lsp-mtu 1300
 topology ipv6-unicast
 log-adjacency-changes
 segment-routing srv6
  locator ISIS_LOC
 exit   <<<<<<<<<<<<<<<<<<<<<<<<
exit
```

Fixes https://github.com/FRRouting/frr/issues/16694

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-03 00:03:32 +02:00
Donatas Abraitis
4788206b16 bgpd: Drop unused route-map types
When applying the route-map, we always set rmap_type to know who triggered
this action. PEER_RMAP_TYPE_IMPORT/EXPORT was used as a dead-code, and
PEER_RMAP_TYPE_NOSET not used at all.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-02 15:32:00 +03:00
Jafar Al-Gharaibeh
745cd3e6bf
Merge pull request #16711 from donaldsharp/memory_type_stuff
Memory type stuff
2024-09-01 19:44:29 -04:00
Donatas Abraitis
b120c4f1aa bgpd: Print errors as error not as information when parsing OPEN message
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-01 22:42:54 +03:00
Donatas Abraitis
19a85c68bf bgpd: Do not send route-refresh if it wasn't negotiated in capabilities
Fixes: 04dfcb14ff ("bgpd: Deprecate Prestandard Route Refresh capability (128)")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-01 22:35:22 +03:00
Donatas Abraitis
2931b78537
Merge pull request #16698 from louis-6wind/fix-nhrp-redundancy
nhrpd, test: fix nhrp_redundancy topotest
2024-09-01 20:30:02 +03:00
Donald Sharp
d97c535c1e *: Create termtable specific temp memory
When trying to track down a MTYPE_TMP memory leak
it's harder to search for it when you happen to
have some usage of ttable_dump.  Let's just give
it it's own memory type so that we can avoid
confusion in the future.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-01 13:07:46 -04:00
Donald Sharp
a556f6e38b isisd: in isis_mt.c use appropriate memory allocator
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-01 13:07:39 -04:00
Donald Sharp
3bf359b04e
Merge pull request #16701 from Jafaral/unified-config
tests: detect all daemons correctly when using frr.conf
2024-08-31 08:56:55 -04:00
Jafar Al-Gharaibeh
0c14da4121
Merge pull request #16688 from donaldsharp/no_connected_nexthops_at_first
No connected/local/kernel nexthops at first
2024-08-30 17:36:17 -04:00
Donald Sharp
4dd9d1176f bgpd: Ensure evpn local table display shows route send status
evpn has a concept of `local` tables where the evpn routes
are actually converted into underlying routes/neighbor
table entries( or vice versa ).  Then this local route
is propagated to the global evpn l2vpn table and sent
to the peers.  Certain show commands in evpn look
operate on the local table but make the output look
like the data has not been sent to the peer.  This
is confusing for the operator.  Modify the code
such that local tables get a `Local BGP table not advertised`
in the place where the code talks about whom has received
the data or not.

Example:
torm11# show bgp l2vpn evpn route vni 1000 mac 8a:a1:cc:73:a3:ac ip 45.0.0.5
BGP routing table entry for [2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5]
Paths: (2 available, best #2)
  Local BGP table not advertised
  Route [2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5] VNI 1000
  Imported from 192.168.100.18:2:[2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5], VNI 1000
  65101 65005
    192.168.100.18(leaf2) from leaf2(192.168.5.1) (192.168.100.14)
      Origin IGP, valid, external
      Extended Community: RT:65005:1000 ET:8
      Last update: Thu Mar 21 14:29:04 2024
  Route [2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5] VNI 1000
  Imported from 192.168.100.18:2:[2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5], VNI 1000
  65101 65005
    192.168.100.18(leaf1) from leaf1(192.168.1.1) (192.168.100.13)
      Origin IGP, valid, external, bestpath-from-AS 65101, best (Router ID)
      Extended Community: RT:65005:1000 ET:8
      Last update: Thu Mar 21 14:29:04 2024

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-30 16:23:20 -04:00
Jafar Al-Gharaibeh
02256fd23b tests: detect all daemons correctly when using frr.conf
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-08-30 14:35:31 -05:00
Louis Scalbert
64ad1dca42 tests: use private addresses in nhrp_redundancy
Use private addresses in nhrp_redundancy.

> cd tests/topotests/nhrp_redundancy
> git grep 176.16  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|176.16|172.16|g' -i
> git grep 5.5.5.  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|5.5.5.|10.5.5.|g' -i
> git grep 4.4.4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|4.4.4.|10.4.4.|g' -i

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
94ba96747b tests: check show ip nhrp shorcut in nhrp_redundancy
Check show ip nhrp shorcut in nhrp_redundancy

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
cdd9dee9b8 nhrpd: fix show nhrp shortcut json
Fix show nhrp shortcut json

Fixes: 87b9e98203 ("nhrpd: add json support to show nhrp vty commands")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
25e10819e3 tests: fix iptables command in nhrp_redundancy
Replace --nflog-range argument by --nflog-range due to:

> 2024-08-30 10:44:54,816 INFO: topo: input: iptables -A FORWARD -i nhs3-gre0 -o nhs3-gre0 -m hashlimit --hashlimit-upto 4/minute --hashlimit-burst 1 --hashlimit-mode srcip,dstip --hashlimit-srcmask 24 --hashlimit-dstmask 24 --hashlimit-name loglimit-0 -j NFLOG --nflog-group 1 --nflog-range 128
> 2024-08-30 10:44:54,819 INFO: topo: output: warn: --nflog-range has never worked and is no longer supported, please use --nflog-size insted

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
2933d7f236 tests: fix nhs1 down check in nhrp_redundancy
Fully check the NHRP convergence after setting nhs1 down. Otherwise the
ping may pass because the previous shortcut is still present.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
432b60d194 tests: fix nhc1 route check after nhs1 down
After setting down nhs1, the test is checking that nhc1 routing table
matches routes in nhc1/nhrp_route.json. It is incorrect because it
checks that the NHRP route to nhs1 is still present but it should have
disappeared.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
7a082e04f4 tests: simplify nhrp_redundancy convergence
Simplify nhrp_redundancy convergence code. Cosmetic change.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
76d84020a8 tests: rename router variables in nhrp_redundancy
Rename router variables in nhrp_redundancy to match the actual name.
Cosmetic change to help debugging.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
5f058cdef7 tests: rename routers in nhrp_redundancy
Rename routers in nhrp_redundancy to match the diagram. Cosmetic change.

> cd tests/topotests/nhrp_redundancy
> git grep r1  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r1|nhs1|g' -i
> git grep r2  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r2|nhs2|g' -i
> git grep r3  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r3|nhs3|g' -i
> git grep r4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r4|nhc1|g' -i
> git grep r5  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r5|nhc2|g' -i
> git grep r6  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r6|router|g' -i
> git grep r7  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r7|host|g' -i
>
> git grep R1  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R1|nhs1|g' -i
> git grep R2  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R2|nhs2|g' -i
> git grep R3  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R3|nhs3|g' -i
> git grep R4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R4|nhc1|g' -i
> git grep R5  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R5|nhc2|g' -i
> git grep R6  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R6|router|g' -i
> git grep R7  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R7|host|g' -i
>
> mv r1 nhs1
> mv r2 nhs2
> mv r3 nhs3
> mv r4 nhc1
> mv r5 nhc2
> mv r6 router
> mv r7 host

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:07 +02:00
Louis Scalbert
f04191f559 tests: apply black nhrp_redundancy
Apply black nhrp_redundancy

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:55:34 +02:00
Donald Sharp
8f47dc93cd doc: Update documentation to talk about nhe changes
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-30 08:23:48 -04:00
Donald Sharp
0c72a78930 zebra: Allow for initial deny of installation of nhe's
Currently the FRR code will receive both kernel and
connected routes that do not actually have an underlying
nexthop group at all.  Zebra turns around and creates
a `matching` nexthop hash entry and installs it.
For connected routes, this will create 2 singleton
nexthops in the dplane per interface (v4 and v6).
For kernel routes it would just create 1 singleton
nexthop that might be used or not.

This is bad because the dplane has a limited amount
of space available for nexthop entries and if you
happen to have a large number of interfaces then
all of a sudden you have 2x(# of interfaces) singleton
nexthops.

Let's modify the code to delay creation of these singleton
nexthops until they have been used by something else in the
system.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-30 08:23:48 -04:00
Louis Scalbert
43cc850def tests: fix prefix length in nhrp_redundancy
The expected prefix should be 5.5.5.0/24 otherwise the hosts behind NHRP
client 1 nhc1 (aka. r5) are not reachable via NHRP.

The issue was not seen in the FRR official CI because the tests were
skipped because iptables were missing in CI machines.

It solves the 16690 issue.

Fixes: https://github.com/FRRouting/frr/issues/16690
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 13:55:31 +02:00
Jafar Al-Gharaibeh
90787a57fd
Merge pull request #16689 from donaldsharp/blackhole_and_afi
Blackhole and afi
2024-08-29 22:13:03 -04:00
Jafar Al-Gharaibeh
6bfd311963
Merge pull request #16692 from donaldsharp/zebra_avoid_ng_null
zebra: Convince SA that the ng will always be valid
2024-08-29 22:11:03 -04:00
Donald Sharp
8ad5643abe zebra: Convince SA that the ng will always be valid
There is a code path that could theoretically get you
to a point where the ng->nexthop is a NULL value.
Let's just make sure the SA system believes that
cannot happen anymore.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-29 18:10:30 -04:00
Donald Sharp
c0f4972432
Merge pull request #16687 from Jafaral/isis-test-fix
tests: increase the timeout for packet padding check
2024-08-29 15:10:54 -04:00
Donald Sharp
f90989d52a zebra: Allow blackhole singleton nexthops to be v6
A blackhole nexthop, according to the linux kernel,
can be v4 or v6.  A v4 blackhole nexthop cannot be
used on a v6 route, but a v6 blackhole nexthop can
be used with a v4 route.  Convert all blackhole
singleton nexthops to v6 and just use that.
Possibly reducing the number of active nexthops by 1.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-29 15:06:31 -04:00
Donald Sharp
c10cdcd79a zebra: Display afi of the nexthop hash entry
Let's display the afi of the nexthop hash entry.  Right
now it is impossible to tell the difference between v4 or
v6 nexthops, especially since it is important for the kernel.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-29 14:49:36 -04:00
Jafar Al-Gharaibeh
5752fc86ee tests: increase the timeout for packet padding check
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-08-29 11:40:50 -05:00
Jafar Al-Gharaibeh
77e1a26faa
Merge pull request #16664 from mjstapp/igor_debug_simplify
*: simplify frrlib debug
2024-08-29 11:51:53 -04:00
Jafar Al-Gharaibeh
f1e4ef461d
Merge pull request #16685 from opensourcerouting/fix/document_reverts
doc: Document the git revert flow
2024-08-29 11:39:27 -04:00
Mark Stapp
ac2d9bae5c
Merge pull request #16680 from donaldsharp/route_scale_minor_changes
tests: Fix route-scale at higher ecmp
2024-08-29 08:17:34 -04:00
Donatas Abraitis
28b8c85d68 doc: Document the git revert flow
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-08-29 09:04:28 +03:00
Jafar Al-Gharaibeh
12a3d5a748
Merge pull request #16683 from donaldsharp/test_ospf_netns_vrf_failure
tests: ospf_netns_vrf should give more time for coming up
2024-08-29 01:12:40 -04:00
Jafar Al-Gharaibeh
648566c6fb
Merge pull request #16682 from donaldsharp/bgp_suppress_test
tests: Ensure bgp suppress fib has a chance to transmit data to peer
2024-08-29 01:12:17 -04:00
Jafar Al-Gharaibeh
ffaa365cc4
Merge pull request #16681 from donaldsharp/zebra_re_after_rn
zebra: Move prefix lookup to outside re loop
2024-08-28 23:43:40 -04:00
Jafar Al-Gharaibeh
216ed8c796
Merge pull request #16673 from donaldsharp/default_original_sin
tests: Fix bgp_default_originate_topo1_3
2024-08-28 15:30:12 -04:00
Mark Stapp
79e0c6a2e0
Merge pull request #16672 from raja-rajasekar/vty_out_mem_spike_srujana
lib: Memory spike reduction for sh cmds at scale
2024-08-28 15:29:23 -04:00
Donald Sharp
ce74a6b0a8 tests: Fix route-scale at higher ecmp
Recent commits moved the default retries to 60, but
the higher ecmp counts were over-riding to 40.  Let's
make it 80.

Noticed this when I went looking at failures on 386 platforms
in our ci.  Route scale is timing out when deleting routes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 15:18:24 -04:00
Donald Sharp
d58c44cebe tests: ospf_netns_vrf should give more time for coming up
Test fails:

            test_func = partial(
                topotest.router_json_cmp,
                router,
                "show ip ospf vrf {0}-ospf-cust1 json".format(rname),
                expected,
            )
            _, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
            assertmsg = '"{}" JSON output mismatches'.format(rname)
>           assert diff is None, assertmsg
E           AssertionError: "r1" JSON output mismatches
E           assert Generated JSON diff error report:
E
E             > $->r1-ospf-cust1->areas->0.0.0.0->nbrFullAdjacentCounter: output has element with value '1' but in expected it has value '2'

/home/sharpd/frr2/tests/topotests/ospf_netns_vrf/test_ospf_netns_vrf.py:239: AssertionError

Support bundle has this data:
r1# show ip ospf vrf all neighbor
% 2024/08/28 14:55:54.763

VRF Name: r1-ospf-cust1

Neighbor ID     Pri State           Up Time         Dead Time Address         Interface                        RXmtL RqstL DBsmL
10.0.255.3        1 Full/DR         10.547s           39.456s 10.0.3.1        r1-eth1:10.0.3.2                     0     0     0
10.0.255.2        1 Full/Backup     0.543s            38.378s 10.0.3.3        r1-eth1:10.0.3.2                     1     0     0

So immediately after the test fails this test, the neighbor comes up.
Let's give the test a bit more time for failure to not happen

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 15:10:04 -04:00
Donald Sharp
3797454a2a tests: Ensure bgp suppress fib has a chance to transmit data to peer
Giving only 5 seconds to pass bgp data to peers on a heavily
loaded system is a recipe for not having fun.  Add more time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 15:05:40 -04:00