]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #6853 from mjstapp/fix_rib_dups
Donald Sharp [Wed, 13 Jan 2021 14:42:34 +0000 (09:42 -0500)]
Merge pull request #6853 from mjstapp/fix_rib_dups

zebra: reduce impact of route-update overload

3 years agoMerge pull request #7849 from gpnaveen/static_rte_test
Donatas Abraitis [Wed, 13 Jan 2021 07:09:38 +0000 (09:09 +0200)]
Merge pull request #7849 from gpnaveen/static_rte_test

tests: Static route cases with admin dist and tag.

3 years agoMerge pull request #7861 from mjstapp/fix_dev_doc_index_no
Donatas Abraitis [Wed, 13 Jan 2021 07:07:59 +0000 (09:07 +0200)]
Merge pull request #7861 from mjstapp/fix_dev_doc_index_no

doc: fix several issues, remind about 'no' in cli index statements

3 years agoMerge pull request #7748 from adrianomarto/bgp-listen-on-multiple-addresses
Donatas Abraitis [Wed, 13 Jan 2021 06:57:38 +0000 (08:57 +0200)]
Merge pull request #7748 from adrianomarto/bgp-listen-on-multiple-addresses

BGP daemon listen for connections on multiple addresses

3 years agodoc: fix sphinx warnings
Mark Stapp [Tue, 12 Jan 2021 18:31:07 +0000 (13:31 -0500)]
doc: fix sphinx warnings

Fix a couple of sphinx source processing warnings.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodoc: add missing files to index.rst and subdir.am
Mark Stapp [Tue, 12 Jan 2021 18:30:14 +0000 (13:30 -0500)]
doc: add missing files to index.rst and subdir.am

Some missing doc files, add them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodoc: remind not to include 'no' in cli doc index statements
Mark Stapp [Tue, 12 Jan 2021 18:29:08 +0000 (13:29 -0500)]
doc: remind not to include 'no' in cli doc index statements

Remind folks not to include the 'no' in cli doc index lines.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7707 from opensourcerouting/isisd-rlfa
Olivier Dugeon [Tue, 12 Jan 2021 18:25:15 +0000 (19:25 +0100)]
Merge pull request #7707 from opensourcerouting/isisd-rlfa

isisd, ldpd: add Remote LFA support

3 years agoMerge pull request #7439 from opensourcerouting/bgp-damp-profile2
Donald Sharp [Tue, 12 Jan 2021 16:45:41 +0000 (11:45 -0500)]
Merge pull request #7439 from opensourcerouting/bgp-damp-profile2

bgpd: BGP route-flap dampening profiles for peers and peer groups

3 years agodoc: remove 'no' from doc 'index' lines
Mark Stapp [Tue, 12 Jan 2021 16:34:42 +0000 (11:34 -0500)]
doc: remove 'no' from doc 'index' lines

Index based on the cli commands, not the possible 'no' form.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7247 from ton31337/feature/enhanced_route_refresh_capability
Russ White [Tue, 12 Jan 2021 16:27:11 +0000 (11:27 -0500)]
Merge pull request #7247 from ton31337/feature/enhanced_route_refresh_capability

bgpd: Enhanced Route Refresh capability

3 years agoMerge pull request #7860 from mjstapp/fix_exec_perms
Quentin Young [Tue, 12 Jan 2021 16:26:39 +0000 (11:26 -0500)]
Merge pull request #7860 from mjstapp/fix_exec_perms

libs,nhrpd: remove exec perm

3 years agoMerge pull request #7733 from rgirada/ospf_json
Russ White [Tue, 12 Jan 2021 16:23:03 +0000 (11:23 -0500)]
Merge pull request #7733 from rgirada/ospf_json

ospfd: Adding authentication details to ospf interafce command o/p

3 years agoMerge pull request #7841 from volta-networks/fix_isis_mstyle_routes
Donald Sharp [Tue, 12 Jan 2021 13:51:07 +0000 (08:51 -0500)]
Merge pull request #7841 from volta-networks/fix_isis_mstyle_routes

isisd: ignore routes with incompatible metric style

3 years agoMerge pull request #7850 from mjstapp/build_dplane_plugin
Donald Sharp [Tue, 12 Jan 2021 13:43:53 +0000 (08:43 -0500)]
Merge pull request #7850 from mjstapp/build_dplane_plugin

zebra: build the sample dataplane plugin

3 years agolibs,nhrpd: remove exec perm
Mark Stapp [Tue, 12 Jan 2021 13:20:10 +0000 (08:20 -0500)]
libs,nhrpd: remove exec perm

Some source files got the exec bit set in a recent commit - undo
that.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7687 from gpnaveen/ospf_p2mp
Russ White [Tue, 12 Jan 2021 13:03:33 +0000 (08:03 -0500)]
Merge pull request #7687 from gpnaveen/ospf_p2mp

tests: Adding ospf p2mp basic test.

3 years agoMerge pull request #7670 from ton31337/fix/bgpd_nexhop_handling_for_zebra
Russ White [Tue, 12 Jan 2021 12:32:19 +0000 (07:32 -0500)]
Merge pull request #7670 from ton31337/fix/bgpd_nexhop_handling_for_zebra

bgpd: Handle IPv6 prefixes with IPv4 nexthops for zebra

3 years agotests: Static route cases with admin dist and tag.
nguggarigoud [Mon, 11 Jan 2021 13:35:05 +0000 (19:05 +0530)]
tests: Static route cases with admin dist and tag.

1. Adding api to verify ip nht command.
2. 5 cases of static routes with admin dist and tag
3. Run time = 89Secs

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agotests: Adding ospf p2mp basic test.
nguggarigoud [Tue, 8 Dec 2020 10:17:40 +0000 (15:47 +0530)]
tests: Adding ospf p2mp basic test.

This test verifies basic p2mp test

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agozebra: add the sample dataplane plugin to the build
Mark Stapp [Mon, 11 Jan 2021 21:33:55 +0000 (16:33 -0500)]
zebra: add the sample dataplane plugin to the build

Build the sample dataplane plugin with debug/dev builds.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agozebra: remove unused local in dplane sample plugin
Mark Stapp [Mon, 11 Jan 2021 21:33:27 +0000 (16:33 -0500)]
zebra: remove unused local in dplane sample plugin

Remove an unused local in the sample dataplane plugin.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7828 from mobash-rasool/pim-fixes-3
Donald Sharp [Mon, 11 Jan 2021 14:51:24 +0000 (09:51 -0500)]
Merge pull request #7828 from mobash-rasool/pim-fixes-3

pimd: SPT-bit is not set to false as per RFC section in one flow

3 years agoMerge pull request #7823 from donaldsharp/zebra_delay_timer
Donatas Abraitis [Mon, 11 Jan 2021 14:46:23 +0000 (16:46 +0200)]
Merge pull request #7823 from donaldsharp/zebra_delay_timer

Zebra delay timer

3 years agoMerge pull request #7847 from opensourcerouting/fix/skip-sr-te-topotest
Donald Sharp [Mon, 11 Jan 2021 14:44:46 +0000 (09:44 -0500)]
Merge pull request #7847 from opensourcerouting/fix/skip-sr-te-topotest

pathd: Skip SR-TE topotests if pathd has been disabled

3 years agoMerge pull request #7830 from volta-networks/misc_fixes_2021
Donatas Abraitis [Mon, 11 Jan 2021 13:18:18 +0000 (15:18 +0200)]
Merge pull request #7830 from volta-networks/misc_fixes_2021

Misc fixes (bgpd, pathd, tools)

3 years agoMerge pull request #7845 from cgoncalves/fix-broken-links
Donatas Abraitis [Mon, 11 Jan 2021 13:06:27 +0000 (15:06 +0200)]
Merge pull request #7845 from cgoncalves/fix-broken-links

Fix BGP and resource certification reference links

3 years agopathd: Skip SR-TE topotests if pathd has been disabled
Sebastien Merle [Mon, 11 Jan 2021 11:48:08 +0000 (12:48 +0100)]
pathd: Skip SR-TE topotests if pathd has been disabled

 * If pathd binary is not found, skip the SR-TE topotests.
 * Fix some compilation warnings when pathd is not built.

Signed-off-by: Sebastien Merle <sebastien@netdef.org>
3 years agodoc: fix reference links
Carlos Goncalves [Mon, 11 Jan 2021 09:42:19 +0000 (10:42 +0100)]
doc: fix reference links

The current securing BGP and resource certification reference links lead
to a page not found. This patch fixes that by pointing to their
corresponding PDF format resources.

Signed-off-by: Carlos Goncalves <cgoncalves@redhat.com>
3 years agobgpd: fix removal of rd vpn export
Emanuele Di Pascale [Thu, 7 Jan 2021 14:23:44 +0000 (15:23 +0100)]
bgpd: fix removal of rd vpn export

a missing '!' operator meant that correct rd strings were being
rejected in the destroy callback, making it impossible to remove
once configured.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agobgpd: fix unsetting of multipath as-set
Emanuele Di Pascale [Thu, 7 Jan 2021 13:46:59 +0000 (14:46 +0100)]
bgpd: fix unsetting of multipath as-set

in the nortbound callback for the boolean leaf multi-path-as-set, the
actual value of the leaf was being ignored. As a result, going from
as-set to no-as-set was having no effect.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agotests: tests for bgpd listing on multiple addresses
Adriano Marto Reis [Sun, 3 Jan 2021 05:02:29 +0000 (15:02 +1000)]
tests: tests for bgpd listing on multiple addresses

* Added a new topotest to test bgpd listening on multiple addresses.
* Updated the existing bgpd tests according to the parameter added to
bgp_master_init.

Signed-off-by: "Adriano Marto Reis" <adrianomarto@gmail.com>
3 years agodoc: Explaining that bgpd can listen on multiple addresses
Adriano Marto Reis [Sun, 3 Jan 2021 04:58:55 +0000 (14:58 +1000)]
doc: Explaining that bgpd can listen on multiple addresses

Updated the documentation clarifying that multiple addresses can be
specifyed via -l option.

Signed-off-by: "Adriano Marto Reis" <adrianomarto@gmail.com>
3 years agobgpd: bgpd listening on multiple addresses
Adriano Marto Reis [Sun, 3 Jan 2021 04:56:48 +0000 (14:56 +1000)]
bgpd: bgpd listening on multiple addresses

Changed bgpd so multiple IP addresses can be specified via -l option.

Signed-off-by: "Adriano Marto Reis" <adrianomarto@gmail.com>
3 years agoMerge pull request #7810 from imzyxwvu/no-deforig
Donatas Abraitis [Mon, 11 Jan 2021 08:09:41 +0000 (10:09 +0200)]
Merge pull request #7810 from imzyxwvu/no-deforig

bgpd: Fix default-originate clearing from peer-groups.

3 years agopimd: SPT-bit is not set to false as per RFC section in one flow
Mobashshera Rasool [Thu, 7 Jan 2021 10:03:07 +0000 (10:03 +0000)]
pimd: SPT-bit is not set to false as per RFC section in one flow

1. As per RFC 4601 Sec 4.5.7:
* JoinDesired(S,G) -> False, set SPTbit to false.

2. Change the debug type.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #7652 from adharkar/frr-vni_switch
Donald Sharp [Sun, 10 Jan 2021 23:44:49 +0000 (18:44 -0500)]
Merge pull request #7652 from adharkar/frr-vni_switch

zebra: L3VNI to L2VNI conversion is not handled

3 years agoMerge pull request #7747 from reubendowle/fixes/nhrpd
Donald Sharp [Sun, 10 Jan 2021 23:43:20 +0000 (18:43 -0500)]
Merge pull request #7747 from reubendowle/fixes/nhrpd

nhrpd fixes

3 years agoMerge pull request #7751 from mobash-rasool/igmp-fixes
Donald Sharp [Sat, 9 Jan 2021 22:40:31 +0000 (17:40 -0500)]
Merge pull request #7751 from mobash-rasool/igmp-fixes

pimd: IGMP conformance 5.10 test case is failing

3 years agoMerge pull request #7753 from mobash-rasool/pim-fixes
Donald Sharp [Sat, 9 Jan 2021 22:36:08 +0000 (17:36 -0500)]
Merge pull request #7753 from mobash-rasool/pim-fixes

pimd: when node changes from non-DR to DR S,G entry not created

3 years agoMerge pull request #7756 from pjdruddy/bgplu-fixes
Donald Sharp [Sat, 9 Jan 2021 20:48:22 +0000 (15:48 -0500)]
Merge pull request #7756 from pjdruddy/bgplu-fixes

Bgplu fixes

3 years agoMerge pull request #7787 from deastoe/fpm-work-ready-fixes
Donald Sharp [Sat, 9 Jan 2021 20:38:46 +0000 (15:38 -0500)]
Merge pull request #7787 from deastoe/fpm-work-ready-fixes

dplane_fpm_nl: routes stuck with 'q' flag (revisited)

3 years agoMerge pull request #7785 from volta-networks/fix_show_pce_confidence_for_pr
Donald Sharp [Sat, 9 Jan 2021 20:36:56 +0000 (15:36 -0500)]
Merge pull request #7785 from volta-networks/fix_show_pce_confidence_for_pr

Add level of confidence to show pcep-session

3 years agoMerge pull request #7775 from vishaldhingra/pim
Donald Sharp [Sat, 9 Jan 2021 20:34:18 +0000 (15:34 -0500)]
Merge pull request #7775 from vishaldhingra/pim

pimd : Added the command to clear the pim bsr data.

3 years agoisisd: ignore routes w/ incompatible metric style
Emanuele Di Pascale [Fri, 8 Jan 2021 14:55:37 +0000 (15:55 +0100)]
isisd: ignore routes w/ incompatible metric style

Currently the transition metric style is redundant because isis will
always read both reachability TLVs regardless of the configured
metric style. Correct this by only considering TLVs matching our
configuration.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agotools: fix pce-config removal
Emanuele Di Pascale [Tue, 22 Dec 2020 17:40:47 +0000 (18:40 +0100)]
tools: fix pce-config removal

make sure that the order in which the pcep-related commands are
removed by frr-reload.py is the correct one, i.e., pce followed
by pce-config followed by pcc.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agopathd, tools: fix peer preference config
Emanuele Di Pascale [Tue, 22 Dec 2020 16:00:39 +0000 (17:00 +0100)]
pathd, tools: fix peer preference config

on one hand, the default value for a peer preference was always being
displayed, and on the other there was some code in frr-reload.py which
was attempting to add a default value to match this behavior, and which
was incorrectly overriding a specified preference. Fix this by removing
this code and making pathd behave like other daemons in this respect,
i.e. not displaying the default value.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agotools: add bfdd to frr-reload.py daemons list
Emanuele Di Pascale [Tue, 22 Dec 2020 17:20:14 +0000 (18:20 +0100)]
tools: add bfdd to frr-reload.py daemons list

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agoMerge pull request #7839 from ton31337/feature/print_large-community_dump
Donald Sharp [Sat, 9 Jan 2021 12:25:59 +0000 (07:25 -0500)]
Merge pull request #7839 from ton31337/feature/print_large-community_dump

bgpd: Print large-community inside bgp_dump_attr()

3 years agoMerge pull request #7835 from donaldsharp/cleanup_support_bundle
Donatas Abraitis [Sat, 9 Jan 2021 07:14:16 +0000 (09:14 +0200)]
Merge pull request #7835 from donaldsharp/cleanup_support_bundle

Cleanup support bundle

3 years agobgpd: Print large-community inside bgp_dump_attr()
Donatas Abraitis [Fri, 8 Jan 2021 14:09:34 +0000 (16:09 +0200)]
bgpd: Print large-community inside bgp_dump_attr()

Missing large communities.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7842 from donaldsharp/wait_for_convergence
Donatas Abraitis [Sat, 9 Jan 2021 07:09:25 +0000 (09:09 +0200)]
Merge pull request #7842 from donaldsharp/wait_for_convergence

tests: Wait for bgp convergence *after* we re-add the interfaces

3 years agoMerge pull request #7836 from volta-networks/fix_isis_net
Donald Sharp [Sat, 9 Jan 2021 04:01:58 +0000 (23:01 -0500)]
Merge pull request #7836 from volta-networks/fix_isis_net

isisd: When last area address is removed, resign if we were DR

3 years agozebra: zebra route-map delay-timer is global not per vrf
Donald Sharp [Wed, 6 Jan 2021 16:29:43 +0000 (11:29 -0500)]
zebra: zebra route-map delay-timer is global not per vrf

The zebra route-map delay timer value is a global value
not a per vrf change.  As such we should only print it
out one time.

We are seeing this:

zebra route-map delay-timer 33
 exit-vrf
zebra route-map delay-timer 33

When we have 2 vrf's configured.

Fix the code to only write it out for the default vrf

Ticket: CM-32888
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Remove uncalled function
Donald Sharp [Wed, 6 Jan 2021 16:13:43 +0000 (11:13 -0500)]
zebra: Remove uncalled function

Remove the dead function zebra_route_map_write_delay_timer

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7803 from ton31337/fix/validate_community_list
Donald Sharp [Sat, 9 Jan 2021 02:05:32 +0000 (21:05 -0500)]
Merge pull request #7803 from ton31337/fix/validate_community_list

bgpd: Validate community list if they are not malformed

3 years agotests: Wait for bgp convergence *after* we re-add the interfaces
Donald Sharp [Fri, 8 Jan 2021 21:52:41 +0000 (16:52 -0500)]
tests: Wait for bgp convergence *after* we re-add the interfaces

In test_bgp_mutli_vrf_topo2.py it's clear that we remove then
re-add the vrf interfaces.  Then the test was immediately
checking to ensure that the routes were available.

BGP needs time to reconverge.  Let's ensure that first.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotools: Cleanup some zebra section of the support bundle
Donald Sharp [Fri, 8 Jan 2021 12:44:42 +0000 (07:44 -0500)]
tools: Cleanup some zebra section of the support bundle

a) Add some useful commands
b) Remove `show error all` this just dumps the error codes.  If
we know the version we don't need this.  Additionally this is
rather large.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotools: Cleanup bgp commands in the support bundle
Donald Sharp [Fri, 8 Jan 2021 12:42:08 +0000 (07:42 -0500)]
tools: Cleanup bgp commands in the support bundle

Add some missing commands ( I am sure that there are more useful ones to )
Cleanup to use the modern non-deprecated syntax in case anyone runs across
this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoisisd: remove two overly verbose LFA debug messages
Renato Westphal [Thu, 10 Dec 2020 23:43:11 +0000 (20:43 -0300)]
isisd: remove two overly verbose LFA debug messages

These two debug messages are so verbose to a point they impact
performance when testing RLFA/TI-LFA on large-scale networks. Remove
them since they aren't really useful.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: fix logging of uninitialized data in the TI-LFA code
Renato Westphal [Tue, 8 Dec 2020 14:54:32 +0000 (11:54 -0300)]
isisd: fix logging of uninitialized data in the TI-LFA code

Always call vid2string() whenever necessary instead of trying to be
too clever and call it only once. The original assumption was that
"buf" only needed to be initialized when LFA debugging was enabled,
but we also need that buffer when logging one error message.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agodoc: document new IS-IS RLFA commands
Renato Westphal [Tue, 8 Dec 2020 00:15:55 +0000 (21:15 -0300)]
doc: document new IS-IS RLFA commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agotests: add IS-IS RLFA topotest
Renato Westphal [Mon, 7 Dec 2020 16:17:42 +0000 (13:17 -0300)]
tests: add IS-IS RLFA topotest

Add new RLFA topotest that tests all RLFA configuration knobs and
how isisd and ldpd react to various configuration changes that can
occur in the network.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agotests: add remote LFA unit tests
Renato Westphal [Tue, 1 Dec 2020 03:12:08 +0000 (00:12 -0300)]
tests: add remote LFA unit tests

Extend the existing SPF unit testing infrastructure so that it can
test RLFA as well.

These new unit tests are useful to test the RLFA PQ node
computation on several different network topologies in a timely
manner. Artificial LDP labels (starting from 50000) are used to
activate the computed RLFAs.

It's worth mentioning that the computed backup routing tables
contain both local LFAs and remote LFAs, as running RLFA separately
isn't possible.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: implement Remote LFA
Renato Westphal [Thu, 26 Nov 2020 02:39:09 +0000 (23:39 -0300)]
isisd: implement Remote LFA

Remote LFA (RFC 7490) is an extension to the base LFA mechanism
that uses dynamically determined tunnels to extend the IP-FRR
protection coverage.

RLFA is similar to TI-LFA in that it computes a post-convergence
SPT (with the protected interface pruned from the network topology)
and the P/Q spaces based on that SPT. There are a few differences
however:
* RLFAs can push at most one label, so the P/Q spaces need to
  intersect otherwise the destination can't be protected (the
  protection coverage is topology dependent).
* isisd needs to interface with ldpd to obtain the labels it needs to
  create a tunnel to the PQ node. That interaction needs to be done
  asynchronously to prevent blocking the daemon for too long. With
  TI-LFA all required labels are already available in the LSPDB.

RLFA and TI-LFA have more similarities than differences though,
and thanks to that both features share a lot of code.

Limitations:
* Only RLFA link protection is implemented. The algorithm used
  to find node-protecting RLFAs (RFC 8102) is too CPU intensive and
  doesn't always work. Most vendors implement RLFA link protection
  only.
* RFC 7490 says it should be a local matter whether the repair path
  selection policy favors LFA repairs over RLFA repairs. It might be
  desirable, for instance, to prefer RLFAs that satisfy the downstream
  condition over LFAs that don't. In this implementation, however,
  RLFAs are only computed for destinations that can't be protected
  by local LFAs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoyang, isisd: add RLFA nodes, skeleton callbacks and CLI commands
Renato Westphal [Thu, 26 Nov 2020 00:01:14 +0000 (21:01 -0300)]
yang, isisd: add RLFA nodes, skeleton callbacks and CLI commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: fix LFA command to use correct operations
Renato Westphal [Sun, 6 Dec 2020 01:10:54 +0000 (22:10 -0300)]
isisd: fix LFA command to use correct operations

The "load-sharing" node is a boolean leaf that has a default
value. As such, it doesn't make sense to either create or delete
it. That node always exists in the configuration tree. Its value
should only be modified. Change the corresponding CLI wrapper
command to reflect that fact.

This commit doesn't introduce any change of behavior as the NB API
maps create/destroy edit operations to modify operations whenever
that makes sense. However it's better to not rely on that behavior
and always use the correct operations in the CLI commands.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoldpd: add support for RLFA clients
Renato Westphal [Sun, 6 Dec 2020 00:45:52 +0000 (21:45 -0300)]
ldpd: add support for RLFA clients

Add an API that allows IGP client daemons to register/unregister
RLFAs with ldpd.

IGP daemons need to be able to query the LDP labels needed by RLFAs
and monitor label updates that might affect those RLFAs. This is
similar to the NHT mechanism used by bgpd to resolve and monitor
recursive nexthops.

This API is based on the following ZAPI opaque messages:
* LDP_RLFA_REGISTER: used by IGP daemons to register an RLFA with ldpd.
* LDP_RLFA_UNREGISTER_ALL: used by IGP daemons to unregister all of
  their RLFAs with ldpd.
* LDP_RLFA_LABELS: used by ldpd to send RLFA labels to the registered
  clients.

For each RLFA, ldpd needs to return the following labels:
* Outer label(s): the labels advertised by the adjacent routers to
  reach the PQ node;
* Inner label: the label advertised by the PQ node to reach the RLFA
  destination.

For the inner label, ldpd automatically establishes a targeted
neighborship with the PQ node if one doesn't already exist. For that
to work, the PQ node needs to be configured to accept targeted hello
messages. If that doesn't happen, ldpd doesn't send a response to
the IGP client daemon which in turn won't be able to activate the
previously computed RLFA.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoldpd: detect when route received from zebra hasn't changed
Renato Westphal [Sat, 5 Dec 2020 20:10:04 +0000 (17:10 -0300)]
ldpd: detect when route received from zebra hasn't changed

Add some code to detect when a route received from zebra hasn't
changed and ignore the notification in that case, preventing ldpd
from sending unnecessary label mappings.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoMerge pull request #7816 from pjdruddy/revert_labelmanager_statics
Renato Westphal [Fri, 8 Jan 2021 23:57:25 +0000 (20:57 -0300)]
Merge pull request #7816 from pjdruddy/revert_labelmanager_statics

Revert labelmanager statics

3 years agoMerge pull request #7838 from ton31337/fix/force_updates_on_reset_out
Donald Sharp [Fri, 8 Jan 2021 22:34:37 +0000 (17:34 -0500)]
Merge pull request #7838 from ton31337/fix/force_updates_on_reset_out

bgpd: Force BGP updates when triggering reset out

3 years agoospfd: Adding authentication details to ospf interafce command o/p
rgirada [Mon, 14 Dec 2020 16:23:11 +0000 (08:23 -0800)]
ospfd: Adding authentication details to ospf interafce command o/p

Description:
Display configured ospf authentication details in
"show ip ospf interface" command o/p.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agobgpd: Force BGP updates when triggering reset out
Donatas Abraitis [Fri, 8 Jan 2021 15:03:39 +0000 (17:03 +0200)]
bgpd: Force BGP updates when triggering reset out

When adding/removing some peer's flag we need to make sure we FORCE updates
to avoid suppressing critical updates.

Like entering `no neighbor x.x.x.x send-community large` would suppress
updates by default and another side will have stale large communities.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoisisd: When last area address is removed, resign if we were DR
Karen Schoener [Tue, 5 Jan 2021 21:27:32 +0000 (16:27 -0500)]
isisd: When last area address is removed, resign if we were DR

When last area address is removed, resign if we were DR.

This fixes an issue where: when the ISIS area address is changed, ISIS fails
to elect a new DR.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agoMerge pull request #7833 from donaldsharp/gr_tests
Donatas Abraitis [Fri, 8 Jan 2021 13:01:45 +0000 (15:01 +0200)]
Merge pull request #7833 from donaldsharp/gr_tests

tests: Fix gr_tests

3 years agopimd : Added the command to clear the pim bsr data.
vdhingra [Mon, 21 Dec 2020 10:24:11 +0000 (02:24 -0800)]
pimd : Added the command to clear the pim bsr data.

This command has been added in the context of
PIM BSM functionality. This command will clear the
data structs having bsr information.

Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
3 years agoMerge pull request #7834 from donaldsharp/bgp_announce
Donatas Abraitis [Fri, 8 Jan 2021 12:08:22 +0000 (14:08 +0200)]
Merge pull request #7834 from donaldsharp/bgp_announce

Bgp announce

3 years agobgpd: Move afi indepedent code outside of checks for it
Donald Sharp [Fri, 8 Jan 2021 00:24:13 +0000 (19:24 -0500)]
bgpd: Move afi indepedent code outside of checks for it

In bgp_zebra_announce we do work to apply the table map.
This is the same for both v4 and v6 but we have the code
duplicated in both v4 and v6 if statements.  Move outside
to reduce the duplications.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Combine two subsuquent if (debug..) statements
Donald Sharp [Fri, 8 Jan 2021 00:03:54 +0000 (19:03 -0500)]
bgpd: Combine two subsuquent if (debug..) statements

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Remove redundant checks in bgp_zebra_announce()
Donald Sharp [Thu, 7 Jan 2021 23:54:34 +0000 (18:54 -0500)]
bgpd: Remove redundant checks in bgp_zebra_announce()

BGP has created some redundant checks in bgp_zebra_announce()
Reduce the multiple if statements and consolidate a bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Fix gr_tests
Donald Sharp [Thu, 7 Jan 2021 22:30:04 +0000 (17:30 -0500)]
tests: Fix gr_tests

The bgp_gr_functionality_topo1 test was shutting down an
interface on r2 and then trying to bring it up on r1.
Hijinx ensued.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7749 from wesleycoakley/bgpd-large-community-format-fix
Donatas Abraitis [Thu, 7 Jan 2021 08:33:59 +0000 (10:33 +0200)]
Merge pull request #7749 from wesleycoakley/bgpd-large-community-format-fix

bgpd: reject malformed large-communities

3 years agoMerge pull request #7824 from opensourcerouting/snap-libyang1-fix
Donatas Abraitis [Thu, 7 Jan 2021 08:28:19 +0000 (10:28 +0200)]
Merge pull request #7824 from opensourcerouting/snap-libyang1-fix

Snapcraft Fixes

3 years agoMerge pull request #7817 from donaldsharp/random
Donatas Abraitis [Thu, 7 Jan 2021 08:24:11 +0000 (10:24 +0200)]
Merge pull request #7817 from donaldsharp/random

Random cleanup/fixes

3 years agosnapcraft: Update rtrlib to 0.7.0
Martin Winter [Thu, 7 Jan 2021 01:16:19 +0000 (02:16 +0100)]
snapcraft: Update rtrlib to 0.7.0

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agosnapcraft: Fix passthrough path for Libyang 1.x
Martin Winter [Thu, 7 Jan 2021 01:14:52 +0000 (02:14 +0100)]
snapcraft: Fix passthrough path for Libyang 1.x

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #7820 from kuldeepkash/topojson_framework
Donald Sharp [Wed, 6 Jan 2021 13:59:34 +0000 (08:59 -0500)]
Merge pull request #7820 from kuldeepkash/topojson_framework

tests: [topojson]Add/Enhance framework to support PIM automation

3 years agobgpd: separate lcommunity validation from tokenizer
Wesley Coakley [Tue, 5 Jan 2021 09:22:57 +0000 (04:22 -0500)]
bgpd: separate lcommunity validation from tokenizer

`lcommunity_gettoken` expects a space-delimeted list of 0 or more large
communities. `lcommunity_list_valid` can perform this check.
`lcommunity_list_valid` now validates large community lists more
accurately based on the following condition: Each quantity in a standard bgp
large community must:

1. Contain at least one digit
2. Fit within 4 octets
3. Contain only digits unless the lcommunity is "expanded"
4. Contain a valid regex if the lcommunity is "expanded"

Moreover we validate that each large community list contains exactly 3
such values separated by a single colon each.

One quirk of our validation which is worth documenting is:

```
bgp large-community-list standard test2 permit 1:c:3
bgp large-community-list expanded test1 permit 1:c:3
```

The first line will throw an error complaining about a "malformed community-list
value". The second line will be accepted because the each value is each treated as
a regex when matching large communities, it simply will never match anything so
it's rather useless.

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agoMerge pull request #7815 from ckishimo/pytests
Donatas Abraitis [Wed, 6 Jan 2021 07:08:35 +0000 (09:08 +0200)]
Merge pull request #7815 from ckishimo/pytests

tests: fix typos and remove duplicate output

3 years agotests: [topojson]Enhance lib/topojson.py to support PIM automation
kuldeepkash [Wed, 6 Jan 2021 05:13:05 +0000 (05:13 +0000)]
tests: [topojson]Enhance lib/topojson.py to support PIM automation

1. Enhanced lib/topojson.py for creating topologies with switches and routers
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
3 years agotests: [topojson]Enhance lib/common_config.py to support PIM automation
kuldeepkash [Wed, 6 Jan 2021 05:08:31 +0000 (05:08 +0000)]
tests: [topojson]Enhance lib/common_config.py to support PIM automation

1. Enhanced lib/common_config.py for common configuration/verification needed
   for PIM automation
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
3 years agotests: [topojson]Add lib/pim.py to support PIM automation
kuldeepkash [Wed, 6 Jan 2021 05:05:30 +0000 (05:05 +0000)]
tests: [topojson]Add lib/pim.py to support PIM automation

1. Added lib/pim.py for PIM configuration/verification
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
3 years agobgpd: Cleanup debugs for bgp_zebra_route_notify_owner
Donald Sharp [Tue, 5 Jan 2021 20:22:57 +0000 (15:22 -0500)]
bgpd: Cleanup debugs for bgp_zebra_route_notify_owner

User %pRN as well as add some more debugs for other
interesting cases.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Allow more detailed knowledge of bgp's internal state
Donald Sharp [Tue, 5 Jan 2021 20:03:02 +0000 (15:03 -0500)]
bgpd: Allow more detailed knowledge of bgp's internal state

When bgp is using wait for install semantics it would be nice
to be able to debug it when it is running.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopathd: Convert to use our internal frr_weak_random
Donald Sharp [Tue, 5 Jan 2021 16:10:19 +0000 (11:10 -0500)]
pathd: Convert to use our internal frr_weak_random

rand() should not be used, we should be using the frr_weak_random()
call instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: fix typos
ckishimo [Tue, 5 Jan 2021 15:55:59 +0000 (16:55 +0100)]
tests: fix typos

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoMerge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-Fixes
Mark Stapp [Tue, 5 Jan 2021 18:54:06 +0000 (13:54 -0500)]
Merge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-Fixes

pbrd: pbr ipv4/ipv6 match fixes

3 years agotests: add test for labelmanager plugin
Pat Ruddy [Tue, 5 Jan 2021 17:18:39 +0000 (17:18 +0000)]
tests: add test for labelmanager plugin

An external label manager plugin may want to use the following
functions:
    - create_label_chunk
    - assign_label_chunk
    - delete_label_chunk
    - release_label_chunk
This test ensures that they are externally visible.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agozebra: expose label-manager util-funcs
Pat Ruddy [Tue, 5 Jan 2021 12:32:26 +0000 (12:32 +0000)]
zebra: expose label-manager util-funcs

Revert "zebra: unexpose label-manager util-funcs as static"
This reverts commit d3d9639d9a2251aa519b5399706ce816982001a1.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agobgpd: Use neighbor_events instead of debug_update for route-refresh msg
Donatas Abraitis [Thu, 19 Nov 2020 20:22:43 +0000 (22:22 +0200)]
bgpd: Use neighbor_events instead of debug_update for route-refresh msg

This was somewhy under bgp_debug_udpate() guard and others are under
bgp_debug_neighbor_events().

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>