]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 years agoMerge pull request #9878 from pguibert6WIND/resolver_vrf
Donatas Abraitis [Wed, 1 Dec 2021 06:12:33 +0000 (08:12 +0200)]
Merge pull request #9878 from pguibert6WIND/resolver_vrf

lib: resolver per vrf support

2 years agoMerge pull request #9610 from iqras23/best_path
Russ White [Tue, 30 Nov 2021 21:14:34 +0000 (16:14 -0500)]
Merge pull request #9610 from iqras23/best_path

bgpd: VRF-Lite fix best path selection

2 years agoMerge pull request #10131 from lyq140/patch-5
Donald Sharp [Tue, 30 Nov 2021 17:38:44 +0000 (12:38 -0500)]
Merge pull request #10131 from lyq140/patch-5

pimd: fix igmp user config

2 years agoMerge pull request #10143 from donaldsharp/lib_kernel_routes
Russ White [Tue, 30 Nov 2021 14:52:11 +0000 (09:52 -0500)]
Merge pull request #10143 from donaldsharp/lib_kernel_routes

test: Fix addKernelRoute looking for positive results

2 years agoMerge pull request #10146 from ton31337/fix/acl_bmp
Russ White [Tue, 30 Nov 2021 12:11:00 +0000 (07:11 -0500)]
Merge pull request #10146 from ton31337/fix/acl_bmp

bgpd: Add autocomplete for access-list under BMP node

2 years agoMerge pull request #10145 from donaldsharp/pim_verify_intf_statistics
Russ White [Tue, 30 Nov 2021 12:10:21 +0000 (07:10 -0500)]
Merge pull request #10145 from donaldsharp/pim_verify_intf_statistics

tests: Allow interface statistics to be gathered with some delay

2 years agoMerge pull request #10149 from donaldsharp/zebra_restart
Donatas Abraitis [Tue, 30 Nov 2021 07:14:10 +0000 (09:14 +0200)]
Merge pull request #10149 from donaldsharp/zebra_restart

zebra: Prevent thread usage of data after it being freed

2 years agoMerge pull request #9798 from abuibrahim/master
Quentin Young [Tue, 30 Nov 2021 05:17:28 +0000 (00:17 -0500)]
Merge pull request #9798 from abuibrahim/master

fix broken northbound confd

2 years agoMerge pull request #10147 from ton31337/fix/bgp_packet_set_size
Donald Sharp [Mon, 29 Nov 2021 22:14:19 +0000 (17:14 -0500)]
Merge pull request #10147 from ton31337/fix/bgp_packet_set_size

bgpd: bgp_packet_set_size int to void

2 years agozebra: Prevent thread usage of data after it being freed
Donald Sharp [Mon, 29 Nov 2021 20:51:45 +0000 (15:51 -0500)]
zebra: Prevent thread usage of data after it being freed

On startup we create a thread timer event to do a rib sweep
of the system.  On shutdown we never stopped this timer and
as such we have a situation where a thread event could be run
on shutdown after the data for it has been freed.  Here is the
crash I am seeing:

(gdb) bt
(gdb)

Save the thread data in zebra_router and stop the thread so we don't
accidently do work on shutdown we don't mean to.  In this case
it happened in our topotests with some severe system load.
Essentially we happened to kill the zebra daemon just as the
graceful_restart timer popped here.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: bgp_packet_set_size int to void
Donatas Abraitis [Mon, 29 Nov 2021 19:23:53 +0000 (21:23 +0200)]
bgpd: bgp_packet_set_size int to void

stream size is never checked anywhere in the code, just convert to void.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Add autocomplete for access-list under BMP node
Donatas Abraitis [Mon, 29 Nov 2021 19:18:52 +0000 (21:18 +0200)]
bgpd: Add autocomplete for access-list under BMP node

```
home-spine1.donatas.net(config-bgp-bmp)# ipv6 access-list ?
  ACCESSLIST_NAME  Access list name
     test4 test6
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agotests: Allow interface statistics to be gathered with some delay
Donald Sharp [Mon, 29 Nov 2021 17:11:43 +0000 (12:11 -0500)]
tests: Allow interface statistics to be gathered with some delay

Currently under system load tests that use verify_pim_interface_traffic
immediately after a interface down/up event are not giving any time
for pim to receive and process the data from that event.  Give
the test some time to gather this data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #9703 from donaldsharp/splitup_bgp_gr
Russ White [Mon, 29 Nov 2021 16:05:51 +0000 (11:05 -0500)]
Merge pull request #9703 from donaldsharp/splitup_bgp_gr

tests: Split up the bgp GR topotests

2 years agoMerge pull request #10018 from ckishimo/ospf6d_bitN
Russ White [Mon, 29 Nov 2021 16:05:11 +0000 (11:05 -0500)]
Merge pull request #10018 from ckishimo/ospf6d_bitN

ospf6d: check N-bit in Hello packet

2 years agoMerge pull request #10105 from ton31337/feature/rfc9072
Russ White [Mon, 29 Nov 2021 15:46:58 +0000 (10:46 -0500)]
Merge pull request #10105 from ton31337/feature/rfc9072

bgpd: Implement rfc9072

2 years agotest: Fix addKernelRoute looking for positive results
Donald Sharp [Mon, 29 Nov 2021 13:37:21 +0000 (08:37 -0500)]
test: Fix addKernelRoute looking for positive results

Under heavy system load, we are sometimes seeing this
output for addKernelRoute:

2021-11-28 16:17:27,604 INFO: topolog: [DUT: b1]: Running command: [ip route add 224.0.0.13 dev b1-f1-eth0]
2021-11-28 16:17:27,604 DEBUG: topolog.b1: LinuxNamespace(b1): cmd_status("['/bin/bash', '-c', 'ip route add 224.0.0.13 dev b1-f1-eth0']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2021-11-28 16:17:27,967 DEBUG: topolog.b1: LinuxNamespace(b1): cmd_status("['/bin/bash', '-c', 'ip route']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2021-11-28 16:17:28,243 DEBUG: topolog: ip route
70.0.0.0/24 dev b1-f1-eth0 proto kernel scope link src 70.0.0.1
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This tells us that the ip route add succeeded but when looking for it
the system failed to immediately find it.  Why is this happening?
Probably we are under heavy system load and the two different
commands, 'ip route add..' and 'ip route show' are being executed
on different cpu's and the data has not been copied to the different
cpu yet in the kernel.  This is not necessarily something normally
seen but entirely possible.  Giving the system a few extra seconds
for the kernel to execute/work the memory barrier system seems
prudent for long term success of our programming.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10042 from wangshengjun/dev_bgp
Donatas Abraitis [Mon, 29 Nov 2021 08:39:29 +0000 (09:39 +0100)]
Merge pull request #10042 from wangshengjun/dev_bgp

bgpd: do not set the 'BGP_NEXTHOP_REGISTERED/BGP_NEXTHOP_UNREGISTERD'…

2 years agoMerge pull request #10137 from idryzhov/vtysh-rpki
Donatas Abraitis [Mon, 29 Nov 2021 07:37:02 +0000 (08:37 +0100)]
Merge pull request #10137 from idryzhov/vtysh-rpki

vtysh: add missing rpki node when showing config

2 years agobgpd: do not set the 'BGP_NEXTHOP_REGISTERED/BGP_NEXTHOP_UNREGISTERD' zclient send...
wangshengjun [Fri, 12 Nov 2021 06:39:51 +0000 (14:39 +0800)]
bgpd: do not set the 'BGP_NEXTHOP_REGISTERED/BGP_NEXTHOP_UNREGISTERD' zclient send failed

Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>
2 years agoMerge pull request #10124 from ton31337/feature/vty_json
Igor Ryzhov [Sun, 28 Nov 2021 23:11:29 +0000 (02:11 +0300)]
Merge pull request #10124 from ton31337/feature/vty_json

2 years agovtysh: add missing rpki node when showing config
Igor Ryzhov [Sun, 28 Nov 2021 18:55:06 +0000 (21:55 +0300)]
vtysh: add missing rpki node when showing config

Before:
```
frr version 8.2-dev
frr defaults traditional
hostname frr
rpki
 rpki polling_period 20
 rpki cache 192.0.2.1 8080 preference 1
service integrated-vtysh-config
!
```

After:
```
frr version 8.2-dev
frr defaults traditional
hostname frr
service integrated-vtysh-config
!
rpki
 rpki polling_period 20
 rpki cache 192.0.2.1 8080 preference 1
exit
!
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #10134 from donaldsharp/isis_topo1_vrf_fix
Donatas Abraitis [Sat, 27 Nov 2021 22:13:30 +0000 (23:13 +0100)]
Merge pull request #10134 from donaldsharp/isis_topo1_vrf_fix

tests: Fix isis_topo1_vrf to wait a tiny bit for zebra route install

2 years agotests: Fix isis_topo1_vrf to wait a tiny bit for zebra route install
Donald Sharp [Sat, 27 Nov 2021 18:12:50 +0000 (13:12 -0500)]
tests: Fix isis_topo1_vrf to wait a tiny bit for zebra route install

During repeated runs I am seeing this test fail to run successfully.
Upon inspecting the output:
            {
              "prefix":"10.0.10.0/24",
              "prefixLen":24,
              "protocol":"isis",
              "vrfId":6,
              "vrfName":"r1-cust1",
              "selected":true,
              "destSelected":true,
              "distance":115,
              "metric":10,
              "queued":true,

We can see that the route is still queued.  Under heavy system
load and not ensuring that isis has time to send the route to
zebra and for zebra to install the route, this test can fail.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #9203 from opensourcerouting/bgpd-show-json
Russ White [Sat, 27 Nov 2021 13:30:04 +0000 (08:30 -0500)]
Merge pull request #9203 from opensourcerouting/bgpd-show-json

bgpd: add "json" option to a few more show commands

2 years ago*: Remove redundand braces for single statement blocks
Donatas Abraitis [Thu, 25 Nov 2021 22:02:37 +0000 (00:02 +0200)]
*: Remove redundand braces for single statement blocks

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #10127 from idryzhov/ospf-asbr-instance
Donatas Abraitis [Sat, 27 Nov 2021 09:20:02 +0000 (10:20 +0100)]
Merge pull request #10127 from idryzhov/ospf-asbr-instance

ospfd: fix summary-address deletion

2 years agoMerge pull request #10106 from ton31337/fix/missing_llgr_cap_handling
Igor Ryzhov [Fri, 26 Nov 2021 15:42:32 +0000 (18:42 +0300)]
Merge pull request #10106 from ton31337/fix/missing_llgr_cap_handling

bgpd: Add missing LLGR capability handling stuff

2 years agoMerge pull request #10126 from SaiGomathiN/cleanup
Igor Ryzhov [Fri, 26 Nov 2021 14:24:38 +0000 (17:24 +0300)]
Merge pull request #10126 from SaiGomathiN/cleanup

pimd: removing no caller functions

2 years agoMerge pull request #10125 from ton31337/feature/replace_prefix_to_json_object_string_addf
Igor Ryzhov [Fri, 26 Nov 2021 14:23:45 +0000 (17:23 +0300)]
Merge pull request #10125 from ton31337/feature/replace_prefix_to_json_object_string_addf

*: Replace prefix2str for JSON to %pFX

2 years agopimd: fix igmp user config
ron [Fri, 26 Nov 2021 13:20:40 +0000 (21:20 +0800)]
pimd: fix igmp user config

user config should go ahead no matter it is a query router or not

Signed-off-by: ron <lyq140hf2006@163.com>
2 years agopimd: removing no caller functions
Sai Gomathi [Thu, 25 Nov 2021 16:08:09 +0000 (08:08 -0800)]
pimd: removing no caller functions

Removing the no caller function declarations and definitions
in pimd directory.

Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2 years agoospfd: fix summary-address deletion
Igor Ryzhov [Thu, 25 Nov 2021 18:17:58 +0000 (21:17 +0300)]
ospfd: fix summary-address deletion

When the summary-address is deleted, `ospf_aggr_handle_external_info` is
called for each aggregated route for the cleanup. It needs to find the
corresponding OSPF instance and it does it using the `ei->instance`
which is totally wrong, because it's the instance from which the route
is redistributed, not the local OSPF instance. A pointer to the correct
OSPF instance is already stored in the external_info structure.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agobgpd: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:51:12 +0000 (17:51 +0200)]
bgpd: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobfdd: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:51:02 +0000 (17:51 +0200)]
bfdd: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoldpd: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:50:53 +0000 (17:50 +0200)]
ldpd: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agolib: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:50:47 +0000 (17:50 +0200)]
lib: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoospf6d: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:50:37 +0000 (17:50 +0200)]
ospf6d: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoospfd: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:50:30 +0000 (17:50 +0200)]
ospfd: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agopathd: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:50:20 +0000 (17:50 +0200)]
pathd: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agopbrd: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:50:12 +0000 (17:50 +0200)]
pbrd: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agopimd: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:50:06 +0000 (17:50 +0200)]
pimd: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agosharpd: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:49:56 +0000 (17:49 +0200)]
sharpd: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agozebra: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:49:46 +0000 (17:49 +0200)]
zebra: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agotools: Convert vty_out to vty_json for JSON
Donatas Abraitis [Thu, 25 Nov 2021 15:49:25 +0000 (17:49 +0200)]
tools: Convert vty_out to vty_json for JSON

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years ago*: Remove unused variables
Donatas Abraitis [Thu, 25 Nov 2021 15:35:55 +0000 (17:35 +0200)]
*: Remove unused variables

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Replace prefix2str for JSON to %pFX
Donatas Abraitis [Thu, 25 Nov 2021 15:31:25 +0000 (17:31 +0200)]
bgpd: Replace prefix2str for JSON to %pFX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agolib: Replace prefix2str for JSON to %pFX
Donatas Abraitis [Thu, 25 Nov 2021 15:30:36 +0000 (17:30 +0200)]
lib: Replace prefix2str for JSON to %pFX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoospfd: Replace prefix2str for JSON to %pFX
Donatas Abraitis [Thu, 25 Nov 2021 15:29:30 +0000 (17:29 +0200)]
ospfd: Replace prefix2str for JSON to %pFX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agopbrd: Replace prefix2str for JSON to %pFX
Donatas Abraitis [Thu, 25 Nov 2021 15:29:18 +0000 (17:29 +0200)]
pbrd: Replace prefix2str for JSON to %pFX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agopimd: Replace prefix2str for JSON to %pFX
Donatas Abraitis [Thu, 25 Nov 2021 15:28:24 +0000 (17:28 +0200)]
pimd: Replace prefix2str for JSON to %pFX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agozebra: Replace prefix2str for JSON to %pFX
Donatas Abraitis [Thu, 25 Nov 2021 15:28:12 +0000 (17:28 +0200)]
zebra: Replace prefix2str for JSON to %pFX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agotools: Replace prefix2str for JSON to %pFX
Donatas Abraitis [Thu, 25 Nov 2021 15:26:26 +0000 (17:26 +0200)]
tools: Replace prefix2str for JSON to %pFX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agotests: add ospf6 topotest to check N-bit and E-bit
ckishimo [Tue, 23 Nov 2021 22:13:41 +0000 (23:13 +0100)]
tests: add ospf6 topotest to check N-bit and E-bit

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2 years agotests: verify no ospf6 neighbors
ckishimo [Tue, 23 Nov 2021 21:38:02 +0000 (22:38 +0100)]
tests: verify no ospf6 neighbors

Update verify_ospf6_neighbor() so we can verify there are no
neighbors in a given router

    input_dict = {
        "r0": {
            "ospf6": {
                "neighbors": []
            }
        }
    }
    result = verify_ospf6_neighbor(tgen, topo, dut, input_dict)

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2 years agoospf6d: check N-bit set in Hello packet
ckishimo [Mon, 8 Nov 2021 23:25:06 +0000 (00:25 +0100)]
ospf6d: check N-bit set in Hello packet

RFC 3101 states both E-bit and N-bit need to be checked when receiving a Hello packet.

"To support the NSSA option an additional check must be made in the function
that handles the receiving of the Hello packet to verify that both the N-bit
and the E-bit found in the Hello packet's option field match the area type and
ExternalRoutingCapability of the area of the receiving interface."

This PR adds the check for the N-bit

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2 years agoMerge pull request #10115 from donaldsharp/bgp_route_server_convergence
Donatas Abraitis [Thu, 25 Nov 2021 11:24:35 +0000 (13:24 +0200)]
Merge pull request #10115 from donaldsharp/bgp_route_server_convergence

tests: Add aggressive timers to the new route server client test

2 years agoMerge pull request #10008 from qlyoung/update-process-docs
Jafar Al-Gharaibeh [Wed, 24 Nov 2021 19:55:22 +0000 (12:55 -0700)]
Merge pull request #10008 from qlyoung/update-process-docs

doc: update release process

2 years agoMerge pull request #9906 from patrasar/2553196
Donald Sharp [Wed, 24 Nov 2021 17:33:44 +0000 (12:33 -0500)]
Merge pull request #9906 from patrasar/2553196

pimd: During Joined -> NotJoined, upstream should send prune nomatter

2 years agoMerge pull request #10121 from ton31337/feature/match_ipv6_nexthop_prefixlist
Igor Ryzhov [Wed, 24 Nov 2021 16:38:07 +0000 (19:38 +0300)]
Merge pull request #10121 from ton31337/feature/match_ipv6_nexthop_prefixlist

bgpd: Add an ability to match ipv6 next-hop by prefix-list

2 years agoMerge pull request #10116 from donaldsharp/ospf_test_cleanup
Igor Ryzhov [Wed, 24 Nov 2021 14:44:57 +0000 (17:44 +0300)]
Merge pull request #10116 from donaldsharp/ospf_test_cleanup

Ospf test cleanup

2 years agotests: Check if `match ipv6 next-hop prefix-list` command works
Donatas Abraitis [Wed, 24 Nov 2021 14:28:48 +0000 (16:28 +0200)]
tests: Check if `match ipv6 next-hop prefix-list` command works

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Add an ability to match ipv6 next-hop by prefix-list
Donatas Abraitis [Wed, 24 Nov 2021 14:28:31 +0000 (16:28 +0200)]
bgpd: Add an ability to match ipv6 next-hop by prefix-list

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agodoc: Add `match ipv6 next-hop prefix-list` command
Donatas Abraitis [Wed, 24 Nov 2021 14:25:42 +0000 (16:25 +0200)]
doc: Add `match ipv6 next-hop prefix-list` command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agopimd: During Joined -> NotJoined, upstream should send prune nomatter
sarita patra [Wed, 27 Oct 2021 10:32:57 +0000 (03:32 -0700)]
pimd: During Joined -> NotJoined, upstream should send prune nomatter

RCA: When upstream transition from Joined to NotJoined due to SGRpt
prune, then only SGRpt prune was sent and SG Prune is missed.

Fix: Send SG Prune towards source as well as SGRpt prune towards RP.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agotests: Remove create_router_ospf6
Donald Sharp [Wed, 24 Nov 2021 12:04:46 +0000 (07:04 -0500)]
tests: Remove create_router_ospf6

This function is never used, remove.  Developer can use
create_router_ospf instead

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Do not put area under `router ospf6`
Donald Sharp [Tue, 23 Nov 2021 12:56:03 +0000 (07:56 -0500)]
tests: Do not put area under `router ospf6`

The interface area command is deprecated under
router ospf6 and should be on the individual interface.
Let's modify the tests to not actually put the
interface foo area 0.0.0.0 command under the
router node.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Add clear event to creation of router for v4 and v6 ospf
Donald Sharp [Tue, 23 Nov 2021 12:47:33 +0000 (07:47 -0500)]
tests: Add clear event to creation of router for v4 and v6 ospf

When using build_config_from_json there exists a timing
window where neighbors can come up before the router-id
is applied.  As a precaution, quickly clear the neighbors
to ensure that we get neighbors with the expected router-id.
This can especially happen under high system load.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Move area configuration to interface for ospv3
Donald Sharp [Tue, 23 Nov 2021 12:24:34 +0000 (07:24 -0500)]
tests: Move area configuration to interface for ospv3

The test_ospf_dual_stack test had area configuration
under the `router ospf6` nodes.  This is getting
lots of warning messages from the cli.  Let's remove
this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Don't double create ospfv3 config
Donald Sharp [Tue, 23 Nov 2021 12:06:05 +0000 (07:06 -0500)]
tests: Don't double create ospfv3 config

When testers use the build_config_from_json function
the create_router_ospf function is double creating
the ospfv3 cli to be passed in.  This is because
the create_router_ospf loops over both v2 and v3
and then create_router_ospf6 re-adds v3.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Do not pick an ip address that overlaps with ourselves
Donald Sharp [Wed, 24 Nov 2021 01:16:29 +0000 (20:16 -0500)]
tests: Do not pick an ip address that overlaps with ourselves

The ospf_basic_functionality/test_ospf_lan.py creates
a ethernet segment and attaches 4 routers to it and
assigns ip addresses in a /24.  As one of the tests
it picks a new address for r0 which coincides with
a ip address on r3.  Then the test immediatly
checks for other data.  The problem is of course
that if a test is `slow` enough hello's will
start to be ignored from r3 to r0 and the
neighbor relationships will come down.  Choose
an ip address that doesn't cause this issue.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10113 from donaldsharp/ospf6_external_id_table
Igor Ryzhov [Wed, 24 Nov 2021 11:54:27 +0000 (14:54 +0300)]
Merge pull request #10113 from donaldsharp/ospf6_external_id_table

ospf6d: Remove ospf6->external_id_table

2 years agotests: Add aggressive timers to the new route server client test
Donald Sharp [Wed, 24 Nov 2021 01:19:05 +0000 (20:19 -0500)]
tests: Add aggressive timers to the new route server client test

The new bgp_route_server_client test is not setting the
timers for peers to be fast enough to have the ability
to converge in under 60 seconds if a packet is dropped/missed
at startup.  Make the test have the ability to converge
under load

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10100 from rgirada/ospf_nssa
Donald Sharp [Wed, 24 Nov 2021 00:52:19 +0000 (19:52 -0500)]
Merge pull request #10100 from rgirada/ospf_nssa

ospfd: ospf routing table update upon Changing area from normal to nssa

2 years agoMerge pull request #10111 from idryzhov/staticd-ifup-cleanup
Donald Sharp [Wed, 24 Nov 2021 00:50:44 +0000 (19:50 -0500)]
Merge pull request #10111 from idryzhov/staticd-ifup-cleanup

staticd: remove unnecessary function call

2 years agoospf6d: Remove ospf6->external_id_table
Donald Sharp [Wed, 24 Nov 2021 00:46:16 +0000 (19:46 -0500)]
ospf6d: Remove ospf6->external_id_table

The external_id_table was only ever used to store pointers to data
and was never used for lookup during the course of normal operations.
However it did lead to crashes because somewhere along the way
external routes stored in the external_table never had their
id associated into the external_id_table and we would assert
on the node lookup failing.

Since this code was never used for anything other than
storing data and it was never retrieved for anything useful
let's just remove it from ospf6d.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: add "json" option to "show ip bgp ... dampening parameters"
Renato Westphal [Wed, 28 Jul 2021 01:29:43 +0000 (22:29 -0300)]
bgpd: add "json" option to "show ip bgp ... dampening parameters"

Also:
* rename show_ip_bgp_cmd to show_ip_bgp_dampening_params_cmd;
* rename show_ip_bgp_json_cmd to show_ip_bgp_cmd.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agobgpd: add "json" option to "show ip bgp ... longer-prefixes"
Renato Westphal [Wed, 28 Jul 2021 01:29:43 +0000 (22:29 -0300)]
bgpd: add "json" option to "show ip bgp ... longer-prefixes"

Move the "longer-prefixes" option from show_ip_bgp_cmd to
show_ip_bgp_json_cmd so that is has access to JSON output.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agobgpd: add "json" option to "show ip bgp ... route-map"
Renato Westphal [Wed, 28 Jul 2021 01:29:43 +0000 (22:29 -0300)]
bgpd: add "json" option to "show ip bgp ... route-map"

Move the "route-map" option from show_ip_bgp_cmd to
show_ip_bgp_json_cmd so that is has access to JSON output.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agobgpd: add "json" option to "show ip bgp ... filter-list"
Renato Westphal [Wed, 28 Jul 2021 01:29:43 +0000 (22:29 -0300)]
bgpd: add "json" option to "show ip bgp ... filter-list"

Move the "filter-list" option from show_ip_bgp_cmd to
show_ip_bgp_json_cmd so that is has access to JSON output.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agobgpd: add "json" option to "show ip bgp ... prefix-list"
Renato Westphal [Wed, 28 Jul 2021 01:29:43 +0000 (22:29 -0300)]
bgpd: add "json" option to "show ip bgp ... prefix-list"

Move the "prefix-list" option from show_ip_bgp_cmd to
show_ip_bgp_json_cmd so that is has access to JSON output.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agobgpd: add "json" option to "show ip bgp ... community-list"
Renato Westphal [Wed, 28 Jul 2021 01:29:43 +0000 (22:29 -0300)]
bgpd: add "json" option to "show ip bgp ... community-list"

Move the "community-list" option from show_ip_bgp_cmd to
show_ip_bgp_json_cmd so that is has access to JSON output.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agobgpd: use void pointer to reduce code duplication
Renato Westphal [Wed, 28 Jul 2021 01:29:43 +0000 (22:29 -0300)]
bgpd: use void pointer to reduce code duplication

There's no need to have different calls to bgp_show() when the only
difference is one argument that corresponds to a "void *" parameter.

Code duplication should be reduced to a minimum to avoid bugs like
the one fixed in the previous commit.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agobgpd: fix crash in "show ip bgp ... all alias ALIAS"
Renato Westphal [Wed, 28 Jul 2021 01:29:43 +0000 (22:29 -0300)]
bgpd: fix crash in "show ip bgp ... all alias ALIAS"

Like done in the other places (when "all" isn't used), pass the
actual alias name to bgp_show() instead of a null pointer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoMerge pull request #10112 from ton31337/feature/route-map_autocomplete
Igor Ryzhov [Tue, 23 Nov 2021 16:05:27 +0000 (19:05 +0300)]
Merge pull request #10112 from ton31337/feature/route-map_autocomplete

lib: Use autocomplete for `route-map <name> <action> <seq>`

2 years agolib: Use autocomplete for `route-map <name> <action> <seq>`
Donatas Abraitis [Tue, 23 Nov 2021 14:05:25 +0000 (16:05 +0200)]
lib: Use autocomplete for `route-map <name> <action> <seq>`

```
exit1-debian-11(config)# route-map ?
  RMAP_NAME  Route map tag
     belekas testas
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Add missing LLGR capability handling stuff
Donatas Abraitis [Sun, 21 Nov 2021 21:00:15 +0000 (23:00 +0200)]
bgpd: Add missing LLGR capability handling stuff

```
OPEN has (no message found) capability (71), length 14
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #10024 from ton31337/feature/match_ipv6_next-hop_access-list
Igor Ryzhov [Tue, 23 Nov 2021 13:45:25 +0000 (16:45 +0300)]
Merge pull request #10024 from ton31337/feature/match_ipv6_next-hop_access-list

bgpd: match ipv6 next-hop

2 years agotests: Test if `match ipv6 next-hop` works
Donatas Abraitis [Mon, 22 Nov 2021 19:27:05 +0000 (21:27 +0200)]
tests: Test if `match ipv6 next-hop` works

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Add an ability to match ipv6 next-hop by access-list
Donatas Abraitis [Mon, 22 Nov 2021 19:26:33 +0000 (21:26 +0200)]
bgpd: Add an ability to match ipv6 next-hop by access-list

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agostaticd: remove unnecessary function call
Igor Ryzhov [Thu, 18 Nov 2021 18:18:43 +0000 (21:18 +0300)]
staticd: remove unnecessary function call

When the VRF interface is coming up, we don't need to fixup VRF ids - it
was already done in static_vrf_enable when the interface was created.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #10040 from idryzhov/ifp-vrf-id-cleanup
Donatas Abraitis [Tue, 23 Nov 2021 09:43:48 +0000 (11:43 +0200)]
Merge pull request #10040 from idryzhov/ifp-vrf-id-cleanup

*: cleanup ifp->vrf_id

2 years agolib: resolver per vrf support
Philippe Guibert [Thu, 29 Aug 2019 14:27:00 +0000 (16:27 +0200)]
lib: resolver per vrf support

add a parameter to resolver api that is the vrf identifier. this permits
to make resolution self to each vrf. in case vrf netns backend is used,
this is very practical, since resolution can happen on one netns, while
it is not the case in an other one.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agodoc: Add `match ipv6 next-hop ACCESS6_NAME`
Donatas Abraitis [Mon, 22 Nov 2021 19:25:39 +0000 (21:25 +0200)]
doc: Add `match ipv6 next-hop ACCESS6_NAME`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #9919 from mobash-rasool/pim-upst-3
Donald Sharp [Mon, 22 Nov 2021 19:42:56 +0000 (14:42 -0500)]
Merge pull request #9919 from mobash-rasool/pim-upst-3

pimd: STAR inherited Flag not properly set in certain scenarios

2 years ago*: cleanup ifp->vrf_id
Igor Ryzhov [Thu, 21 Oct 2021 22:17:40 +0000 (01:17 +0300)]
*: cleanup ifp->vrf_id

Since f60a1188 we store a pointer to the VRF in the interface structure.
There's no need anymore to store a separate vrf_id field.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #10057 from ton31337/fix/we_shouldn_send_LLA_for_RS
Donald Sharp [Mon, 22 Nov 2021 17:06:36 +0000 (12:06 -0500)]
Merge pull request #10057 from ton31337/fix/we_shouldn_send_LLA_for_RS

bgpd: Do not send LLA for route-server-client peers

2 years agoMerge pull request #10076 from idryzhov/if-is-loopback-or-vrf
Donald Sharp [Mon, 22 Nov 2021 17:02:21 +0000 (12:02 -0500)]
Merge pull request #10076 from idryzhov/if-is-loopback-or-vrf

*: unify if_is_loopback/if_is_loopback_or_vrf

2 years agoMerge pull request #10070 from idryzhov/ospf6-memcmp-cleanup
Quentin Young [Mon, 22 Nov 2021 14:33:52 +0000 (09:33 -0500)]
Merge pull request #10070 from idryzhov/ospf6-memcmp-cleanup

2 years agoMerge pull request #10083 from karelvanhecke/master
Donald Sharp [Mon, 22 Nov 2021 14:02:49 +0000 (09:02 -0500)]
Merge pull request #10083 from karelvanhecke/master

redhat: check if frr.conf already exists