]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
20 months agoMerge pull request #12643 from opensourcerouting/fix/cosmetic_log_changes
Russ White [Tue, 17 Jan 2023 14:40:28 +0000 (09:40 -0500)]
Merge pull request #12643 from opensourcerouting/fix/cosmetic_log_changes

bgpd: Drop redundant `vrf` keyword in BGP debug log changes

20 months agoMerge pull request #12641 from samanvithab/bgpd_crash
Russ White [Tue, 17 Jan 2023 14:40:05 +0000 (09:40 -0500)]
Merge pull request #12641 from samanvithab/bgpd_crash

bgpd: Fix crash during shutdown due to race condition

20 months agoMerge pull request #12636 from opensourcerouting/fix/bgp_accept-own_connected_routes
Russ White [Tue, 17 Jan 2023 14:31:37 +0000 (09:31 -0500)]
Merge pull request #12636 from opensourcerouting/fix/bgp_accept-own_connected_routes

bgpd: Allow importing local routes with accept-own mechanism

20 months agoMerge pull request #12603 from opensourcerouting/fix/deprecate_bgp_stuff_some
Russ White [Tue, 17 Jan 2023 14:12:39 +0000 (09:12 -0500)]
Merge pull request #12603 from opensourcerouting/fix/deprecate_bgp_stuff_some

bgpd: Deprecate some stuff

20 months agoMerge pull request #12601 from opensourcerouting/feature/bgp_neighbor_path-attribute_...
Russ White [Tue, 17 Jan 2023 14:12:17 +0000 (09:12 -0500)]
Merge pull request #12601 from opensourcerouting/feature/bgp_neighbor_path-attribute_discard

bgpd: Add `neighbor path-attribute discard` command

20 months agoMerge pull request #12597 from opensourcerouting/fix/bgp_sender_as_path_prevention
Russ White [Tue, 17 Jan 2023 14:11:53 +0000 (09:11 -0500)]
Merge pull request #12597 from opensourcerouting/fix/bgp_sender_as_path_prevention

bgpd: Do not send routes back received from a peer

20 months agoMerge pull request #12424 from opensourcerouting/static-route-bfd
Russ White [Tue, 17 Jan 2023 14:09:24 +0000 (09:09 -0500)]
Merge pull request #12424 from opensourcerouting/static-route-bfd

staticd: BFD static route monitoring

20 months agobgpd: Drop redundant `vrf` keyword in BGP debug log changes
Donatas Abraitis [Mon, 16 Jan 2023 19:36:08 +0000 (21:36 +0200)]
bgpd: Drop redundant `vrf` keyword in BGP debug log changes

Before:

```
nexthop is not valid (in vrf VRF vrf100)
updating RD 65001:100, 10.100.1.1/32 to vrf VRF vrf200
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agoMerge pull request #12621 from donaldsharp/route_scale_failure_micronet
Donatas Abraitis [Mon, 16 Jan 2023 12:32:26 +0000 (14:32 +0200)]
Merge pull request #12621 from donaldsharp/route_scale_failure_micronet

tests: route_scale tests are failing on micronet

20 months agobgpd: Fix crash during shutdown due to race condition
Samanvitha B Bhargav [Mon, 16 Jan 2023 04:40:54 +0000 (20:40 -0800)]
bgpd: Fix crash during shutdown due to race condition

[New LWP 2524]
[New LWP 2539]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/opt/avi/bin/bgpd -f /run/frr/avi_ns3_bgpd.config -i /opt/avi/etc/avi_ns3_bgpd.'.
Program terminated with signal SIGABRT, Aborted.
[Current thread is 1 (Thread 0x7f92ac8f1740 (LWP 2524))]
0  0x00007f92acb3800b in raise () from /lib/x86_64-linux-gnu/libc.so.6
[Current thread is 1 (Thread 0x7f92ac8f1740 (LWP 2524))]
0  0x00007f92acb3800b in raise () from /lib/x86_64-linux-gnu/libc.so.6
1  0x00007f92acb17859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
2  0x00007f92acb17729 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
3  0x00007f92acb28fd6 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
4  0x00007f92accf2164 in pthread_mutex_lock () from /lib/x86_64-linux-gnu/libpthread.so.0
5  0x000055b46be1ef63 in bgp_keepalives_wake () at bgpd/bgp_keepalives.c:311
6  0x000055b46be1f111 in bgp_keepalives_stop (fpt=0x55b46cfacf20, result=<optimized out>) at bgpd/bgp_keepalives.c:323
7  0x00007f92acea9521 in frr_pthread_stop (fpt=0x55b46cfacf20, result=result@entry=0x0) at lib/frr_pthread.c:176
8  0x00007f92acea9586 in frr_pthread_stop_all () at lib/frr_pthread.c:188
9  0x000055b46bdde54a in bgp_pthreads_finish () at bgpd/bgpd.c:8150
10 0x000055b46bd696ca in bgp_exit (status=0) at bgpd/bgp_main.c:210
11 sigint () at bgpd/bgp_main.c:154
12 0x00007f92acecc1e9 in quagga_sigevent_process () at lib/sigevent.c:105
13 0x00007f92aced689a in thread_fetch (m=m@entry=0x55b46cf23540, fetch=fetch@entry=0x7fff95379238) at lib/thread.c:1487
14 0x00007f92aceb2681 in frr_run (master=0x55b46cf23540) at lib/libfrr.c:1010
15 0x000055b46bd676f4 in main (argc=11, argv=0x7fff953795a8) at bgpd/bgp_main.c:482

Root cause:
This is due to race condition between main thread & keepalive thread during clean-up.

This happens when the keepalive thread is processing a wake signal owning the mutex, when meanwhile the main thread tries to stop the keepalives thread.

In main thread, the keepalive thread’s running bit (fpt->running) is set to false, without taking the mutex & then it blocks on mutex.
Meanwhile, keepalive thread which owns the mutex sees that the running bit is false & executes bgp_keepalives_finish() which also frees up mutex.
Main thread that is waiting on mutex with pthread_mutex_lock() will cause core while trying to access mutex.

Fix:
Take the lock in main thread while setting the fpt->running to false.

Signed-off-by: Samanvitha B Bhargav <bsamanvitha@vmware.com>
20 months agoMerge pull request #12642 from anlancs/fix/bgpd-debug-name
Donatas Abraitis [Mon, 16 Jan 2023 12:16:43 +0000 (14:16 +0200)]
Merge pull request #12642 from anlancs/fix/bgpd-debug-name

bgpd: fix wrong vrf name for debug

20 months agobgpd: fix wrong vrf name for debug
anlan_cs [Sun, 15 Jan 2023 12:16:49 +0000 (20:16 +0800)]
bgpd: fix wrong vrf name for debug

For vrf name in debug, use `bgp->name_pretty` instead of `bgp->name`.

Before:
```
2023/01/15 05:04:19 BGP: [P4GAZ-JHRM3] evpn vrf VRF default nh init
2023/01/15 05:04:19 BGP: [ZZKY3-FX5JH] bgp_get: Registering BGP instance (null) to zebra <-
2023/01/15 05:04:19 BGP: [TNK7N-FJF7K] Registering VRF 0
```

After:
```
2023/01/15 21:38:16 BGP: [P4GAZ-JHRM3] evpn vrf VRF default nh init
2023/01/15 21:38:16 BGP: [ZZKY3-FX5JH] bgp_get: Registering BGP instance VRF default to zebra <-
2023/01/15 21:38:16 BGP: [TNK7N-FJF7K] Registering VRF 0
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
20 months agoMerge pull request #12611 from vfreex/reload-missing-daemons
Donald Sharp [Sun, 15 Jan 2023 22:45:21 +0000 (17:45 -0500)]
Merge pull request #12611 from vfreex/reload-missing-daemons

tools: Add missing daemons

20 months agobgpd: Set nh ifindex to VRF's interface, not the real
Donatas Abraitis [Sun, 15 Jan 2023 10:43:37 +0000 (12:43 +0200)]
bgpd: Set nh ifindex to VRF's interface, not the real

The kernel will lookup the real interface later.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agolib: add a function to get the VRF or loopback interface
Louis Scalbert [Fri, 22 Apr 2022 16:08:08 +0000 (18:08 +0200)]
lib: add a function to get the VRF or loopback interface

Add a function to find the VRF or the loopback interface: the loopback
interface for the default VRF and the VRF master interface otherwise.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
20 months agotests: Check if connected routes are leaked between VRFs using accept-own
Donatas Abraitis [Fri, 13 Jan 2023 07:19:27 +0000 (09:19 +0200)]
tests: Check if connected routes are leaked between VRFs using accept-own

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Allow importing local routes with accept-own mechanism
Donatas Abraitis [Fri, 13 Jan 2023 10:04:01 +0000 (12:04 +0200)]
bgpd: Allow importing local routes with accept-own mechanism

Before this patch we allowed importing routes between VRFs in the same node,
only for external routes, but not for local (e.g.: redistribute).

Relax here a bit, and allow importing local routes between VRFs when the RT
list is modified using route reflectors.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agotests: route_scale tests are failing on micronet
Donald Sharp [Tue, 10 Jan 2023 15:29:33 +0000 (10:29 -0500)]
tests: route_scale tests are failing on micronet

I'm seeing test failures after in micronet runs in CI
after 7 seconds * 30 attempts at seeing if it succeeds.
Let's see if another 60 seconds of attempts allows
this to work properly.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotools: Add missing daemons
Yuxiang Zhu [Mon, 9 Jan 2023 19:18:05 +0000 (03:18 +0800)]
tools: Add missing daemons

Got `ERROR: Daemon babeld is not a valid option for 'show running-config'` when using `frr-reload.py --reload --daemon babeld`.

Adds `babeld` and `nhrpd` as valid daemons.

Signed-off-by: Yuxiang Zhu <vfreex@gmail.com>
20 months agoMerge pull request #12639 from donaldsharp/breakup_bgp_vrf_dynamic_route_leak_topo4
Donatas Abraitis [Sat, 14 Jan 2023 20:26:43 +0000 (22:26 +0200)]
Merge pull request #12639 from donaldsharp/breakup_bgp_vrf_dynamic_route_leak_topo4

tests: Breakup bgp_vrf_dynamic_route_leak_topo4

20 months agobgpd: Deprecate some unused BGP stuff
Donatas Abraitis [Fri, 6 Jan 2023 13:06:38 +0000 (15:06 +0200)]
bgpd: Deprecate some unused BGP stuff

* BGP optional parameter type (Authentication)
* BGP UPDATE message error subcode for AS loop

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Do not send routes back received from a peer
Donatas Abraitis [Thu, 5 Jan 2023 08:25:38 +0000 (10:25 +0200)]
bgpd: Do not send routes back received from a peer

Before this patch, we needed to explicitly define a neighbor to be SOLO
(= separate update-group). Let's ease this functionality for an operator to
avoid confusions.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agotests: Check if routes are not sent back from the sender
Donatas Abraitis [Thu, 5 Jan 2023 08:24:47 +0000 (10:24 +0200)]
tests: Check if routes are not sent back from the sender

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Add `neighbor path-attribute discard` command
Donatas Abraitis [Fri, 6 Jan 2023 12:33:03 +0000 (14:33 +0200)]
bgpd: Add `neighbor path-attribute discard` command

The idea is to drop unwanted attributes from the BGP UPDATE messages and
continue by just ignoring them. This improves the security, flexiblity, etc.

This is the command that Cisco has also.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agodoc: Add `neighbor path-attribute discard` command
Donatas Abraitis [Fri, 6 Jan 2023 12:47:24 +0000 (14:47 +0200)]
doc: Add `neighbor path-attribute discard` command

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agotests: Check if we can discard unwanted attributes from the paths
Donatas Abraitis [Fri, 6 Jan 2023 12:32:23 +0000 (14:32 +0200)]
tests: Check if we can discard unwanted attributes from the paths

Using `neighbor path-attribute discard ...` command.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agoMerge pull request #12635 from LabNConsulting/ziemba/topotests-lutil-wait-strict
Donald Sharp [Fri, 13 Jan 2023 21:22:00 +0000 (16:22 -0500)]
Merge pull request #12635 from LabNConsulting/ziemba/topotests-lutil-wait-strict

topotests/lib/lutil.py: luSetWaitType("strict"|"nostrict")

20 months agotests: Breakup bgp_vrf_dynamic_route_leak_topo4
Donald Sharp [Fri, 13 Jan 2023 20:30:33 +0000 (15:30 -0500)]
tests: Breakup bgp_vrf_dynamic_route_leak_topo4

Single run of this test suite on my machine was 8 minutes.
Breaking this up into 3 test suites halves the run time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotopotests/lib/lutil.py: luSetWaitType("strict"|"nostrict")
G. Paul Ziemba [Fri, 13 Jan 2023 06:27:57 +0000 (22:27 -0800)]
topotests/lib/lutil.py: luSetWaitType("strict"|"nostrict")

    This change alters the behavior of existing test code. The
    default mode (before any call to luSetWaitType()) is now
    "strict".

    The historical behavior of luCommand(op="wait) is to ignore
    failures to match the specified regexp in the specified time.
    In those cases, no result was logged and no error was signaled.

    This change introduces a new "strict" mode for luCommand(op="wait):
    in "strict" wait mode, each invocation of luCommand(op="wait)
    generates an explicit, logged failure result when it fails to match
    the specified regexp in the specified time. These failures signal
    an error for the test.

    Calling luSetWaitType("nostrict") restores the historical behavior.

    Calling luSetWaitType("strict") (re)enables the new strict behavior.

    Individual calls to luCommand() may also specify op="wait-nostrict"
    to override any default and use the historical behavior.

    Individual calls to luCommand() may also specify op="wait-strict"
    to override any default and use the new behavior.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
20 months agostaticd: add debug static bfd command
Philippe Guibert [Tue, 28 Sep 2021 12:53:23 +0000 (14:53 +0200)]
staticd: add debug static bfd command

This command helps in troubleshooting static bfd feature.
Add traces upon bfd events.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agotopotests: test BFD static route integration
Rafael Zalamena [Wed, 24 Mar 2021 12:41:04 +0000 (09:41 -0300)]
topotests: test BFD static route integration

Test that BFD static monitoring works:
When BFD session is up the routes are installed in the RIB and
distributed with routing protocol (in this case BGP). When the session
is down it is removed from RIB and propagated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agodoc: document new static BFD commands
Rafael Zalamena [Wed, 24 Mar 2021 12:40:56 +0000 (09:40 -0300)]
doc: document new static BFD commands

Let the user know how to use the static route monitoring commands.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agostaticd: fix bug on route reinstallation
Rafael Zalamena [Mon, 28 Nov 2022 19:44:37 +0000 (16:44 -0300)]
staticd: fix bug on route reinstallation

When configuring a route with multiple next hops on boot and the
interface is missing the route never shows up (even after interface is
properly learned).

Fix: force route clean up by uninstalling it and putting it back
entirely instead of just updating the missing next hop.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agostaticd: add command to show monitored routes
Rafael Zalamena [Wed, 24 Mar 2021 12:40:46 +0000 (09:40 -0300)]
staticd: add command to show monitored routes

Add command to visualize all monitored routes and their state.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agozebra: send BFD messages to staticd
Rafael Zalamena [Wed, 24 Mar 2021 12:40:10 +0000 (09:40 -0300)]
zebra: send BFD messages to staticd

Add logic to allow `zebra` to reroute BFD messages for `staticd`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agolib,staticd: BFD integration CLI commands
Rafael Zalamena [Mon, 28 Nov 2022 18:26:06 +0000 (15:26 -0300)]
lib,staticd: BFD integration CLI commands

Implement the static route monitoring feature with BFD integration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agostaticd: BFD integration northbound support
Rafael Zalamena [Wed, 24 Mar 2021 12:39:55 +0000 (09:39 -0300)]
staticd: BFD integration northbound support

Implement all BFD integration northbound callbacks and integrate BFD
with `staticd` route installation procedure.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agoyang: static route BFD monitoring
Rafael Zalamena [Wed, 24 Mar 2021 12:39:34 +0000 (09:39 -0300)]
yang: static route BFD monitoring

Define a generic BFD monitoring group template and use it to add support
for static route monitoring.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agolib: BFD integration clean up function
Rafael Zalamena [Fri, 2 Dec 2022 13:04:40 +0000 (10:04 -0300)]
lib: BFD integration clean up function

Implement clean up function to be called on shutdown to make daemon exit
clean for valgrind and other memory sanitizers.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agolib: BFD automatic source selection
Rafael Zalamena [Tue, 15 Nov 2022 14:22:09 +0000 (11:22 -0300)]
lib: BFD automatic source selection

Implement new BFD library issue to allow protocols to configure BFD
sessions with automatic source selection.

The source selection will be based on the Next Hop Tracking feature:
`zebra` will do RIB lookups to determine the output interface and the
primary source address of that interface will be used as source.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
20 months agoMerge pull request #12637 from donaldsharp/revert_pr_11127
Jafar Al-Gharaibeh [Fri, 13 Jan 2023 17:20:28 +0000 (11:20 -0600)]
Merge pull request #12637 from donaldsharp/revert_pr_11127

Revert "Merge pull request #11127 from louis-6wind/bgp-leak"

20 months agoRevert "tests: Fix wrong interface name in SRv6 topotest"
Donald Sharp [Fri, 13 Jan 2023 14:02:34 +0000 (09:02 -0500)]
Revert "tests: Fix wrong interface name in SRv6 topotest"

This reverts commit 647c38eab2d6a1d05f6f683185c58ecf3015a4dc.

20 months agoMerge pull request #12626 from opensourcerouting/fix/bgpd_neighbor_password_unnumbered
Donald Sharp [Fri, 13 Jan 2023 13:35:36 +0000 (08:35 -0500)]
Merge pull request #12626 from opensourcerouting/fix/bgpd_neighbor_password_unnumbered

bgpd: Warn user about mixed order of commands executed

20 months agoRevert "Merge pull request #11127 from louis-6wind/bgp-leak"
Donald Sharp [Wed, 11 Jan 2023 15:14:11 +0000 (10:14 -0500)]
Revert "Merge pull request #11127 from louis-6wind/bgp-leak"

This reverts commit 16aa1809e7c8caad37e8edd4e5aaac4f344bc7d3, reversing
changes made to f616e716089b16d9a678846282a6ac5c55e31a56.

20 months agoMerge pull request #12629 from opensourcerouting/fix/use_static_repo
Stephen Worley [Thu, 12 Jan 2023 19:27:57 +0000 (14:27 -0500)]
Merge pull request #12629 from opensourcerouting/fix/use_static_repo

github: Use static quay.io repository for docker images

20 months agoMerge pull request #12627 from donaldsharp/pim_igmp_vrf_micronet_failure
Christian Hopps [Thu, 12 Jan 2023 13:59:28 +0000 (08:59 -0500)]
Merge pull request #12627 from donaldsharp/pim_igmp_vrf_micronet_failure

tests: the pim_igmp_vrf topotest fails under high load

20 months agoMerge pull request #12595 from chiragshah6/fdev1
Donatas Abraitis [Thu, 12 Jan 2023 08:12:22 +0000 (10:12 +0200)]
Merge pull request #12595 from chiragshah6/fdev1

bgpd: show bgp vrfs per vrf level json support

20 months agodoc: add documentation for show bgp vrfs
Chirag Shah [Fri, 6 Jan 2023 21:09:36 +0000 (13:09 -0800)]
doc: add documentation for show bgp vrfs

Signed-off-by: Chirag Shah <chirag@nvidia.com>
20 months agobgpd: show bgp vrfs per vrf level json support
Sindhu Parvathi Gopinathan [Tue, 3 Jan 2023 09:50:44 +0000 (01:50 -0800)]
bgpd: show bgp vrfs per vrf level json support

json support extended for show [ip] bgp vrfs <vrf-name> json

Before:
```
tor-2# show ip bgp vrfs default json
% JSON option not yet supported for specific VRF
tor-2#
tor-2# show bgp vrfs sym_1 json
% JSON option not yet supported for specific VRF
tor-2#
```

After:
```
tor-1# show ip bgp vrfs default json
{
  "default":{
    "type":"DFLT",
    "vrfId":0,
    "routerId":"27.0.0.7",
    "numConfiguredPeers":2,
    "numEstablishedPeers":2,
    "l3vni":0,
    "rmac":"00:00:00:00:00:00",
    "interface":"unknown"
  }
}
tor-1#
tor-1# show bgp vrfs sym_1 json
{
  "sym_1":{
    "type":"VRF",
    "vrfId":21,
    "routerId":"27.0.0.81",
    "numConfiguredPeers":0,
    "numEstablishedPeers":0,
    "l3vni":8888,
    "rmac":"44:38:39:ff:ff:25",
    "interface":"vlan490_l3"
  }
}
tor-1#

tor-1# show bgp vrfs test json
{
}
tor-1#
```

Ticket:#3314672

Issue:3314672

Testing: UT done

Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Sindhu Parvathi Gopinathan <sgopinathan@nvidia.com>
20 months agoMerge pull request #12609 from mjstapp/fix_bfd_check_len
Rafael Zalamena [Wed, 11 Jan 2023 20:25:23 +0000 (17:25 -0300)]
Merge pull request #12609 from mjstapp/fix_bfd_check_len

bfdd: validate incoming control message length

20 months agogithub: Drop temporary docker-stable github action
Donatas Abraitis [Wed, 11 Jan 2023 19:50:22 +0000 (21:50 +0200)]
github: Drop temporary docker-stable github action

Until we have a consensus how we ship stable/X.Y docker images.

For now we build images based on release tags, not based on HEAD of the branch.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agogithub: Use static quay.io repository for docker images
Donatas Abraitis [Wed, 11 Jan 2023 19:23:44 +0000 (21:23 +0200)]
github: Use static quay.io repository for docker images

Not dynamic from username, because tags do not allow using "+" character.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agoMerge pull request #12623 from anlancs/fix/zerbra-debug-cosmetic-changes
Donatas Abraitis [Wed, 11 Jan 2023 19:04:52 +0000 (21:04 +0200)]
Merge pull request #12623 from anlancs/fix/zerbra-debug-cosmetic-changes

zebra: cosmetic changes for debug

20 months agotests: Pim vrf's need 4.19 or better to run properly not 4.15
Donald Sharp [Wed, 11 Jan 2023 17:27:24 +0000 (12:27 -0500)]
tests: Pim vrf's need 4.19 or better to run properly not 4.15

Tests are failing in micronet because linux kernel needs are 4.19
not 4.15

2023-01-11 17:15:06,657.657 INFO: topolog.r1: vtysh command => "show zebra"
2023-01-11 17:15:06,657.657 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh  -c "show zebra" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2023-01-11 17:15:06,729.729 INFO: topolog.r1: vtysh result:
OS                             Linux(4.15.0-193-generic)

Notice the missing pimreg11 device needed in vrf blue:

2023-01-11 17:15:06,731.731 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh  -c "show int brief" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2023-01-11 17:15:06,781.781 INFO: topolog.r1: vtysh result:
Interface       Status  VRF             Addresses
---------       ------  ---             ---------
blue            up      blue            192.168.0.1/32
r1-eth0         up      blue            192.168.100.1/24
r1-eth1         up      blue            192.168.101.1/24

Interface       Status  VRF             Addresses
---------       ------  ---             ---------
erspan0         down    default
gre0            down    default
gretap0         down    default
lo              up      default
pimreg          up      default

Interface       Status  VRF             Addresses
---------       ------  ---             ---------
r1-eth2         up      red             192.168.100.1/24
r1-eth3         up      red             192.168.101.1/24
red             up      red             192.168.0.1/32

While on a 5.4 machine we have this:

mininet310# show int brief
Interface       Status  VRF             Addresses
---------       ------  ---             ---------
blue            up      blue
dummy1          up      blue
dummy2          up      blue
pimreg11        up      blue

As such let's limit the test to a 4.19 kernel or above that our
documentations states we need for proper pim operation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agoMerge pull request #12628 from donaldsharp/underlines_too_short_in_doc
Mark Stapp [Wed, 11 Jan 2023 18:23:45 +0000 (13:23 -0500)]
Merge pull request #12628 from donaldsharp/underlines_too_short_in_doc

doc: Ensure that the underline length is correct

20 months agodoc: Ensure that the underline length is correct
Donald Sharp [Wed, 11 Jan 2023 15:43:39 +0000 (10:43 -0500)]
doc: Ensure that the underline length is correct

Builds are complaining about this issue.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agobgpd: Don't warning twice for neighbor_bfd_check_controlplane_failure
Donatas Abraitis [Wed, 11 Jan 2023 13:58:10 +0000 (15:58 +0200)]
bgpd: Don't warning twice for neighbor_bfd_check_controlplane_failure

When the peer is not defined first.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Warn an operator, that the peer MUST be created before configuring rest
Donatas Abraitis [Wed, 11 Jan 2023 13:53:31 +0000 (15:53 +0200)]
bgpd: Warn an operator, that the peer MUST be created before configuring rest

For now, if the order was mixed, most of the commands are just silently
ignored. Let the operator notice that.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agoMerge pull request #12622 from taspelund/adj-rib-json
Donatas Abraitis [Wed, 11 Jan 2023 13:25:48 +0000 (15:25 +0200)]
Merge pull request #12622 from taspelund/adj-rib-json

bgpd: add "detail" for advertised/received-routes

20 months agoMerge pull request #12577 from louis-6wind/fix-bgp-evpn-all
Donatas Abraitis [Wed, 11 Jan 2023 12:20:16 +0000 (14:20 +0200)]
Merge pull request #12577 from louis-6wind/fix-bgp-evpn-all

bgpd: fix show bgp all with evpn

20 months agozebra: cosmetic changes for debug
anlan_cs [Mon, 9 Jan 2023 07:24:33 +0000 (15:24 +0800)]
zebra: cosmetic changes for debug

Just remove redundant white spaces in debug information.

Before:
```
2023/01/11 05:04:48 ZEBRA: [W8V7C-6W4DS] init neigh ctx NEIGH_INSTALL: ifp vlan100, mac  9a:68:e9:73:74:88, ip 88.88.88.88
2023/01/11 05:04:48 ZEBRA: [NH6N7-54CD1] Tx RTM_NEWNEIGH family ipv4 IF vlan100(8) Neigh 88.88.88.88 MAC  9a:68:e9:73:74:88 flags 0x10 state 0x40 ext_flags 0x0
```

After:
```
2023/01/11 05:17:26 ZEBRA: [W8V7C-6W4DS] init neigh ctx NEIGH_INSTALL: ifp vlan100, mac 9a:68:e9:73:74:88, ip 88.88.88.88
2023/01/11 05:17:26 ZEBRA: [NH6N7-54CD1] Tx RTM_NEWNEIGH family ipv4 IF vlan100(8) Neigh 88.88.88.88 MAC 9a:68:e9:73:74:88 flags 0x10 state 0x40 ext_flags 0x0
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
20 months agoMerge pull request #12578 from Pdoijode/evpn-mac-vni-det
Donatas Abraitis [Wed, 11 Jan 2023 10:06:37 +0000 (12:06 +0200)]
Merge pull request #12578 from Pdoijode/evpn-mac-vni-det

zebra: Evpn mac vni detail show command

20 months agoMerge pull request #12521 from patrasar/issue_11347_fix
Donatas Abraitis [Wed, 11 Jan 2023 10:05:19 +0000 (12:05 +0200)]
Merge pull request #12521 from patrasar/issue_11347_fix

pimd, pim6d: Handling SGRPT prune received

20 months agoMerge pull request #12590 from anlancs/fix/bgpd-remove-ec-log
Donatas Abraitis [Wed, 11 Jan 2023 10:04:04 +0000 (12:04 +0200)]
Merge pull request #12590 from anlancs/fix/bgpd-remove-ec-log

bgpd: remove one EC log

20 months agoMerge pull request #12602 from opensourcerouting/fix/drop_deprecated_BGP_ATTR_AS_PATH...
Mark Stapp [Tue, 10 Jan 2023 21:37:51 +0000 (16:37 -0500)]
Merge pull request #12602 from opensourcerouting/fix/drop_deprecated_BGP_ATTR_AS_PATHLIMIT

bgpd: Drop deprecated BGP_ATTR_AS_PATHLIMIT path attribute

20 months agoMerge pull request #12620 from donaldsharp/continue_reading
Mark Stapp [Tue, 10 Jan 2023 21:30:26 +0000 (16:30 -0500)]
Merge pull request #12620 from donaldsharp/continue_reading

zebra: Continue fpm_read when we decide a netlink message is not needed

20 months agodoc: add "detail" advertised/received routes
Trey Aspelund [Tue, 10 Jan 2023 19:37:28 +0000 (19:37 +0000)]
doc: add "detail" advertised/received routes

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
20 months agobgpd: add "detail" for advertised/received-routes
Trey Aspelund [Tue, 10 Jan 2023 18:06:43 +0000 (18:06 +0000)]
bgpd: add "detail" for advertised/received-routes

Introduce a "detail" keyword for per-neighbor/per-afi-safi
advertised-routes and received-routes show commands.
Includes json support.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
20 months agoMerge pull request #12612 from opensourcerouting/fix/use_quay.io_for_github_actiobns
Quentin Young [Tue, 10 Jan 2023 16:30:00 +0000 (11:30 -0500)]
Merge pull request #12612 from opensourcerouting/fix/use_quay.io_for_github_actiobns

github: Use quay.io as docker registry for github action generated images

20 months agozebra: Continue fpm_read when we decide a netlink message is not needed
Donald Sharp [Tue, 10 Jan 2023 13:36:50 +0000 (08:36 -0500)]
zebra: Continue fpm_read when we decide a netlink message is not needed

When FRR receives a netlink message that it decides to stop parsing
it returns a 0 ( instead of a -1 ).  Just make the dplane continue
reading other data instead of aborting the read.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agobfdd: validate incoming control message length
Mark Stapp [Mon, 9 Jan 2023 16:57:58 +0000 (11:57 -0500)]
bfdd: validate incoming control message length

Apply upper bound on incoming control messages, drop invalid
messages.

Signed-off-by: Mark Stapp <mjs@labn.net>
20 months agoMerge pull request #12567 from YutaroHayakawa/YutaroHayakawa/isl-dev
Donatas Abraitis [Tue, 10 Jan 2023 07:55:01 +0000 (09:55 +0200)]
Merge pull request #12567 from YutaroHayakawa/YutaroHayakawa/isl-dev

docker,alpine: Remove isl from dependencies

20 months agoMerge pull request #12614 from chiragshah6/zdev
Donatas Abraitis [Tue, 10 Jan 2023 07:53:17 +0000 (09:53 +0200)]
Merge pull request #12614 from chiragshah6/zdev

zebra: Add missing json attributes for show evpn

20 months agozebra: Add missing json attributes for show evpn
Sindhu Parvathi Gopinathan [Sat, 7 Jan 2023 03:54:49 +0000 (19:54 -0800)]
zebra: Add missing json attributes for show evpn

Missing json attributes added for show evpn json

Before:
```
tor-1# show evpn json
{
  "advertiseGatewayMacip":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0,
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"--:--:--",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0
}
tor-1#
```

After:
```
tor-1# show evpn json
{
  "advertiseGatewayMacip":"No",
  "advertiseSviMacip":"No",
  "advertiseSviMac":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0,
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"--:--:--",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0
}
tor-1#
```

Ticket:#3323248

Issue:3323248

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
20 months agogithub: Use quay.io as docker registry for github action generated images
Donatas Abraitis [Mon, 9 Jan 2023 19:33:39 +0000 (21:33 +0200)]
github: Use quay.io as docker registry for github action generated images

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agoMerge pull request #12606 from opensourcerouting/fixes-20230106
Jafar Al-Gharaibeh [Mon, 9 Jan 2023 18:26:29 +0000 (12:26 -0600)]
Merge pull request #12606 from opensourcerouting/fixes-20230106

*: various build fixes

20 months agoMerge pull request #12573 from Pdoijode/bgp-nexthop-json-changes
Donatas Abraitis [Sat, 7 Jan 2023 19:01:06 +0000 (21:01 +0200)]
Merge pull request #12573 from Pdoijode/bgp-nexthop-json-changes

Bgp nexthop json changes

20 months agoMerge pull request #12586 from LabNConsulting/chopps/json-cli-note
Donatas Abraitis [Sat, 7 Jan 2023 18:56:26 +0000 (20:56 +0200)]
Merge pull request #12586 from LabNConsulting/chopps/json-cli-note

doc: add guidance for CLI cmds that output JSON

20 months agoMerge pull request #12605 from Jafaral/lsa2
Donatas Abraitis [Sat, 7 Jan 2023 18:43:39 +0000 (20:43 +0200)]
Merge pull request #12605 from Jafaral/lsa2

ospfd: report the router IP with opaque capability mismatch

20 months agobuild: add doc files missing from dist tarball
David Lamparter [Fri, 6 Jan 2023 16:07:47 +0000 (17:07 +0100)]
build: add doc files missing from dist tarball

The override.css/js files for sphinx docs were not being included into
the tarball created by `make dist`.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
20 months agolib/clippy: fix symbol validity check
David Lamparter [Fri, 6 Jan 2023 16:05:25 +0000 (17:05 +0100)]
lib/clippy: fix symbol validity check

If symvalid is false, looking at symidx is bogus.

This fixes a build-time SEGV on mips64el.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
20 months agolib: disable xref ELF note on mips64el
David Lamparter [Fri, 6 Jan 2023 15:59:55 +0000 (16:59 +0100)]
lib: disable xref ELF note on mips64el

mips64el does not have a 64-bit PC-relative relocation, which is needed
to emit the ELF note for xrefs.  Disabling the ELF note means clippy
takes the fallback path using section headers, so everything does still
work (... unless you strip the section headers.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
20 months agozebra: do not load/store wider-than-ptr atomics
David Lamparter [Fri, 6 Jan 2023 15:55:38 +0000 (16:55 +0100)]
zebra: do not load/store wider-than-ptr atomics

Most 32-bit architectures cannot do atomic loads and stores of data
wider than their pointer size, i.e. 32 bit.  Funnily enough they
generally *can* do a CAS2, i.e., 64-bit compare-and-swap, but while a
CAS can emulate atomic add/bitops, loads and stores aren't available.

Replace with a mutex;  since this is 99% used from the zserv thread, the
mutex should take the local-to-thread fast path anyway.  And while one
atomic might be faster than a mutex lock/unlock, we're doing several
here, and at some point a mutex wins on speed anyway.

This fixes build on armel, mipsel, m68k, powerpc, and sh4.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
20 months agoospfd: report the router IP with Opaque capability mismatch
Jafar Al-Gharaibeh [Fri, 6 Jan 2023 15:27:18 +0000 (09:27 -0600)]
ospfd: report the router IP with Opaque capability mismatch

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
20 months agodocker,alpine: Remove isl from dependencies
Yutaro Hayakawa [Fri, 6 Jan 2023 14:48:23 +0000 (23:48 +0900)]
docker,alpine: Remove isl from dependencies

Alpine upstream changed the name of the isl package to isl-dev. This
caused the build breakage. Since FRR doesn't use it, we chose to solve
this issue by removing it.

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
20 months agoMerge pull request #12568 from YutaroHayakawa/YutaroHayakawa/fpm-nexthop
Donald Sharp [Fri, 6 Jan 2023 13:22:31 +0000 (08:22 -0500)]
Merge pull request #12568 from YutaroHayakawa/YutaroHayakawa/fpm-nexthop

fpm: Send NH message to FPM even if the local kernel doesn't support it

20 months agoMerge pull request #12572 from ak503/lib
Donald Sharp [Fri, 6 Jan 2023 13:16:02 +0000 (08:16 -0500)]
Merge pull request #12572 from ak503/lib

lib: fix display cputime-warning and walltime-warning

20 months agoMerge pull request #12596 from opensourcerouting/fix/frrtrace_arguments
Donald Sharp [Fri, 6 Jan 2023 12:43:39 +0000 (07:43 -0500)]
Merge pull request #12596 from opensourcerouting/fix/frrtrace_arguments

bgpd: Fix the number of arguments for frrtrace()

20 months agobgpd: Drop deprecated BGP_ATTR_AS_PATHLIMIT path attribute
Donatas Abraitis [Fri, 6 Jan 2023 12:40:49 +0000 (14:40 +0200)]
bgpd: Drop deprecated BGP_ATTR_AS_PATHLIMIT path attribute

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agodoc: add guidance for CLI cmds that output JSON
Christian Hopps [Tue, 3 Jan 2023 12:22:28 +0000 (07:22 -0500)]
doc: add guidance for CLI cmds that output JSON

Signed-off-by: Christian Hopps <chopps@labn.net>
20 months agobgpd: Fix the number of arguments for frrtrace()
Donatas Abraitis [Thu, 5 Jan 2023 07:19:43 +0000 (09:19 +0200)]
bgpd: Fix the number of arguments for frrtrace()

For bgp_path_info_add_with_caller().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: AFI option to query nexthops based on AFI
Pooja Jagadeesh Doijode [Thu, 5 Jan 2023 02:53:12 +0000 (18:53 -0800)]
bgpd: AFI option to query nexthops based on AFI

Added ipv4 and ipv6 option to existing "show bgp nexthop"
command to be able to query nexthops that belong to a
particular address-family.

Also fixed the warnings of MR 12171

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
20 months agoMerge pull request #12458 from liron-ze/aggre-route-withdraw
Donatas Abraitis [Wed, 4 Jan 2023 20:50:16 +0000 (22:50 +0200)]
Merge pull request #12458 from liron-ze/aggre-route-withdraw

bgpd: Fix aggregated routes are withdrawn abnormally.

20 months agoMerge pull request #12571 from Shikugawa/ospfd-json
Donatas Abraitis [Wed, 4 Jan 2023 20:45:34 +0000 (22:45 +0200)]
Merge pull request #12571 from Shikugawa/ospfd-json

ospfd: show ospf database info using formatted json

20 months agoMerge pull request #12589 from mjstapp/fix_zeb_typos
Donatas Abraitis [Wed, 4 Jan 2023 20:38:55 +0000 (22:38 +0200)]
Merge pull request #12589 from mjstapp/fix_zeb_typos

zebra: fix a couple of typos

20 months agoMerge pull request #12581 from cscarpitta/fix/fix-wrong-interface-name-srv6l3vpn...
Rafael Zalamena [Wed, 4 Jan 2023 16:30:48 +0000 (13:30 -0300)]
Merge pull request #12581 from cscarpitta/fix/fix-wrong-interface-name-srv6l3vpn-topotest

tests: Fix wrong interface name in `bgp_srv6l3vpn_route_leak` topotest

20 months agobgpd: remove one EC log
anlan_cs [Sun, 13 Nov 2022 04:52:09 +0000 (23:52 -0500)]
bgpd: remove one EC log

When creating one interface "vxlan66" ( ip link add vxlan66 type vxlan ... ),
which initially maintains down status, saw one unexpected EC log:

```
zebra[37906]: [ZAG0W-VSNSD] interface vxlan66 vrf default(0) index 35 becomes active.
zebra[37906]: [HPWGA-Y527W] IFLA_VXLAN_LINK missing from VXLAN IF message
...
zebra[37906]: [W6BZR-YZPAB] RTM_NEWLINK update for vxlan66(35) sl_type 0 master 0 flags 0x1002
zebra[37906]: [MR3ZF-ATDBY] Intf vxlan66(35) has gone DOWN
zebra[37906]: [T44X9-FFNVB] Intf vxlan66(35) L2-VNI 66 is DOWN
zebra[37906]: [KEGYY-K8XVV] Send EVPN_DEL 66 to bgp
zebra[37906]: [HPWGA-Y527W] IFLA_VXLAN_LINK missing from VXLAN IF message
bgpd[37911]: [TV0XP-3WR0A] Rx VNI del VRF default VNI 66 tenant-vrf default SVI ifindex 0
bgpd[37911]: [MDW89-YAXJG][EC 33554497] 0: VNI hash entry for VNI 66 not found at DEL
```

Since commit `6f908ded80eeba40a850e8d1f6246fb3ed31e648` support interfaces
from down to down, and bgpd doesn't know "VNI 66" at all. So, remove this
EC log.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
20 months agozebra: Evpn mac vni detail show command
Pooja Jagadeesh Doijode [Tue, 3 Jan 2023 23:17:58 +0000 (15:17 -0800)]
zebra: Evpn mac vni detail show command

New show command "show evpn mac vni xx detail [json]"
to display details of all the mac entries for the
requested VNI.

Output of show evpn mac vni xx detail json:
        {
          "numMacs":2,
          "macs":{
            "ca:be:63:7c:81:05":{
              "type":"local",
              "intf":"veth100",
              "ifindex":8,
              "uptime":"00:06:55",
              "localSequence":0,
              "remoteSequence":0,
              "detectionCount":0,
              "isDuplicate":false,
              "syncNeighCount":0,
              "neighbors":{
                "active":[
                  "fe80::c8be:63ff:fe7c:8105"
                ],
                "inactive":[
                ]
              }
            }
          }
        }

Also added remoteEs field in the JSON output of
"show evpn mac vni xx json".

Output of show evpn mac vni xx json:
"00:02:00:00:00:0d":{
  "type":"remote",
  "remoteEs":"03:44:38:39:ff:ff:02:00:00:02",
  "localSequence":0,
  "remoteSequence":0,
  "detectionCount":0,
  "isDuplicate":false
}

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
20 months agozebra: fix a couple of typos
Mark Stapp [Tue, 3 Jan 2023 15:46:01 +0000 (10:46 -0500)]
zebra: fix a couple of typos

Fix a couple of typos in vty prompt and output text.

Signed-off-by: Mark Stapp <mjs@labn.net>
20 months agoMerge pull request #12318 from gpnaveen/bgp_unique_rid
Donatas Abraitis [Tue, 3 Jan 2023 20:18:14 +0000 (22:18 +0200)]
Merge pull request #12318 from gpnaveen/bgp_unique_rid

tests: adding bgp unique router id automation.