]>
git.puffer.fish Git - mirror/frr.git/log
Rafael Zalamena [Thu, 19 Jan 2023 13:32:18 +0000 (10:32 -0300)]
zebra: fix possible null dereference
Don't attempt to dereference `ifp` directly if it might be null: there
is a check right before this usage: `ifp ? ifp->info : NULL`.
In this context it should be safe to assume `ifp` is not NULL because
the only caller of this function checks that for this `ifindex`. For
consistency we'll check for null anyway in case this ever changes (and
with this the coverity scan warning gets silenced).
Found by Coverity Scan (CID
1519776 )
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Donatas Abraitis [Thu, 19 Jan 2023 07:12:04 +0000 (09:12 +0200)]
Merge pull request #12657 from anlancs/fix/lib-debug-empty-ip
lib: show "(null)" for empty IP address
anlan_cs [Wed, 11 Jan 2023 00:44:46 +0000 (08:44 +0800)]
lib: show "(null)" for empty IP address
Use "(null)" for empty IP address.
One example in `bgp_zebra_send_remote_macip()` to install mac:
Before:
```
2023/01/18 02:09:09 BGP: [SCHS5-AK960] Tx ADD MACIP, VNI 200 MAC 06:6b:7c:db:83:72 IP flags 0x0 seq 0 remote VTEP 88.88.88.88 esi -
```
After:
```
2023/01/18 20:19:57 BGP: [SCHS5-AK960] Tx ADD MACIP, VNI 200 MAC 06:6b:7c:db:83:72 IP (null) flags 0x0 seq 0 remote VTEP 88.88.88.88 esi -
```
Signed-off-by: anlan_cs <vic.lan@pica8.com>
Donald Sharp [Thu, 19 Jan 2023 01:20:45 +0000 (20:20 -0500)]
Merge pull request #12659 from opensourcerouting/fpm-cs
zebra: fix fpm netlink encode out of bounds read
Russ White [Wed, 18 Jan 2023 20:57:48 +0000 (15:57 -0500)]
Merge pull request #12604 from donaldsharp/distance_metric_offload_fixes
Distance/metric offload fixes
Rafael Zalamena [Wed, 18 Jan 2023 18:53:10 +0000 (15:53 -0300)]
zebra: fix fpm netlink encode out of bounds read
Don't attempt to encode the pointer address instead pass the pointer
directly so the real contents can be accessed.
(`ri->pref_src` type is `union g_addr *`)
Found by Coverity Scan (CID
1482162 )
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Mark Stapp [Wed, 18 Jan 2023 12:32:15 +0000 (07:32 -0500)]
Merge pull request #12653 from opensourcerouting/netns-cs
zebra: make sure string is null terminated
Mark Stapp [Tue, 17 Jan 2023 21:25:35 +0000 (16:25 -0500)]
Merge pull request #12648 from opensourcerouting/gmtime-fix
lib: fix gmtime_assafe potential issues
Donald Sharp [Tue, 17 Jan 2023 20:55:31 +0000 (15:55 -0500)]
Merge pull request #12588 from LabNConsulting/chopps/unet-aflags
tests: replace -a (all) with individual flags for nsenter
Rafael Zalamena [Tue, 17 Jan 2023 19:32:08 +0000 (16:32 -0300)]
zebra: make sure string is null terminated
Do extra inotify data structure checks and copy the file name to a stack
buffer making sure it is null byte terminated.
Found by Coverity Scan (CID
1465494 )
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Christian Hopps [Tue, 3 Jan 2023 14:08:50 +0000 (09:08 -0500)]
tests: replace -a (all) with individual flags for nsenter
- required for old OSs like centos 7
- fixes #11924
Signed-off-by: Christian Hopps <chopps@labn.net>
Donatas Abraitis [Tue, 17 Jan 2023 16:25:01 +0000 (18:25 +0200)]
Merge pull request #12449 from chiragshah6/mdev1
zebra: vrf-id support for show vrf vni json cmd
Russ White [Tue, 17 Jan 2023 15:16:46 +0000 (10:16 -0500)]
Merge pull request #12584 from pguibert6WIND/bgp_imported_distance
bgpd: imported vpn entries get appropriate distance
Russ White [Tue, 17 Jan 2023 14:40:58 +0000 (09:40 -0500)]
Merge pull request #12644 from opensourcerouting/rib-uaf
zebra: fix use after free on RIB processing
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
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
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
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
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
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
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
Rafael Zalamena [Tue, 17 Jan 2023 13:21:39 +0000 (10:21 -0300)]
lib: fix gmtime_assafe potential issues
Changes:
- Convert `unsigned int` to `time_t` to satisfy time truncation warnings
even though at this point we had already used the modulus operator.
- Avoid trying to access outside the bounds of the array
`months` array has a size of 13 elements, but the code inside the loop
uses `i + 1` to peek on the next month.
Found by Coverity Scan (CID
1519752 and
1519769 )
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Philippe Guibert [Mon, 2 Jan 2023 14:11:31 +0000 (15:11 +0100)]
bgpd: imported vpn entries get appropriate distance
MPLS VPN networks can either peer with iBGP or eBGP. When
calculating the distance to send to zebra, the imported prefix
is never sent with distance information, even if the vty
command is used under the ipv4 unicast address family:
router bgp 65505 vrf vrf1
address-family ipv4 unicast
distance bgp 26 27 28
[vpn config]
The observation is that the distance sent to zebra for an
imported prefix is still 20:
[..]
VRF vrf1:
B> 192.168.0.0/24 [20/0] via 2.2.2.2 (vrf default) (recursive), label 20, weight 1, 00:00:12
* via 10.125.0.6, ntfp3 (vrf default), label implicit-null/20, weight 1, 00:00:12
The expectation is that the incoming prefix has to follow the
distance that is configured, or the distance derived from the peer
relationship established by the parent prefix.
In the case, an iBGP relationship is done, and no distance
configuration is done, the below show is expected:
[..]
VRF vrf1:
B*> 192.168.0.0/24 [200/0] via 192.168.0.2, r1-gre0 (vrf default), label 20, weight 1, 00:00:12
In the case an iBGP relationship is done, and distance configuration
is performed as below:
[..]
distance bgp 21 201 41
[..]
Then the below show is expected:
[..]
VRF vrf1:
B*> 192.168.0.0/24 [201/0] via 192.168.0.2, r1-gre0 (vrf default), label 20, weight 1, 00:00:12
To get this behaviour, get the peer origin where the prefix is coming
from.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Rafael Zalamena [Mon, 16 Jan 2023 20:40:54 +0000 (17:40 -0300)]
zebra: fix use after free on RIB processing
After calling `rib_unlink` the variable `re` will point to `free()`d
memory, so don't attempt to use it after this point.
Found by Coverity Scan (Coverity ID
1519784 )
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
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>
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
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>
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
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>
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
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
Chirag Shah [Wed, 21 Dec 2022 03:32:35 +0000 (19:32 -0800)]
doc: add documentation for show vrf vni
Signed-off-by: Chirag Shah <chirag@nvidia.com>
Sindhu Parvathi Gopinathan [Sat, 3 Dec 2022 19:09:49 +0000 (11:09 -0800)]
zebra: Adding FRR support for show vrf vrf-id vni
cli & json support extended for show vrf vrf-id vni
commands:
- existing: show vrf vni
- show vrf <vrf-name> vni
- show vrf all vni
- show vrf <vrf-name> vni json
- show vrf all vni json
Before:
```
tor-1# show vrf vni
VRF VNI VxLAN IF
L3-SVI State Rmac
default 100 None
None Down None
sym_1 8888 vxlan99
vlan490_l3 Up 44:38:39:ff:ff:25
sym_2 8889 vxlan99
vlan491_l3 Up 44:38:39:ff:ff:25
sym_3 8890 vxlan99
vlan492_l3 Up 44:38:39:ff:ff:25
sym_4 8891 vxlan99
vlan493_l3 Up 44:38:39:ff:ff:25
sym_5 8892 vxlan99
vlan494_l3 Up 44:38:39:ff:ff:25
tor-1#
```
After:
```
tor-1# show vrf default vni json
{
"vrfs":[
{
"vrf":"default",
"vni":100,
"vxlanIntf":"None",
"sviIntf":"None",
"state":"Down",
"routerMac":"None"
}
]
}
tor-1# show vrf default vni
VRF VNI VxLAN IF
L3-SVI State Rmac
default 100 None
None Down None
tor-1#
tor-1# show vrf all vni
VRF VNI VxLAN IF
L3-SVI State Rmac
default 100 None
None Down None
sym_1 8888 vxlan99
vlan490_l3 Up 44:38:39:ff:ff:25
sym_2 8889 vxlan99
vlan491_l3 Up 44:38:39:ff:ff:25
sym_3 8890 vxlan99
vlan492_l3 Up 44:38:39:ff:ff:25
sym_4 8891 vxlan99
vlan493_l3 Up 44:38:39:ff:ff:25
sym_5 8892 vxlan99
vlan494_l3 Up 44:38:39:ff:ff:25
tor-1#
tor-1#
tor-1#
tor-1#
tor-1#
tor-1# show vrf all vni json
{
"vrfs":[
{
"vrf":"default",
"vni":100,
"vxlanIntf":"None",
"sviIntf":"None",
"state":"Down",
"routerMac":"None"
},
{
"vrf":"sym_1",
"vni":8888,
"vxlanIntf":"vxlan99",
"sviIntf":"vlan490_l3",
"state":"Up",
"routerMac":"44:38:39:ff:ff:25"
},
{
"vrf":"sym_2",
"vni":8889,
"vxlanIntf":"vxlan99",
"sviIntf":"vlan491_l3",
"state":"Up",
"routerMac":"44:38:39:ff:ff:25"
},
{
"vrf":"sym_3",
"vni":8890,
"vxlanIntf":"vxlan99",
"sviIntf":"vlan492_l3",
"state":"Up",
"routerMac":"44:38:39:ff:ff:25"
},
{
"vrf":"sym_4",
"vni":8891,
"vxlanIntf":"vxlan99",
"sviIntf":"vlan493_l3",
"state":"Up",
"routerMac":"44:38:39:ff:ff:25"
},
{
"vrf":"sym_5",
"vni":8892,
"vxlanIntf":"vxlan99",
"sviIntf":"vlan494_l3",
"state":"Up",
"routerMac":"44:38:39:ff:ff:25"
}
]
}
tor-1#
```
Ticket:#
3260835
Issue:
3260835
Testing: UT done
Signed-off-by: Sindhu Parvathi Gopinathan <sgopinathan@nvidia.com>
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")
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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"
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 .
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
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 .
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
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
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
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>
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>
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
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>
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>
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
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>
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
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>
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>
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>
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
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
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>
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
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
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
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
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
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>
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>
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
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>
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>
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
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
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>
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>
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
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
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
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
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>
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>