]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 years agolib: skiplist: clean up level counter implementation
G. Paul Ziemba [Tue, 21 Sep 2021 14:34:20 +0000 (07:34 -0700)]
lib: skiplist: clean up level counter implementation

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2 years agoMerge pull request #9636 from donaldsharp/unchecked_return
Igor Ryzhov [Mon, 20 Sep 2021 17:12:54 +0000 (20:12 +0300)]
Merge pull request #9636 from donaldsharp/unchecked_return

zebra: Fix ignored return value from inet_pton

2 years agozebra: Fix ignored return value from inet_pton
Donald Sharp [Fri, 17 Sep 2021 16:23:37 +0000 (12:23 -0400)]
zebra: Fix ignored return value from inet_pton

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #9632 from donaldsharp/no_forced_wait
Russ White [Fri, 17 Sep 2021 16:22:36 +0000 (12:22 -0400)]
Merge pull request #9632 from donaldsharp/no_forced_wait

tests: Do not do a initial_timeout of 2 seconds for verify_bgp_rib

2 years agoMerge pull request #8985 from opensourcerouting/ospf6d-gr
Russ White [Fri, 17 Sep 2021 16:22:07 +0000 (12:22 -0400)]
Merge pull request #8985 from opensourcerouting/ospf6d-gr

ospf6d: introduce support for Graceful Restart (restarting mode)

2 years agoMerge pull request #9620 from idryzhov/bgp-rmap-memleaks
Donatas Abraitis [Fri, 17 Sep 2021 12:48:25 +0000 (15:48 +0300)]
Merge pull request #9620 from idryzhov/bgp-rmap-memleaks

bgpd: fix memory leaks when using route-maps

2 years agoMerge pull request #9628 from donaldsharp/git_ignore_pcep
Donatas Abraitis [Fri, 17 Sep 2021 12:47:00 +0000 (15:47 +0300)]
Merge pull request #9628 from donaldsharp/git_ignore_pcep

*: Add some missed make check generated files in .gitignore

2 years agoMerge pull request #9629 from idryzhov/nb-cli-sort
Mark Stapp [Fri, 17 Sep 2021 12:29:00 +0000 (08:29 -0400)]
Merge pull request #9629 from idryzhov/nb-cli-sort

lib: significantly improve nb cli command sorting

2 years agolib: significantly improve nb cli command sorting
Igor Ryzhov [Thu, 16 Sep 2021 15:37:12 +0000 (18:37 +0300)]
lib: significantly improve nb cli command sorting

Instead of sorting each command one-by-one using listnode_add_sort, add
them to the list without sorting and then sort the list only once.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #9235 from AnuradhaKaruppiah/nht_mh
Sri Mohana Singamsetty [Thu, 16 Sep 2021 21:52:45 +0000 (14:52 -0700)]
Merge pull request #9235 from AnuradhaKaruppiah/nht_mh

bgpd: Extend EVPN next hop tracking to type-1 and type-4 routes

2 years agoMerge pull request #9619 from AnuradhaKaruppiah/lttng-updates
Jafar Al-Gharaibeh [Thu, 16 Sep 2021 19:55:43 +0000 (14:55 -0500)]
Merge pull request #9619 from AnuradhaKaruppiah/lttng-updates

lttng build updates

2 years agotests: Do not do a initial_timeout of 2 seconds for verify_bgp_rib
Donald Sharp [Thu, 16 Sep 2021 19:12:13 +0000 (15:12 -0400)]
tests: Do not do a initial_timeout of 2 seconds for verify_bgp_rib

A bunch of tests have this pattern:

a) Install a new prefix into bgp
b) Run this loop:
foreach (router in topology) {
verify_bgp_rib(router)
}

This is to ensure that the prefix is actually disseminated.
The problem with this, of course, is that a wait of 2 seconds
for every item in that loop makes no sense.  As that the initial
router verification of it's bgp rib will wait 2 seconds and
all the remaining bgp routers in the topology will have gotten
the data.  So we end up waiting a bunch of extra time.

Remove the initial_wait time for verify_bgp_rib.  Also
increase the failure wait time to 30 seconds.  This is
to give a bigger window for bgp to send it's data for
our test systems that could be under heavy load.  In the
normal case tests will never hit this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #9627 from donaldsharp/connect_interface_based_issue
Donatas Abraitis [Thu, 16 Sep 2021 18:14:43 +0000 (21:14 +0300)]
Merge pull request #9627 from donaldsharp/connect_interface_based_issue

bgpd: Allow v6 LL peers to work when connected to as well

2 years agoMerge pull request #9489 from opensourcerouting/pim-restruct-20210825
Donald Sharp [Thu, 16 Sep 2021 16:32:45 +0000 (12:32 -0400)]
Merge pull request #9489 from opensourcerouting/pim-restruct-20210825

pimd: move IGMP memberships from socket to iface, + some cleanups

2 years agoospf6d: fix build problem with ancient json-c versions
Renato Westphal [Mon, 12 Jul 2021 12:29:06 +0000 (09:29 -0300)]
ospf6d: fix build problem with ancient json-c versions

Some CI VMs are using really old versions of json-c (pre 2013 [1])
that expect filenames to be passed as "char *" instead of "const char *".

Add some explicit casts to fix the resulting compiler errors on those
VMs (passing "char *" when the API expects "const char *" is fine).
Hopefully this commit should be reverted once the CI is updated to use
newer versions of json-c.

[1] https://github.com/json-c/json-c/commit/20e4708c

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agotests: add OSPFv3 graceful restart topotest
Renato Westphal [Wed, 30 Jun 2021 18:12:30 +0000 (15:12 -0300)]
tests: add OSPFv3 graceful restart topotest

Add a new topotest that features a topology with seven routers spread
across four OSPF areas:
* 1 backbone area;
* 1 regular non-backbone area (0.0.0.1);
* 1 stub area (0.0.0.2);
* 1 NSSA area (0.0.0.3).

All routers have both GR and GR helper functionality enabled in
the configuration. The test consists of restarting each router,
one at time, and checking that all forwarding planes (and LSDBs)
are kept intact during those restarts.

A successful run takes about three minutes to finish.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospf6d: introduce support for Graceful Restart (restarting mode)
Renato Westphal [Fri, 2 Jul 2021 16:01:32 +0000 (13:01 -0300)]
ospf6d: introduce support for Graceful Restart (restarting mode)

RFC 5187 specifies the Graceful Restart enhancement to the OSPFv3
routing protocol. This commit implements support for the GR
restarting mode.

Here's a quick summary of how the GR restarting mode works:
* GR can be enabled on a per-instance basis using the `graceful-restart
  [grace-period (1-1800)]` command;
* To perform a graceful shutdown, the `graceful-restart prepare ipv6
  ospf` EXEC-level command needs to be issued before restarting the
  ospf6d daemon (there's no specific requirement on how the daemon
  should be restarted);
* `graceful-restart prepare ospf` will initiate the graceful restart
  for all GR-enabled instances by taking the following actions:
  o Flooding Grace-LSAs over all interfaces
  o Freezing the OSPF routes in the RIB
  o Saving the end of the grace period in non-volatile memory (a JSON
    file stored in `$frr_statedir`)
* Once ospf6d is started again, it will follow the procedures
  described in RFC 3623 until it detects it's time to exit the graceful
  restart (either successfully or unsuccessfully).

Testing done:
* New topotest featuring a multi-area OSPF topology (including stub
  and NSSA areas);
* Successful interop tests against IOS-XR routers acting as helpers.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospf6d: add missing entry to array of strings
Renato Westphal [Sat, 10 Jul 2021 15:20:25 +0000 (12:20 -0300)]
ospf6d: add missing entry to array of strings

Commit b8212e0310 introduced OSPF6_SPF_FLAGS_ASBR_STATUS_CHANGE but
didn't update the 'ospf6_spf_reason_str' array accordingly. Fix this.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years ago*: Add some missed make check generated files in .gitignore
Donald Sharp [Thu, 16 Sep 2021 12:05:25 +0000 (08:05 -0400)]
*: Add some missed make check generated files in .gitignore

Some pcep log output from `make check` is showing up in
git status.  Make git know it's ok to ignore this stuff.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Allow v6 LL peers to work when connected to as well
Donald Sharp [Thu, 16 Sep 2021 12:00:44 +0000 (08:00 -0400)]
bgpd: Allow v6 LL peers to work when connected to as well

Initial commit: 8761cd6ddb5437767625f58c8e9cc3ccda7887ab

introduced the idea of v6 LL using interface up/down events
instead of nexthop resolution to know when a peering should
happen or not.  This above commit left a hole where if the remote
peer connected to this bgp, the bgp code would still believe
the peering is down.   Modify the code to double check and
ensure that we have proper v6 LL resolution flags set.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #9614 from idryzhov/bgp-aspath-coverity
Donatas Abraitis [Thu, 16 Sep 2021 12:03:25 +0000 (15:03 +0300)]
Merge pull request #9614 from idryzhov/bgp-aspath-coverity

bgpd: fix coverity warning

2 years agoMerge pull request #9623 from donaldsharp/test_bgp_table
Donatas Abraitis [Thu, 16 Sep 2021 06:03:12 +0000 (09:03 +0300)]
Merge pull request #9623 from donaldsharp/test_bgp_table

tests: Fix make check builds on some bsd variants

2 years agoMerge pull request #9622 from taspelund/arp_sysctl_formatting
Donatas Abraitis [Thu, 16 Sep 2021 05:56:13 +0000 (08:56 +0300)]
Merge pull request #9622 from taspelund/arp_sysctl_formatting

doc: fixup formatting in zebra.rst

2 years agotests: Fix make check builds on some bsd variants
Donald Sharp [Thu, 16 Sep 2021 01:10:24 +0000 (21:10 -0400)]
tests: Fix make check builds on some bsd variants

Compilation is warning that a memcpy is only copying
the first (sizeof pointer) into memory.  This is not
what we really want.  Although it does beg the question about
why this memcpy is needed( or what it is doing ).  I'm going
to just fix the memcpy and call it a day.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agodoc: fixup formatting in zebra.rst
Trey Aspelund [Thu, 16 Sep 2021 00:50:55 +0000 (20:50 -0400)]
doc: fixup formatting in zebra.rst

Swap out incorrect usage of '^' with proper usage of '-'.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agoMerge pull request #9596 from LabNConsulting/ziemba/printfrr-nexthop
Donald Sharp [Thu, 16 Sep 2021 00:23:30 +0000 (20:23 -0400)]
Merge pull request #9596 from LabNConsulting/ziemba/printfrr-nexthop

printfrr %pNHcg, %pNHci

2 years agoMerge pull request #9613 from aaronpereira88/evpn-rt1-legend
Donald Sharp [Thu, 16 Sep 2021 00:22:46 +0000 (20:22 -0400)]
Merge pull request #9613 from aaronpereira88/evpn-rt1-legend

bgpd: Update route-type-1 legend to match output

2 years agoMerge pull request #9617 from idryzhov/ospf6-cleanup-om6
Donald Sharp [Thu, 16 Sep 2021 00:19:12 +0000 (20:19 -0400)]
Merge pull request #9617 from idryzhov/ospf6-cleanup-om6

ospf6d: cleanup useless checks

2 years agobgpd: fix memory leaks when using route-maps
Igor Ryzhov [Wed, 15 Sep 2021 19:45:23 +0000 (22:45 +0300)]
bgpd: fix memory leaks when using route-maps

There are places where we use route-maps using duplicated attributes and
neither intern nor flush them after the usage. If a route-map has set
rules for aspath/communities, they will be allocated and never freed.
We should always flush unneeded duplicated attributes.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agotests: include lttng libs in the bgp tests build
Anuradha Karuppiah [Wed, 15 Sep 2021 18:17:03 +0000 (11:17 -0700)]
tests: include lttng libs in the bgp tests build

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agobuild: change the lttng version requirements in frr
Anuradha Karuppiah [Tue, 14 Sep 2021 16:47:51 +0000 (09:47 -0700)]
build: change the lttng version requirements in frr

Lower the version requirements from 2.12 to 2.10

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agoospf6d: cleanup useless checks
Igor Ryzhov [Wed, 15 Sep 2021 16:21:47 +0000 (19:21 +0300)]
ospf6d: cleanup useless checks

om6->ospf6 is always initialized at the start of the execution.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #9608 from idryzhov/vtysh-segfault
Stephen Worley [Wed, 15 Sep 2021 15:43:37 +0000 (11:43 -0400)]
Merge pull request #9608 from idryzhov/vtysh-segfault

lib: fix segfault on question mark on empty line

2 years agoMerge pull request #9615 from idryzhov/ospf6-null-deref
Mark Stapp [Wed, 15 Sep 2021 14:05:29 +0000 (10:05 -0400)]
Merge pull request #9615 from idryzhov/ospf6-null-deref

ospf6d: fix possible NULL dereference

2 years agoMerge pull request #9611 from donaldsharp/more_default_bull
Russ White [Wed, 15 Sep 2021 13:06:49 +0000 (09:06 -0400)]
Merge pull request #9611 from donaldsharp/more_default_bull

when doing a switch over an enumeration do not use default

2 years agobgpd: Update legend also for evpn_show_route_rd
Aaron Pereira [Wed, 15 Sep 2021 12:18:33 +0000 (05:18 -0700)]
bgpd: Update legend also for evpn_show_route_rd

Signed-off-by: Aaron Pereira <aaronpereira88@gmail.com>
2 years agoospf6d: fix possible NULL dereference
Igor Ryzhov [Wed, 15 Sep 2021 10:48:29 +0000 (13:48 +0300)]
ospf6d: fix possible NULL dereference

OSPF6_CMD_CHECK_RUNNING doesn't check that ospf6 is not NULL.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agobgpd: fix coverity warning
Igor Ryzhov [Wed, 15 Sep 2021 10:21:21 +0000 (13:21 +0300)]
bgpd: fix coverity warning

CID 1506874.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #9432 from taspelund/arp_sysctl_initial
Donatas Abraitis [Wed, 15 Sep 2021 07:31:40 +0000 (10:31 +0300)]
Merge pull request #9432 from taspelund/arp_sysctl_initial

vtysh/sysctl doc improvements

2 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

2 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

2 years agodoc: Expand sysctl values covered in zebra.rst
Trey Aspelund [Wed, 18 Aug 2021 00:30:21 +0000 (20:30 -0400)]
doc: Expand sysctl values covered in zebra.rst

Added references to some other sysctl knobs that influence behavior
significant to routers, e.g. arp_accept, arp_ignore, bc_forwarding.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agodoc: Add reference to vtysh in basic setup
Trey Aspelund [Tue, 17 Aug 2021 23:29:55 +0000 (19:29 -0400)]
doc: Add reference to vtysh in basic setup

Received user feedback that it was unclear how to get into the FRR
shell.  Adding a snippet to the basic setup page to help clarify.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agobgpd: Update route-type-1 legend to match output
Aaron Pereira [Tue, 14 Sep 2021 18:55:17 +0000 (11:55 -0700)]
bgpd: Update route-type-1 legend to match output

Currently the route-type-1 output has the Ethernet Tag printed first and
not the ESI.

However the legend has the opposite format

For eg:
Current legend:
EVPN type-1 prefix: [1]:[ESI]:[EthTag]:[IPlen]:[VTEP-IP]
*> [1]:[0]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[192.168.100.2]
                    192.168.100.2                          0 65002 i
                    RT:65002:100 ET:8
*> [1]:[0]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[192.168.100.3]
                    192.168.100.3                          0 65003 i
                    RT:65003:100 ET:8

Signed-off-by: Aaron Pereira <aaronpereira88@gmail.com>
2 years agozebra: Fix case default usage w/ enum's
Donald Sharp [Tue, 14 Sep 2021 17:28:00 +0000 (13:28 -0400)]
zebra: Fix case default usage w/ enum's

We should not be using `case default` with an enumerated type
This prevents the developer of new cases from knowing where
they need to fix by just compiling.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: Fix usage of default
Donald Sharp [Tue, 14 Sep 2021 17:27:19 +0000 (13:27 -0400)]
lib: Fix usage of default

case default has snuck into our code base for switches
over enumerated types.  Remove.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib,doc,tests: printfrr %pNHcg, %pNHci
G. Paul Ziemba [Thu, 9 Sep 2021 15:25:03 +0000 (08:25 -0700)]
lib,doc,tests: printfrr %pNHcg, %pNHci

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2 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>
2 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

2 years agobgpd: Extend EVPN next hop tracking to type-1 and type-4 routes
Anuradha Karuppiah [Tue, 8 Jun 2021 21:14:58 +0000 (14:14 -0700)]
bgpd: Extend EVPN next hop tracking to type-1 and type-4 routes

NH tracking is already in use for type-1, type-3 and type-5 routes.
This change extends that tracking to EAD and ESR to eliminate the 9s
delay (BGP holdtimer) with ES/L2-NHG update seen when all the uplinks
are shutdown on a remote EVPN PE.

Ticket: #2682896

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 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

2 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

2 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

2 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

2 years agolib: fix segfault on question mark on empty line
Igor Ryzhov [Tue, 14 Sep 2021 12:12:23 +0000 (15:12 +0300)]
lib: fix segfault on question mark on empty line

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 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()

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

2 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

2 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

2 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

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

2 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

2 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

2 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

2 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`

2 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

2 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

2 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

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

2 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

2 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

2 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

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

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

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

2 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

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

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