]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #9566 from LabNConsulting/chopps/easy-fancy-json-setup
Donald Sharp [Wed, 8 Sep 2021 15:29:52 +0000 (11:29 -0400)]
Merge pull request #9566 from LabNConsulting/chopps/easy-fancy-json-setup

tests: new improved simple JSON template w/ doc update

3 years agoMerge pull request #9583 from donaldsharp/remove_addKernelRoute_usage
Christian Hopps [Wed, 8 Sep 2021 15:24:49 +0000 (11:24 -0400)]
Merge pull request #9583 from donaldsharp/remove_addKernelRoute_usage

Remove add kernel route usage

3 years agotests: Set mask to a default value for addKernelRoute
Donald Sharp [Wed, 8 Sep 2021 11:51:23 +0000 (07:51 -0400)]
tests: Set mask to a default value for addKernelRoute

When looking for a implied host route it is not necessary
to add the `/32` to an ip route add.  As such masks
will not be set in this case.  Set the value of masks
to a known good value so that when the route installation
fails the test for it actually being there will tell you
that the route is not there -vs- complaining about mask
being uninited.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Remove unneeded calls to addKernelRoutes
Donald Sharp [Tue, 7 Sep 2021 20:51:27 +0000 (16:51 -0400)]
tests: Remove unneeded calls to addKernelRoutes

There is no need to add calls to addKernelRoutes for
groups.  They do not need to be routed via the
normal kernel methodology.

Tests run successfully with this change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9491 from opensourcerouting/totally-nssa
Russ White [Tue, 7 Sep 2021 23:44:52 +0000 (19:44 -0400)]
Merge pull request #9491 from opensourcerouting/totally-nssa

ospf6d: add support for NSSA totally stub areas

3 years agotests: fix xterm windows for topotests, better errors
Christian Hopps [Tue, 7 Sep 2021 19:44:58 +0000 (15:44 -0400)]
tests: fix xterm windows for topotests, better errors

- Fix xterm support to work, previously it mostly didn't, not it should
in all cases (i.e., single or dist mode).

- Catch when the user tries to use various window requiring topotests
features (e.g., --cli-on-error) but isn't running under supported
system (e.g., byobu/tmux/xterm), and fail the run with an explanation.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agozebra: Send path del to bgp for local-inactive path
Anuradha Karuppiah [Tue, 24 Aug 2021 01:41:37 +0000 (18:41 -0700)]
zebra: Send path del to bgp for local-inactive path

Problem:
When IP1:M1 (local) moved to IP1:M2 (remote-VTEP) bgpd continues to
advertise IP1:M1.

Fix:
Local path del is sent to bgp if the neigh was {local-active||peer-active}.
So path del needs to be called before the sync flags (including peer-active)
are cleared.

Ticket: #2706744

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agozebra: If we hand set the router-id only update everyone if it changes
Donald Sharp [Fri, 3 Sep 2021 13:44:38 +0000 (09:44 -0400)]
zebra: If we hand set the router-id only update everyone if it changes

When we hand set the router-id, but we have choosen a router-id
that is already the `winner` there is no point in updating anyone
with this data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Do not send a router-id of 0.0.0.0 when we don't know it yet
Donald Sharp [Fri, 3 Sep 2021 13:40:26 +0000 (09:40 -0400)]
zebra: Do not send a router-id of 0.0.0.0 when we don't know it yet

At startup there exists a time frame where we might not know
a particular vrf's router id.  When zebra gets a request for
it let's not just blindly send whatever we have.  Let's be
a bit smart and only respond with one if we have one.
The upper level protocol can wait for it to have one.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9576 from MajesticFalcon/master
Quentin Young [Tue, 7 Sep 2021 16:53:27 +0000 (12:53 -0400)]
Merge pull request #9576 from MajesticFalcon/master

ripd: Fix spelling errors

3 years agodoc/developer: adding a CLI node: mention frr-reload.py and VTY_PUSH_XPATH
G. Paul Ziemba [Fri, 3 Sep 2021 19:23:45 +0000 (12:23 -0700)]
doc/developer: adding a CLI node: mention frr-reload.py and VTY_PUSH_XPATH

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
3 years agovrf_name_to_id(): remove
G. Paul Ziemba [Tue, 10 Aug 2021 17:28:36 +0000 (10:28 -0700)]
vrf_name_to_id(): remove

    vrf_name_to_id() returned VRF_DEFAULT when the vrf name was
    unknown, hiding errors. Per community recommendation, vrf_name_to_id()
    is now removed and the few callers now use vrf_lookup_by_name()
    directly.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
3 years agoMerge pull request #9533 from mobash-rasool/ospfv3-bug-fixes
Russ White [Tue, 7 Sep 2021 14:59:33 +0000 (10:59 -0400)]
Merge pull request #9533 from mobash-rasool/ospfv3-bug-fixes

ospfd: ASBR Summary LSA is not originated when process is reset

3 years agoMerge pull request #9539 from ton31337/fix/floating_point_cli
Russ White [Tue, 7 Sep 2021 14:57:24 +0000 (10:57 -0400)]
Merge pull request #9539 from ton31337/fix/floating_point_cli

bgpd: Replace `Enable` to `Disable` for floating-point bw encoding CLI

3 years agoMerge pull request #9551 from mobash-rasool/ospfv2-bug-fixes-04
Russ White [Tue, 7 Sep 2021 14:47:09 +0000 (10:47 -0400)]
Merge pull request #9551 from mobash-rasool/ospfv2-bug-fixes-04

ospfd: GR Conformance fix in Hello packet DR election

3 years agoMerge pull request #9552 from mobash-rasool/ospfv2-bug-fixes-03
Russ White [Tue, 7 Sep 2021 14:46:33 +0000 (10:46 -0400)]
Merge pull request #9552 from mobash-rasool/ospfv2-bug-fixes-03

ospfd: ANVL Test case 25.22, 25.23 and 28.11 fixes

3 years agotests: extend the ospf6_topo2 to test totally stub NSSAs
Renato Westphal [Wed, 25 Aug 2021 14:14:09 +0000 (11:14 -0300)]
tests: extend the ospf6_topo2 to test totally stub NSSAs

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospf6d: add support for NSSA totally stub areas
Renato Westphal [Tue, 24 Aug 2021 20:35:21 +0000 (17:35 -0300)]
ospf6d: add support for NSSA totally stub areas

Add a knob to turn a NSSA area into a totally stub area. In this
configuration a Type-3 default summary route is generated by default.

Syntax: `area A.B.C.D nssa no-summary`.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospfd: Don't allocate json memory unless we have json output
Donald Sharp [Tue, 7 Sep 2021 14:10:50 +0000 (10:10 -0400)]
ospfd: Don't allocate json memory unless we have json output

Several functions in ospf_vty.c were allocating json memory
irrelevant if it was needed or not and then at the end of the loop
free'ing it if it was not used.  Clean up the access pattern.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Fix usage of JSON_C_TO_STRING_NOSLASHESCAPE
Donald Sharp [Tue, 7 Sep 2021 13:40:12 +0000 (09:40 -0400)]
bgpd: Fix usage of JSON_C_TO_STRING_NOSLASHESCAPE

The usage of json_object_to_json_string_ext is mean for
generation of output string and returns a `char *` pointer
to the `formatted` output.  Just calling it does nothing
and it's expensive to boot.

Modify the code in bgpd to just output with the NOSLASHESCAPE
when outputting.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: Fix usage of JSON_C_TO_STRING_NOSLASHESCAPE
Donald Sharp [Tue, 7 Sep 2021 13:36:39 +0000 (09:36 -0400)]
ospfd: Fix usage of JSON_C_TO_STRING_NOSLASHESCAPE

The usage of json_object_to_json_string_ext is meant for
generation of output string and returns a `char *` pointer
to the `formatted` output.  Just calling it does nothing
and it's expensive to boot.

Modify the code in ospfd to just output with the NOSLASHESCAPE
when outputting.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoripd: Fix spelling errors
schylar [Tue, 7 Sep 2021 03:35:16 +0000 (22:35 -0500)]
ripd: Fix spelling errors

Signed-off-by: schylar <schylarutley@hotmail.com>
3 years agotopotests: bgp_srv6l3vpn_to_bgp_vrf locator update test case
Hiroki Shirokura [Sun, 5 Sep 2021 09:48:28 +0000 (09:48 +0000)]
topotests: bgp_srv6l3vpn_to_bgp_vrf locator update test case

If the SRv6 locator is deleted in zebra, zclient(bgpd)
which allocates SIDs from the locator will update the
RIBs which use those SIDs and make them invalid.
This will cause the VPNv6 route to be withdrawn and
the VPN to stop.

If the SRv6 locator is added again, zclient(bgpd) will
allocate the SIDs from the locator again, and VPNv6
will be re-established.

This commit add a test case to confirm this.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agotopotests: refactor bgp_srv6l3vpn_to_bgp_vrf
Hiroki Shirokura [Mon, 6 Sep 2021 23:57:05 +0000 (23:57 +0000)]
topotests: refactor bgp_srv6l3vpn_to_bgp_vrf

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agotopotests: update test cases about srv6 locator deletion
Hiroki Shirokura [Wed, 25 Aug 2021 03:24:19 +0000 (03:24 +0000)]
topotests: update test cases about srv6 locator deletion

Before this PR, in case of get locator chunk zapi from
zclient, zebra precreated a down state locator and set
the chunk ownership. After this PR, this is no longer
done, and chunks are no longer automatically generated.

In this commit, we will make a test update to check the
corresponding detailed behavior.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: handle srv6 locator notification and update vpn-rib
Hiroki Shirokura [Sun, 5 Sep 2021 02:24:23 +0000 (02:24 +0000)]
bgpd: handle srv6 locator notification and update vpn-rib

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: add srv6's no commands
Hiroki Shirokura [Sun, 5 Sep 2021 10:07:56 +0000 (10:07 +0000)]
zebra: add srv6's no commands

CURRENT_CONFIGURATION:
configure terminal
 segment-routing
  srv6
   locators
    locator loc1
    locator loc2
    locator loc3

CMD1: delete single locator
configure terminal
 segment-routing
  srv6
   locators
    no locator loc1

CMD2: delete srv6 whole config (== delete all locators)
configure terminal
 segment-routing
  no srv6

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: elliminate srv6 locator auto allocation by zlicnet request
Hiroki Shirokura [Sun, 5 Sep 2021 10:06:29 +0000 (10:06 +0000)]
zebra: elliminate srv6 locator auto allocation by zlicnet request

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: implement srv6 locator add/delete notification via ZAPI
Hiroki Shirokura [Sun, 5 Sep 2021 10:05:53 +0000 (10:05 +0000)]
zebra: implement srv6 locator add/delete notification via ZAPI

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: add zapi encode/decode func for srv6 locator
Hiroki Shirokura [Sun, 5 Sep 2021 02:22:21 +0000 (02:22 +0000)]
lib: add zapi encode/decode func for srv6 locator

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agoMerge pull request #9577 from slankdev/slankdev-topotest-nsenter
Christian Hopps [Tue, 7 Sep 2021 10:55:25 +0000 (06:55 -0400)]
Merge pull request #9577 from slankdev/slankdev-topotest-nsenter

topotests: to create pid file of topotest router

3 years agobgpd: VRF-Lite fix nexthop type
Kantesh Mundaragi [Tue, 24 Aug 2021 14:53:29 +0000 (07:53 -0700)]
bgpd: VRF-Lite fix nexthop type

Description:
Change is intended for fixing the following issues related to vrf route leaking:

Routes with special nexthops i.e. blackhole/sink routes when imported,
are not programmed into the FIB and corresponding nexthop is set as 'inactive',
nexthop interface as 'unknown'.

While importing/leaking routes between VRFs, in case of special nexthop(ipv4/ipv6)
once bgp announces route(s) to zebra, nexthop type is incorrectly set as
NEXTHOP_TYPE_IPV6_IFINDEX/NEXTHOP_TYPE_IFINDEX
i.e. directly connected even though we are not able to resolve through an interface.
This leads to nexthop_active_check marking nexthop !NEXTHOP_FLAG_ACTIVE.
Unable to find the active nexthop(s), route is not programmed into the FIB.

Whenever BGP leaks routes, set the correct nexthop type, so that route gets resolved
and correctly programmed into the FIB, in the imported vrf.

Co-authored-by: Kantesh Mundaragi <kmundaragi@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
3 years agoMerge pull request #9557 from idryzhov/bgp-view-cleanup
Donatas Abraitis [Tue, 7 Sep 2021 07:14:30 +0000 (10:14 +0300)]
Merge pull request #9557 from idryzhov/bgp-view-cleanup

bgpd: cleanup special checks for views

3 years agodoc: don't use abbreviate
Hiroki Shirokura [Tue, 7 Sep 2021 07:11:20 +0000 (07:11 +0000)]
doc: don't use abbreviate

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agotopotests: update file format and resolving id
Hiroki Shirokura [Tue, 7 Sep 2021 07:07:18 +0000 (07:07 +0000)]
topotests: update file format and resolving id

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agotopotests: to create pid file of topotest router
Hiroki Shirokura [Tue, 7 Sep 2021 03:55:01 +0000 (03:55 +0000)]
topotests: to create pid file of topotest router

Create a pid file for the router created by topotest.
By executing nsenter directly against this pid, developers
can execute commands directly from outside the unet shell.
This allows the developer to use script, tab completion, etc.,
and improves efficiency.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agoMerge pull request #9569 from LabNConsulting/chopps/parallel-config-nonjson
Donald Sharp [Mon, 6 Sep 2021 22:20:57 +0000 (18:20 -0400)]
Merge pull request #9569 from LabNConsulting/chopps/parallel-config-nonjson

tests: refactor parallel reset/load config for non-json

3 years agotests: deal with parallel exit of process we are reaping
Christian Hopps [Mon, 6 Sep 2021 09:33:55 +0000 (05:33 -0400)]
tests: deal with parallel exit of process we are reaping

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9563 from opensourcerouting/build-strict-prototypes
Donald Sharp [Mon, 6 Sep 2021 16:28:33 +0000 (12:28 -0400)]
Merge pull request #9563 from opensourcerouting/build-strict-prototypes

build: `-Wstrict-prototypes` (+ BSD `sed`)

3 years agotests: refactor parallel reset/load config for non-json
Christian Hopps [Sun, 5 Sep 2021 22:59:26 +0000 (18:59 -0400)]
tests: refactor parallel reset/load config for non-json

Refactor the bgp_auth test to create common_config code to allow
non-json based tests to reset routers and load configs in parallel.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9550 from donaldsharp/better_fails
Donatas Abraitis [Mon, 6 Sep 2021 09:42:15 +0000 (12:42 +0300)]
Merge pull request #9550 from donaldsharp/better_fails

bgpd: Add `PEER_DOWN_SOCKET_ERROR` to the list of peer failure modes

3 years agoMerge pull request #9561 from idryzhov/bgp-no-router-vrf-default
Donatas Abraitis [Mon, 6 Sep 2021 09:41:20 +0000 (12:41 +0300)]
Merge pull request #9561 from idryzhov/bgp-no-router-vrf-default

bgpd: fix "no router bgp X vrf default"

3 years agoMerge pull request #9564 from qlyoung/debian-update-proto-list
Donatas Abraitis [Mon, 6 Sep 2021 09:37:31 +0000 (12:37 +0300)]
Merge pull request #9564 from qlyoung/debian-update-proto-list

debian: update list of protos in pkg desc

3 years agoMerge pull request #9521 from opensourcerouting/ospf6d-gr-fixes
Igor Ryzhov [Mon, 6 Sep 2021 09:36:54 +0000 (12:36 +0300)]
Merge pull request #9521 from opensourcerouting/ospf6d-gr-fixes

ospf6d: minor GR fixes

3 years agoMerge pull request #9547 from ton31337/fix/addpath_non_json_broken
Igor Ryzhov [Mon, 6 Sep 2021 09:33:01 +0000 (12:33 +0300)]
Merge pull request #9547 from ton31337/fix/addpath_non_json_broken

bgpd: Drop afi/safi duplicate string notation for AddPath capability

3 years agoMerge pull request #9567 from LabNConsulting/chopps/bgp-auth-speedup
Donald Sharp [Sun, 5 Sep 2021 14:09:34 +0000 (10:09 -0400)]
Merge pull request #9567 from LabNConsulting/chopps/bgp-auth-speedup

tests: speed up bgp_auth test (24m -> 12m)

3 years agotests: speed up bgp_auth test (24m -> 12m)
Christian Hopps [Sun, 5 Sep 2021 09:41:04 +0000 (05:41 -0400)]
tests: speed up bgp_auth test (24m -> 12m)

- Reduce OSPF timers to 1 and 4
- Reduce BGP connect timer to 5
- Apply configs in parallel as single file
- Remove the switches as all links are p2p, perhaps this will help with
  reliability?

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: new improved simple JSON template w/ doc update
Christian Hopps [Sun, 5 Sep 2021 06:24:50 +0000 (02:24 -0400)]
tests: new improved simple JSON template w/ doc update

Utilizes new pytest fixtures to completely factor out setup and teardown
functionality. Supply the JSON config and write your tests.

"The best topotest template yet!"

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agodebian: update list of protos in pkg desc
Quentin Young [Sat, 4 Sep 2021 16:53:23 +0000 (12:53 -0400)]
debian: update list of protos in pkg desc

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #9199 from LabNConsulting/chopps/micronet-prime
Quentin Young [Sat, 4 Sep 2021 16:20:00 +0000 (12:20 -0400)]
Merge pull request #9199 from LabNConsulting/chopps/micronet-prime

3 years agotests: cleanup: rerun changed files through black
Christian Hopps [Fri, 3 Sep 2021 12:47:30 +0000 (08:47 -0400)]
tests: cleanup: rerun changed files through black

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: cleanup - remove unused imports
Christian Hopps [Fri, 3 Sep 2021 12:43:32 +0000 (08:43 -0400)]
tests: cleanup - remove unused imports

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: Disable test which fails under micronet
Christian Hopps [Thu, 2 Sep 2021 20:05:09 +0000 (16:05 -0400)]
tests: Disable test which fails under micronet

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: use common exa-receive.py script
Christian Hopps [Sun, 22 Aug 2021 06:28:24 +0000 (02:28 -0400)]
tests: use common exa-receive.py script

New generic script uses a new default node specific log dir to avoid
collisions when running in parallel.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: add generic exa-receive.py script
Christian Hopps [Sun, 22 Aug 2021 06:24:58 +0000 (02:24 -0400)]
tests: add generic exa-receive.py script

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: Make bgp_multiview_topo1 predictable
Martin Winter [Wed, 18 Aug 2021 22:01:04 +0000 (00:01 +0200)]
tests: Make bgp_multiview_topo1 predictable

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agotests: remove unneeded mcast group kernel routes and sysctl
Christian Hopps [Wed, 18 Aug 2021 17:03:42 +0000 (13:03 -0400)]
tests: remove unneeded mcast group kernel routes and sysctl

- The PIM tests do not need kernel routes to help them bind joins and
sources to specific interfaces. They should do that themselves directly.
Also do not change system wide "rp_filter" sysctl away from the value
required by everyone else.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: add back a 10 second delay to see if this fixes the failures
Christian Hopps [Fri, 6 Aug 2021 08:40:39 +0000 (04:40 -0400)]
tests: add back a 10 second delay to see if this fixes the failures

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotools: move frr-reload.py to python3 explicitly
Christian Hopps [Wed, 4 Aug 2021 19:58:28 +0000 (15:58 -0400)]
tools: move frr-reload.py to python3 explicitly

We already, reasonably, require python3 elsewhere. Do so here, and reap some
benefit.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: keep revisions of configs
Christian Hopps [Sun, 1 Aug 2021 10:36:09 +0000 (10:36 +0000)]
tests: keep revisions of configs

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: use new helper object for mcast-tester and iperf
Christian Hopps [Fri, 30 Jul 2021 14:46:11 +0000 (14:46 +0000)]
tests: use new helper object for mcast-tester and iperf

- Decrease igmp query interval to fix pim test run times

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: add helper object for mcast-tester and iperf tool.
Christian Hopps [Fri, 30 Jul 2021 14:45:56 +0000 (14:45 +0000)]
tests: add helper object for mcast-tester and iperf tool.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: remove legacy Topo class from micronet
Christian Hopps [Tue, 10 Aug 2021 09:36:21 +0000 (05:36 -0400)]
tests: remove legacy Topo class from micronet

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: remove legacy Topo class from infra
Christian Hopps [Tue, 10 Aug 2021 09:36:46 +0000 (05:36 -0400)]
tests: remove legacy Topo class from infra

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: remove legacy Topo class (fixes many pylint errors)
Christian Hopps [Thu, 29 Jul 2021 09:38:55 +0000 (09:38 +0000)]
tests: remove legacy Topo class (fixes many pylint errors)

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: fix pylint test errors
Christian Hopps [Thu, 29 Jul 2021 11:07:01 +0000 (11:07 +0000)]
tests: fix pylint test errors

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: fix pylint infra errors
Christian Hopps [Wed, 21 Jul 2021 13:33:50 +0000 (13:33 +0000)]
tests: fix pylint infra errors

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agodocker: update with micronet changes
Christian Hopps [Fri, 6 Aug 2021 08:04:58 +0000 (04:04 -0400)]
docker: update with micronet changes

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agodoc: minor update based on mininet removal
Christian Hopps [Sun, 18 Jul 2021 15:59:40 +0000 (15:59 +0000)]
doc: minor update based on mininet removal

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: micronet: update defaults for results+logging
Christian Hopps [Tue, 20 Jul 2021 14:06:19 +0000 (14:06 +0000)]
tests: micronet: update defaults for results+logging

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: micronet: adapt tests
Christian Hopps [Fri, 27 Aug 2021 18:28:29 +0000 (14:28 -0400)]
tests: micronet: adapt tests

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: micronet: update infra
Christian Hopps [Mon, 26 Jul 2021 23:23:20 +0000 (23:23 +0000)]
tests: micronet: update infra

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: NEW micronet replacement for mininet
Christian Hopps [Wed, 14 Jul 2021 20:51:15 +0000 (20:51 +0000)]
tests: NEW micronet replacement for mininet

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9541 from donaldsharp/evpn_cleanup
David Lamparter [Sat, 4 Sep 2021 10:08:38 +0000 (12:08 +0200)]
Merge pull request #9541 from donaldsharp/evpn_cleanup

typedef cleanup to proper usage of `enum X` or `struct X`

3 years agotests: improve vxlan test determinism
Christian Hopps [Sun, 18 Jul 2021 18:03:53 +0000 (18:03 +0000)]
tests: improve vxlan test determinism

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: summarize XML test results
Christian Hopps [Sun, 18 Jul 2021 16:03:44 +0000 (16:03 +0000)]
tests: summarize XML test results

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agodoc/developer: how to add a CLI node
G. Paul Ziemba [Fri, 3 Sep 2021 14:46:29 +0000 (07:46 -0700)]
doc/developer: how to add a CLI node

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
3 years agobgpd: fix "no router bgp X vrf default"
Igor Ryzhov [Fri, 3 Sep 2021 16:39:53 +0000 (19:39 +0300)]
bgpd: fix "no router bgp X vrf default"

Currently, "vrf default" modifier is not processed correctly and we get
the `% Can't find BGP instance` error.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9545 from ton31337/feature/disable-addpath-rx
Mark Stapp [Fri, 3 Sep 2021 15:52:57 +0000 (11:52 -0400)]
Merge pull request #9545 from ton31337/feature/disable-addpath-rx

bgpd: Add disable-addpath-rx knob

3 years agobgpd: cleanup special checks for views
Igor Ryzhov [Fri, 3 Sep 2021 14:36:40 +0000 (17:36 +0300)]
bgpd: cleanup special checks for views

bgp->vrf_id is always VRF_DEFAULT for views. All these special checks
are not necessary.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9542 from pguibert6WIND/ssh_rpki_source
Donald Sharp [Fri, 3 Sep 2021 14:35:47 +0000 (10:35 -0400)]
Merge pull request #9542 from pguibert6WIND/ssh_rpki_source

bgpd: add rpki source address configuration

3 years agoMerge pull request #9549 from mobash-rasool/ospfv2-bug-fixes-02
Igor Ryzhov [Fri, 3 Sep 2021 14:28:59 +0000 (17:28 +0300)]
Merge pull request #9549 from mobash-rasool/ospfv2-bug-fixes-02

ospfd: Memory Leak seen at show_ip_ospf_neighbor_all_common.

3 years agoMerge pull request #9077 from idryzhov/ospf-memory-alloc
Donald Sharp [Fri, 3 Sep 2021 14:14:44 +0000 (10:14 -0400)]
Merge pull request #9077 from idryzhov/ospf-memory-alloc

ospfd: remove unnecessary memory allocation

3 years agoospfd: RFC conformance test case 25.23 issue fix
Mobashshera Rasool [Fri, 3 Sep 2021 12:10:26 +0000 (05:10 -0700)]
ospfd: RFC conformance test case 25.23 issue fix

Problem Statement :
===================
LSA with InitialSequenceNumber is not originated
after MaxSequenceNumber.

ANVL Test case 25.33 states:
============================
As soon as this flooding of a LSA with LS sequence number
MaxSequenceNumber has been acknowledged by all adjacent neighbors,
a new instance can be originated with sequence number of InitialSequenceNumber.

RCA :
=====
DUT did not originated LSA with INITIAL_SEQUENCE number even
after receiving ACK for max sequence LSA.
Code is not present to handle this situation in the lsa ack flow.

Fix :
=====
Add code to originate LSA with initial sequence number in the
LSA ack flow in case of wrap around sequence number.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospfd: ANVL Test case 25.22, 25.23 and 28.11 fixes
Mobashshera Rasool [Fri, 3 Sep 2021 11:52:23 +0000 (04:52 -0700)]
ospfd: ANVL Test case 25.22, 25.23 and 28.11 fixes

ANVL Test case 28.11
If the database copy has LS age equal to MaxAge and LS sequence number
equal to MaxSequenceNumber, simply discard the received LSA
without acknowledging it.

ANVL Test Case 25.22
When an attempt is made to increment the sequence number past the maximum
value of N - 1 (0x7fffffff; also referred to as MaxSequenceNumber),
the current instance of the LSA must first be flushed from the routing domain.

ANVL Test Case 25.23
As soon as this flooding of a LSA with LS sequence number MaxSequenceNumber
has been acknowledged by all adjacent neighbors, a new instance can be
originated with sequence number of InitialSequenceNumber.

RCA:
When IXIA sent LS Seq num as MAX and LS Age as (MAX - 3),
DUT dropped the packet instead of sending ACK.
In function ospf_ls_upd, at Line 2106 the code is there to drop the LSA.
Hence its failing.

Fix:
LSAs ACK must be sent when received LSA is having max sequence number
but not max-aged.
Considering  /* CVE-2017-3224 */ issue, have corrected the existing
code to prevent attacker from sending LSAs with max sequence number
and higher checksum and blocking the flooding of the Max-sequence numbered LSAs.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospfd: GR Conformance fix for Hello packet DR election
Mobashshera Rasool [Fri, 3 Sep 2021 12:59:53 +0000 (05:59 -0700)]
ospfd: GR Conformance fix for Hello packet DR election

Problem Statement:
===================
DUT selecting itself as DR when RR goes for reload.
Test Case 7.2

DUT (GR Helper) receives the Hello packet from the OSPF GR RESTARTER
(ANVL here) with DR and BDR set to 0.0.0.0 and DUT in its hello
neighbor list. DUT triggers the DR and BDR election although it is
in the Helper mode for that neighbor.

Root Cause Analysis:
====================
When hello packet is received with self router ID in the neighbor list,
there is no check in the code to handle this scenario. Hence the DR/BDR
election happens and it changes the DR although it is helper.

Fix:
===================
As per RFC 3623 Section 3.  Operation of Helper Neighbor, below point,
we need to maintain the DR relationship.
Also, if X was the Designated Router on network segment S when the
helping relationship began, Y maintains X as the Designated Router
until the helping relationship is terminated.

Adding the check when DUT is under neighbor helper mode, we need to avoid
ISM state change when hello packet is received with DR/BDR set to 0.0.0.0.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agodoc: Add `neighbor PEER disable-addpath-rx` command
Donatas Abraitis [Thu, 2 Sep 2021 20:33:20 +0000 (23:33 +0300)]
doc: Add `neighbor PEER disable-addpath-rx` command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotests: Check if `disable-addpath-rx` knob works
Donatas Abraitis [Thu, 2 Sep 2021 19:51:05 +0000 (22:51 +0300)]
tests: Check if `disable-addpath-rx` knob works

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Add `disable-addpath-rx` knob
Donatas Abraitis [Thu, 2 Sep 2021 15:47:57 +0000 (18:47 +0300)]
bgpd: Add `disable-addpath-rx` knob

The idea is to disable addpath-rx capability to avoid unnecessary additional
routes installed.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Add `PEER_DOWN_SOCKET_ERROR` to the list of peer failure modes
Donald Sharp [Fri, 3 Sep 2021 11:56:35 +0000 (07:56 -0400)]
bgpd: Add `PEER_DOWN_SOCKET_ERROR` to the list of peer failure modes

BGP can experience a bunch of errors associated with sockets
being manipulated which would prevent the peer from coming up.
Let's add some additional debug information here so that
our operators can do a bit more for themselves.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: Memory Leak seen at show_ip_ospf_neighbor_all_common.
Mobashshera Rasool [Fri, 3 Sep 2021 11:06:15 +0000 (04:06 -0700)]
ospfd: Memory Leak seen at show_ip_ospf_neighbor_all_common.

Problem Statement:
==================
Memory Leak seen at  show_ip_ospf_neighbor_all_common (ospf_vty.c:4635)

RCA:
=================
In function show_ip_ospf_neighbor_all_common, one child json object is not
 added to the parent child object when there is no nbma neighbor. Hence
 the memory leak.

Fix:
=================
Add the child object to the parent json object.

Fixes: #9548
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agobgpd: Drop afi/safi duplicate string notation for AddPath capability
Donatas Abraitis [Fri, 3 Sep 2021 10:59:58 +0000 (13:59 +0300)]
bgpd: Drop afi/safi duplicate string notation for AddPath capability

Before:

```
    AddPath:
      IPv4 Unicast: TX advertised IPv4 Unicast and received
      IPv4 Unicast: RX advertised IPv4 Unicast and received
      IPv6 Unicast: TX advertised IPv6 Unicast
      IPv6 Unicast: RX advertised IPv6 Unicast
```

After:

```
    AddPath:
      IPv4 Unicast: TX advertised and received
      IPv4 Unicast: RX advertised and received
      IPv6 Unicast: TX advertised
      IPv6 Unicast: RX advertised
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9538 from donaldsharp/bgp_view_not_working
Igor Ryzhov [Thu, 2 Sep 2021 16:21:47 +0000 (19:21 +0300)]
Merge pull request #9538 from donaldsharp/bgp_view_not_working

Bgp view not working

3 years agobgpd: add rpki source address configuration
Philippe Guibert [Thu, 2 Sep 2021 15:12:06 +0000 (17:12 +0200)]
bgpd: add rpki source address configuration

Add the ability to configure the source address of rpki
connection. Proposed vty command is to add below parameter:

rpki cache <address> source <bindaddr> <port> preference <pref>
rpki cache <address> source <bindaddr> <port> <usernamessh> ...

This works for both tcp and ssh connections. In case the source
address is not available yet, the rpki retry interval will retry
in a defined amount of time.

Rtrlib library is the library in charge of the binding of the
tcp/ssh connection, and applies the getaddrinfo() and bind()
operations to the passed parameter bindaddr to the respective
tcp_config/ssh_config structures.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agotests: Fix wrong setting of mpls being turned on
Donald Sharp [Thu, 2 Sep 2021 15:25:42 +0000 (11:25 -0400)]
tests: Fix wrong setting of mpls being turned on

There were some tests where we were turning on mpls on
interface names that don't exist for certain `machines`
in the topology.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Convert to `enum zebra_slave_iftype` as per our internal standard
Donald Sharp [Mon, 30 Aug 2021 17:27:02 +0000 (13:27 -0400)]
zebra: Convert to `enum zebra_slave_iftype` as per our internal standard

We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Convert to `enum zebra_iftype` as per our internal standard
Donald Sharp [Mon, 30 Aug 2021 17:24:26 +0000 (13:24 -0400)]
zebra: Convert to `enum zebra_iftype` as per our internal standard

We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Convert to `struct zebra_fec` as per our internal standard
Donald Sharp [Mon, 30 Aug 2021 17:20:04 +0000 (13:20 -0400)]
zebra: Convert to `struct zebra_fec` as per our internal standard

We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Convert to `struct zebra_lsp` as per our internal standard
Donald Sharp [Fri, 20 Aug 2021 13:14:03 +0000 (09:14 -0400)]
zebra: Convert to `struct zebra_lsp` as per our internal standard

We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Convert to `struct zebra_nhlfe` as per our internal standard
Donald Sharp [Fri, 20 Aug 2021 13:08:25 +0000 (09:08 -0400)]
zebra: Convert to `struct zebra_nhlfe` as per our internal standard

We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>