]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
21 months agotests: zebra_netlink only gives 10 seconds to install all routes
Donald Sharp [Wed, 18 Jan 2023 20:24:17 +0000 (15:24 -0500)]
tests: zebra_netlink only gives 10 seconds to install all routes

Under really heavily loaded systems this is insufficient.  Looking
at the run output we have this:

  "2.1.3.22\/32":[
    {
      "installed":true,
    }
  ],
  "2.1.3.23\/32":[
    {
      "queued":true,
            }
           ],

So after 10 seconds on the micronet system only 30 of the 100 routes are installed.
Give it more time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
21 months agotests: pim_basic fails in micronet
Donald Sharp [Wed, 18 Jan 2023 01:40:50 +0000 (20:40 -0500)]
tests: pim_basic fails in micronet

Looks like under heavy load, the test is not giving enough
time to come to steady state.  Do this:

a) send more udp packets and for longer
b) Increase time spent waiting

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
21 months agoMerge pull request #12653 from opensourcerouting/netns-cs
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

21 months agoMerge pull request #12648 from opensourcerouting/gmtime-fix
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

21 months agoMerge pull request #12588 from LabNConsulting/chopps/unet-aflags
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

21 months agozebra: make sure string is null terminated
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>
21 months agotests: replace -a (all) with individual flags for nsenter
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>
21 months agoMerge pull request #12449 from chiragshah6/mdev1
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

21 months agoMerge pull request #12584 from pguibert6WIND/bgp_imported_distance
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

21 months agoMerge pull request #12644 from opensourcerouting/rib-uaf
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

21 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

21 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

21 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

21 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

21 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

21 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

21 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

21 months agolib: fix gmtime_assafe potential issues
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>
21 months agobgpd: imported vpn entries get appropriate distance
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>
21 months agozebra: fix use after free on RIB processing
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>
21 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>
21 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

21 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>
21 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

21 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>
21 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

21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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

21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 months agodoc: add documentation for show vrf vni
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>
21 months agozebra: Adding FRR support for show vrf vrf-id vni
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>
21 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")

21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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"

21 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.

21 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

21 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.

21 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

21 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

21 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

21 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>
21 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>
21 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

21 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>
21 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>
21 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

21 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>
21 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

21 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>
21 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>
21 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>
21 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

21 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

21 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>
21 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

21 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

21 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

21 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

21 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

21 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>
21 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>
21 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

21 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>
21 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>
21 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

21 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

21 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>
21 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>
21 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

21 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

21 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

21 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

21 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>
21 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>
21 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>
21 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>
21 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>
21 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>