]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #9393 from donaldsharp/extract_more_data
Igor Ryzhov [Tue, 14 Sep 2021 22:26:13 +0000 (01:26 +0300)]
Merge pull request #9393 from donaldsharp/extract_more_data

3 years agoMerge pull request #9410 from idryzhov/static-show-run-nb
Christian Hopps [Tue, 14 Sep 2021 20:45:28 +0000 (16:45 -0400)]
Merge pull request #9410 from idryzhov/static-show-run-nb

staticd: output config using NB callbacks instead of operational data

3 years agovtysh: Allow us to gather a bit more data when extract.pl dies
Donald Sharp [Fri, 13 Aug 2021 14:51:22 +0000 (10:51 -0400)]
vtysh: Allow us to gather a bit more data when extract.pl dies

When extract.pl dies, it was dieing in a manner that provided
absolutely no useful data as to what went wrong.  Let's add
a tiny bit of debug code.  So we can see what is going wrong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9381 from AnuradhaKaruppiah/evpn-mh-display
Sri Mohana Singamsetty [Tue, 14 Sep 2021 16:39:13 +0000 (09:39 -0700)]
Merge pull request #9381 from AnuradhaKaruppiah/evpn-mh-display

bgpd: remove es_path VNI display from type-2 routes

3 years agoMerge pull request #9486 from slankdev/slankdev-srv6-no-cli-1
Igor Ryzhov [Tue, 14 Sep 2021 16:04:03 +0000 (19:04 +0300)]
Merge pull request #9486 from slankdev/slankdev-srv6-no-cli-1

CLI to delete SRv6 locator

3 years agoMerge pull request #9438 from ranjanyash54/debug_comm
Mark Stapp [Tue, 14 Sep 2021 15:38:21 +0000 (11:38 -0400)]
Merge pull request #9438 from ranjanyash54/debug_comm

ospf6d: Add debug commands for lsa all and route all

3 years agoMerge pull request #9593 from proelbtn/fix-recursive-seg6
Russ White [Tue, 14 Sep 2021 15:15:29 +0000 (11:15 -0400)]
Merge pull request #9593 from proelbtn/fix-recursive-seg6

zebra: copy nexthop_srv6 in nexthop_set_resolved

3 years agoMerge pull request #9602 from nkelapur/master
Donald Sharp [Tue, 14 Sep 2021 12:21:40 +0000 (08:21 -0400)]
Merge pull request #9602 from nkelapur/master

zebra: Fix IPv4 routes with IPv6 link local next hops install in FPM

3 years agoMerge pull request #9364 from LabNConsulting/ziemba/vrf_name_to_id-unknown
Igor Ryzhov [Tue, 14 Sep 2021 10:16:24 +0000 (13:16 +0300)]
Merge pull request #9364 from LabNConsulting/ziemba/vrf_name_to_id-unknown

vrf_name_to_id(): remove and change callers to use vrf_lookup_by_name()

3 years agotopotests: bgp_srv6l3vpn_to_bgp_vrf bgp locator unset test case
Hiroki Shirokura [Mon, 13 Sep 2021 23:32:09 +0000 (23:32 +0000)]
topotests: bgp_srv6l3vpn_to_bgp_vrf bgp locator unset test case

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: add no-cli for srv6 on bgpd-side
Hiroki Shirokura [Mon, 13 Sep 2021 22:11:11 +0000 (22:11 +0000)]
bgpd: add no-cli for srv6 on bgpd-side

(1) Implement zapi wrapper func to release srv6-locator-chunk

(2) Implement no locator NAME command
router bgp 1
 segment-routing srv6
  no locator loc1

(3) Implement no segment-routing srv6 command
router bgp 1
 no segment-routing srv6

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agoMerge pull request #9589 from donaldsharp/route_scale_cleanup
Christian Hopps [Mon, 13 Sep 2021 18:12:27 +0000 (14:12 -0400)]
Merge pull request #9589 from donaldsharp/route_scale_cleanup

tests: Break up route_scale into 2 separate tests

3 years agoMerge pull request #9587 from opensourcerouting/all-proto-test-fix
Donald Sharp [Mon, 13 Sep 2021 17:57:49 +0000 (13:57 -0400)]
Merge pull request #9587 from opensourcerouting/all-proto-test-fix

tests: Fix BGP check in all_protocol_startup

3 years agoMerge pull request #9604 from mjstapp/fix_emacs_dir_local
Donald Sharp [Mon, 13 Sep 2021 17:57:35 +0000 (13:57 -0400)]
Merge pull request #9604 from mjstapp/fix_emacs_dir_local

tests: remove python format block from dir-locals

3 years agoMerge pull request #9543 from donaldsharp/actually_set_mpls_data
Igor Ryzhov [Mon, 13 Sep 2021 16:31:53 +0000 (19:31 +0300)]
Merge pull request #9543 from donaldsharp/actually_set_mpls_data

tests: Fix wrong setting of mpls being turned on

3 years agozebra: Fix IPv4 routes with IPv6 link local next hops install in FPM
Nikhil Kelapure [Sun, 12 Sep 2021 19:25:00 +0000 (12:25 -0700)]
zebra: Fix IPv4 routes with IPv6 link local next hops install in FPM

Description: Currently IPv4 routes with IPv6 link local next hops are
not properly installed in FPM.
Reason is the netlink decoding truncates the ipv6 LL address to 4 byte
ipv4 address.

Ex : fe80:: is directly converted to ipv4 and it results in 254.128.0.0
as next hop for below routes

show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup

B>* 2.1.0.0/16 [200/0] via fe80::268a:7ff:fed0:d40, Ethernet0, weight 1,
02:22:26
B>* 5.1.0.0/16 [200/0] via fe80::268a:7ff:fed0:d40, Ethernet0, weight 1,
02:22:26
B>* 10.1.0.2/32 [200/0] via fe80::268a:7ff:fed0:d40, Ethernet0, weight
1, 02:22:26

Hence this fix converts the ipv6-LL address to ipv4-LL (169.254.0.1)
address before sending it to FPM. This is inline with how these types of
routes are currently programmed into kernel.

Signed-off-by: Nikhil Kelapure <nikhil.kelapure@broadcom.com>
3 years agotests: remove python format block from dir-locals
Mark Stapp [Mon, 13 Sep 2021 14:04:29 +0000 (10:04 -0400)]
tests: remove python format block from dir-locals

Remove the python block from the local emacs settings file
.dir-locals.el.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agoMerge pull request #9558 from LabNConsulting/ziemba/doc-cli-new-node
Donald Sharp [Mon, 13 Sep 2021 12:36:26 +0000 (08:36 -0400)]
Merge pull request #9558 from LabNConsulting/ziemba/doc-cli-new-node

doc/developer: how to add a CLI node

3 years agoMerge pull request #9600 from kuldeepkash/cut_execution_time
Donald Sharp [Mon, 13 Sep 2021 12:35:08 +0000 (08:35 -0400)]
Merge pull request #9600 from kuldeepkash/cut_execution_time

tests: Optimize test_multicast_pim_sm_topo1.py execution time

3 years agoMerge pull request #9571 from LabNConsulting/chopps/impr-zeb-netlink
Donald Sharp [Mon, 13 Sep 2021 12:32:54 +0000 (08:32 -0400)]
Merge pull request #9571 from LabNConsulting/chopps/impr-zeb-netlink

tests: increase wait and update test

3 years agoMerge pull request #9599 from Enigamict/fixtypo
Igor Ryzhov [Mon, 13 Sep 2021 10:41:15 +0000 (13:41 +0300)]
Merge pull request #9599 from Enigamict/fixtypo

tests: fix typo in zebra.conf

3 years agoMerge pull request #9592 from ton31337/fix/bgp_neighbor_strip_whitespace
Igor Ryzhov [Mon, 13 Sep 2021 10:18:00 +0000 (13:18 +0300)]
Merge pull request #9592 from ton31337/fix/bgp_neighbor_strip_whitespace

bgpd: Do not strip peer's description by whitespace in `show bgp summary`

3 years agoMerge pull request #9586 from idryzhov/bgp-default-originate-rmap-fixes
Donatas Abraitis [Sun, 12 Sep 2021 17:50:36 +0000 (20:50 +0300)]
Merge pull request #9586 from idryzhov/bgp-default-originate-rmap-fixes

BGP default-originate with route-map fixes

3 years agoMerge pull request #9479 from AnuradhaKaruppiah/stale_path
Donatas Abraitis [Sun, 12 Sep 2021 17:48:44 +0000 (20:48 +0300)]
Merge pull request #9479 from AnuradhaKaruppiah/stale_path

zebra: Send path del to bgp for local-inactive path

3 years agoMerge pull request #9475 from iqras23/change1
Donatas Abraitis [Sun, 12 Sep 2021 17:47:18 +0000 (20:47 +0300)]
Merge pull request #9475 from iqras23/change1

bgpd: VRF-Lite fix nexthop type

3 years agotests: Optimize test_multicast_pim_sm_topo1.py
Kuldeep Kashyap [Sun, 12 Sep 2021 11:04:09 +0000 (16:34 +0530)]
tests: Optimize test_multicast_pim_sm_topo1.py

1. Optimized test: test_clear_pim_neighbors_and_mroute_p0 run time by clearing
mroute and verifying mroutes separately. Execution time is reduced from almots 10 mins
to ~220 sec.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agotests: fix typo in zebra.conf
enigamict [Fri, 10 Sep 2021 13:34:31 +0000 (22:34 +0900)]
tests: fix typo in zebra.conf

Signed-off-by: enigamict <mochienper@gmail.com>
3 years agozebra: copy nexthop_srv6 in nexthop_set_resolved
Ryoga Saito [Thu, 9 Sep 2021 09:21:30 +0000 (09:21 +0000)]
zebra: copy nexthop_srv6 in nexthop_set_resolved

Current implementation doesn't copy nexthop_srv6. This causes unexpected
behavior when receiving SID information and nexthop isn't onlink.t

Signed-off-by: Ryoga Saito <contact@proelbtn.com>
3 years agobgpd: remove es_path VNI display from type-2 routes
Anuradha Karuppiah [Wed, 28 Jul 2021 13:58:12 +0000 (06:58 -0700)]
bgpd: remove es_path VNI display from type-2 routes

EVPN paths are maintained in per-ES list for efficient updates
(es→macip_global_path_list, es→macip_evi_path_list). VNI is also maintained
in path_extra for easy lookups. This (path_extra) VNI (which is always 0 for
global paths) was being displayed against the path and was mis-interpreted
as the BD.

To avoid that confusion I have removed the display.

Ticket: #2732605

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agoMerge pull request #9019 from pjdruddy/ospfv3-early-break-list-walk
Russ White [Fri, 10 Sep 2021 18:29:53 +0000 (14:29 -0400)]
Merge pull request #9019 from pjdruddy/ospfv3-early-break-list-walk

ospf6d: break early on route prefix mismatch

3 years agoMerge pull request #9597 from donaldsharp/ospf6_header_cleanup
Russ White [Fri, 10 Sep 2021 18:24:19 +0000 (14:24 -0400)]
Merge pull request #9597 from donaldsharp/ospf6_header_cleanup

ospf6d: Cleanup headers to our standard

3 years agoMerge pull request #9594 from donaldsharp/strict_prototypes
Russ White [Fri, 10 Sep 2021 18:23:49 +0000 (14:23 -0400)]
Merge pull request #9594 from donaldsharp/strict_prototypes

Strict prototypes

3 years agoMerge pull request #9573 from LabNConsulting/chopps/update-template
Donald Sharp [Fri, 10 Sep 2021 14:49:00 +0000 (10:49 -0400)]
Merge pull request #9573 from LabNConsulting/chopps/update-template

tests: update the test template and doc

3 years agotests: Break up route_scale into 2 separate tests
Donald Sharp [Wed, 8 Sep 2021 22:24:22 +0000 (18:24 -0400)]
tests: Break up route_scale into 2 separate tests

route_scale run is 500+ seconds.  Break it up into
2 separate tests.  This should reduce run time a slight
bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: Cleanup headers to our standard
Donald Sharp [Thu, 9 Sep 2021 20:42:52 +0000 (16:42 -0400)]
ospf6d: Cleanup headers to our standard

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9497 from opensourcerouting/cli-better-no
Quentin Young [Thu, 9 Sep 2021 16:22:53 +0000 (12:22 -0400)]
Merge pull request #9497 from opensourcerouting/cli-better-no

3 years agoisisd: Remove weird wrapper function that downgrades time_t to 32 bit
Donald Sharp [Thu, 9 Sep 2021 13:09:31 +0000 (09:09 -0400)]
isisd: Remove weird wrapper function that downgrades time_t to 32 bit

Just use time_t, instead of downgrading time_t to a 32 bit value.
We should be using time_t instead of 32 bit unsigned values.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopathd: Ensure node_src_id is inited before usage
Donald Sharp [Thu, 9 Sep 2021 13:02:12 +0000 (09:02 -0400)]
pathd: Ensure node_src_id is inited before usage

Compiler is warning that node_src_id may be used uninited
we know this is not possible but the compiler doesn't.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Do not strip peer's description by whitespace in `show bgp summary`
Donatas Abraitis [Thu, 9 Sep 2021 06:56:03 +0000 (09:56 +0300)]
bgpd: Do not strip peer's description by whitespace in `show bgp summary`

```
~/frr# vtysh -c 'show run' | grep description
 neighbor 192.168.0.2 description test 1 2 3
~/frr# vtysh -c 'show ip bgp summary' | grep -E "Desc|192.168.0.2"
Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.0.2     4          0         0         0        0    0    0    never      Connect        0 test 1 2 3
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotests: We follow strict prototyping rules
Donald Sharp [Thu, 9 Sep 2021 10:33:12 +0000 (06:33 -0400)]
tests: We follow strict prototyping rules

Compiling with -Wstrict-prototypes is causing some complaints
during compiling. Make things happy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9581 from idryzhov/rpki-source-move
Donatas Abraitis [Thu, 9 Sep 2021 06:37:02 +0000 (09:37 +0300)]
Merge pull request #9581 from idryzhov/rpki-source-move

bgpd: move rpki source after the server config

3 years agotests: Fix BGP check in all_protocol_startup
Martin Winter [Wed, 8 Sep 2021 20:18:52 +0000 (22:18 +0200)]
tests: Fix BGP check in all_protocol_startup

Fix issue of topotest failures with BGP status Connect or Idle
instead of the expected Active

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #9578 from donaldsharp/SLASH_ESCAPE
Russ White [Thu, 9 Sep 2021 00:11:07 +0000 (20:11 -0400)]
Merge pull request #9578 from donaldsharp/SLASH_ESCAPE

Slash escape

3 years agoMerge pull request #9553 from donaldsharp/router_id
Russ White [Wed, 8 Sep 2021 21:21:20 +0000 (17:21 -0400)]
Merge pull request #9553 from donaldsharp/router_id

Router id optimizations

3 years agobgpd: move rpki source after the server config
Igor Ryzhov [Tue, 7 Sep 2021 19:24:57 +0000 (22:24 +0300)]
bgpd: move rpki source after the server config

Currently the source IP parameter must be entered between destination IP
and destination port parameters. This is not obviously understandable
when you read such config so let's move the source parameter to the end
of the command line, after the whole list of destination parameters. We
can do this without any deprecation cycle as the parameter was introduced
just recently and isn't in any public release yet.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: add one more check for default-originate with route-map
Igor Ryzhov [Wed, 8 Sep 2021 18:10:12 +0000 (21:10 +0300)]
tests: add one more check for default-originate with route-map

Make sure that we don't set communities from a random RIB route when
originating the default route.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix aspath memory leak
Igor Ryzhov [Wed, 8 Sep 2021 18:08:08 +0000 (21:08 +0300)]
bgpd: fix aspath memory leak

We allocate an as-path using bgp_attr_default_set and should free it
before exiting the function.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix default-originate route-map processing
Igor Ryzhov [Wed, 8 Sep 2021 18:06:44 +0000 (21:06 +0300)]
bgpd: fix default-originate route-map processing

When processing a route-map for default-originate, we actually want to
match by attributes in routes from the RIB, but set attributes in the
newly originated route. Currently, it's not the case. Instead, we
construct a dummy path combining attributes from both routes, and we end
up with multiple problems:
- match by as-path doesn't work
- communities from the matched RIB route are copied to the newly
  originated route
- we corrupt the RIB routes

To fix the issue, we should use the new route-map API that allows using
separate match/set objects.

Fixes #9584.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: add ability to supply separate match/set objects to routemaps
Igor Ryzhov [Wed, 8 Sep 2021 17:46:21 +0000 (20:46 +0300)]
lib: add ability to supply separate match/set objects to routemaps

Sometimes it's needed to match by fields of one object but set fields of
another object. The following commit is an example.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: increase wait and update test
Christian Hopps [Mon, 6 Sep 2021 08:16:15 +0000 (04:16 -0400)]
tests: increase wait and update test

Modernize the test a bit, generate expected results rather than load from
file, and add a general json_cmp with retry function and use it.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9582 from LabNConsulting/chopps/fix-xterm-windows
Donald Sharp [Wed, 8 Sep 2021 17:57:39 +0000 (13:57 -0400)]
Merge pull request #9582 from LabNConsulting/chopps/fix-xterm-windows

tests: fix xterm windows for topotests, better errors

3 years agotests: update the test template and doc
Christian Hopps [Mon, 6 Sep 2021 09:05:45 +0000 (05:05 -0400)]
tests: update the test template and doc

- Update the template and documentation to use newer pytest fixutres for
setup and teardown, as well as skipping tests when the suite fails.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9572 from LabNConsulting/chopps/fix-cleanup
Mark Stapp [Wed, 8 Sep 2021 16:26:51 +0000 (12:26 -0400)]
Merge pull request #9572 from LabNConsulting/chopps/fix-cleanup

tests: deal with parallel exit of process we are reaping

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>