]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agopathd: fix render candidate-path bandwidth
Emanuele Di Pascale [Tue, 18 May 2021 13:52:44 +0000 (15:52 +0200)]
pathd: fix render candidate-path bandwidth

the config for dynamic candidate paths with bandwidth preferences
was using a different order of keywords (required bandwidth X) than
the corresponding command (bandwidth X required). This confuses
frr-reload, and possibly users too. Make both use the same order.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agoMerge pull request #8748 from idryzhov/ospf6-vrf-unlink
Mark Stapp [Tue, 1 Jun 2021 16:06:08 +0000 (12:06 -0400)]
Merge pull request #8748 from idryzhov/ospf6-vrf-unlink

ospf6d: unlink router from vrf on deletion

3 years agoMerge pull request #8683 from kuldeepkash/bgp_gshut
Russ White [Tue, 1 Jun 2021 15:43:48 +0000 (11:43 -0400)]
Merge pull request #8683 from kuldeepkash/bgp_gshut

tests: Add bgp_gshut_topo1 test suite

3 years agoMerge pull request #8769 from ton31337/fix/time_to_remove
Igor Ryzhov [Tue, 1 Jun 2021 14:45:25 +0000 (17:45 +0300)]
Merge pull request #8769 from ton31337/fix/time_to_remove

lib: Time to remove CONFDATE block

3 years agolib: Time to remove CONFDATE block
Donatas Abraitis [Tue, 1 Jun 2021 07:07:58 +0000 (10:07 +0300)]
lib: Time to remove CONFDATE block

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8698 from donaldsharp/pim_black_tests
Donatas Abraitis [Tue, 1 Jun 2021 06:41:04 +0000 (09:41 +0300)]
Merge pull request #8698 from donaldsharp/pim_black_tests

tests: Fixup some pylint warnings in test_multicast_pim_sm_topo2.py

3 years agoMerge pull request #8768 from idryzhov/doc-index
Rafael Zalamena [Mon, 31 May 2021 19:54:41 +0000 (16:54 -0300)]
Merge pull request #8768 from idryzhov/doc-index

doc: fix redundant index once again

3 years agodoc: fix redundant index once again
Igor Ryzhov [Mon, 31 May 2021 15:29:34 +0000 (18:29 +0300)]
doc: fix redundant index once again

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #6317 from rgirada/fix_route_dump
Rafael Zalamena [Fri, 28 May 2021 21:12:17 +0000 (18:12 -0300)]
Merge pull request #6317 from rgirada/fix_route_dump

zebrad: Added a command to dump routes in support bundle

3 years agoMerge pull request #8752 from pjdruddy/ospf6-route-mem-leak
Igor Ryzhov [Fri, 28 May 2021 17:43:07 +0000 (20:43 +0300)]
Merge pull request #8752 from pjdruddy/ospf6-route-mem-leak

ospf6: fix memory leak in ospf6_abr_examin_summary

3 years agoMerge pull request #8740 from mjstapp/fix_static_ret
Igor Ryzhov [Fri, 28 May 2021 08:35:43 +0000 (11:35 +0300)]
Merge pull request #8740 from mjstapp/fix_static_ret

staticd: return meaningful status in cli error path

3 years agoMerge pull request #8747 from LabNConsulting/chopps/improve-grpc-req-checks
David Lamparter [Thu, 27 May 2021 18:50:17 +0000 (20:50 +0200)]
Merge pull request #8747 from LabNConsulting/chopps/improve-grpc-req-checks

grpc: improve checks for GRPC C++ requirements

3 years agoMerge pull request #8174 from mjstapp/backup_nht
Stephen Worley [Thu, 27 May 2021 13:49:41 +0000 (09:49 -0400)]
Merge pull request #8174 from mjstapp/backup_nht

zebra: hide backup-nexthop activations in nht

3 years agoMerge pull request #8753 from idryzhov/fix-labn-ci
Lou Berger [Thu, 27 May 2021 13:45:52 +0000 (09:45 -0400)]
Merge pull request #8753 from idryzhov/fix-labn-ci

Fix LabN CI

3 years agostaticd: return SUCCESS when deleting non-existent route
Mark Stapp [Wed, 26 May 2021 18:30:51 +0000 (14:30 -0400)]
staticd: return SUCCESS when deleting non-existent route

Return SUCCESS if trying to delete route that doesn't exist.
This was always staticd's behavior before the northbound
conversion.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodocker: fix ubuntu containers
Igor Ryzhov [Thu, 27 May 2021 12:57:03 +0000 (15:57 +0300)]
docker: fix ubuntu containers

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "build: libyangv2 is mainlined, update"
Igor Ryzhov [Thu, 27 May 2021 12:56:06 +0000 (15:56 +0300)]
Revert "build: libyangv2 is mainlined, update"

This partially reverts commit 250335d47cc338fa1951494a9b78bf429016a7e5.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agogrpc: improve checks for GRPC C++ requirements
Christian Hopps [Thu, 20 May 2021 06:46:34 +0000 (06:46 +0000)]
grpc: improve checks for GRPC C++ requirements

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoospf6: fix memory leak in ospf6_abr_examin_summary
Pat Ruddy [Tue, 25 May 2021 08:38:26 +0000 (09:38 +0100)]
ospf6: fix memory leak in ospf6_abr_examin_summary

Ensure that if allocated route is not added to a table then it is
deleted to avoid leaking memory.
Add a new memory type for route table so that ospf6 routes can be
distinguished in the show memory output in isolation.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: unlink router from vrf on deletion
Igor Ryzhov [Thu, 27 May 2021 10:16:40 +0000 (13:16 +0300)]
ospf6d: unlink router from vrf on deletion

Otherwise `ospf6_lookup_by_vrf_id` returns stale pointer.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8751 from LabNConsulting/chopps/ly2-mainline
Igor Ryzhov [Thu, 27 May 2021 11:34:26 +0000 (14:34 +0300)]
Merge pull request #8751 from LabNConsulting/chopps/ly2-mainline

build: libyangv2 is mainlined, update

3 years agoMerge pull request #8679 from louis-oui/bgp-summary-filter
Donatas Abraitis [Thu, 27 May 2021 10:57:14 +0000 (13:57 +0300)]
Merge pull request #8679 from louis-oui/bgp-summary-filter

bgpd: add show bgp summary filter by neighbor or AS

3 years agobuild: libyangv2 is mainlined, update
Christian Hopps [Thu, 27 May 2021 10:28:01 +0000 (10:28 +0000)]
build: libyangv2 is mainlined, update

Signed-off-by: Christian Hopps <chopps@gmail.com>
3 years agoMerge pull request #8738 from gromit1811/bugfix_ospf6_set_tag
Igor Ryzhov [Thu, 27 May 2021 07:07:13 +0000 (10:07 +0300)]
Merge pull request #8738 from gromit1811/bugfix_ospf6_set_tag

ospf6d: Fix route map "set tag" command

3 years agoMerge pull request #8707 from LabNConsulting/chopps/improve-grpc-req-checks
Quentin Young [Wed, 26 May 2021 20:11:53 +0000 (20:11 +0000)]
Merge pull request #8707 from LabNConsulting/chopps/improve-grpc-req-checks

3 years agoMerge pull request #8736 from idryzhov/fix-ospf6-debug
Rafael Zalamena [Wed, 26 May 2021 18:25:08 +0000 (15:25 -0300)]
Merge pull request #8736 from idryzhov/fix-ospf6-debug

ospf6d: fix debug message issues

3 years agoMerge pull request #8732 from idryzhov/fix-ospf6d-crashes
Mark Stapp [Wed, 26 May 2021 15:32:33 +0000 (11:32 -0400)]
Merge pull request #8732 from idryzhov/fix-ospf6d-crashes

ospf6d: fix possible crashes

3 years agobgpd: add show bgp summary filter by neighbor or AS
Louis Scalbert [Wed, 12 May 2021 15:17:56 +0000 (17:17 +0200)]
bgpd: add show bgp summary filter by neighbor or AS

Add ability to filter session on show bgp summary by neighbor or
remote AS:

ubuntu# show bgp summary ?
  neighbor     Show only the specified neighbor session
  remote-as    Show only the specified remote AS session
ubuntu# show bgp summary neighbor ?
  A.B.C.D   Neighbor to display information about
  WORD      Neighbor on BGP configured interface
  X:X::X:X  Neighbor to display information about
ubuntu# show bgp summary remote-as ?
  (1-4294967295)  AS number
  external        External (eBGP) AS sessions
  internal        Internal (iBGP) AS sessions

This patch includes the documentation and the topotest.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 years agoospf6d: Fix route map "set tag" command
Martin Buck [Wed, 26 May 2021 14:03:51 +0000 (16:03 +0200)]
ospf6d: Fix route map "set tag" command

So far, "set tag" was 99% implemented in ospf6d, but registration of the
hook functions was missing, causing "set tag" actions in route maps to be
ignored in ospf6d.

This commit adds the missing hook registration.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
3 years agoMerge pull request #8730 from idryzhov/staticd-distance
Mark Stapp [Wed, 26 May 2021 11:40:35 +0000 (07:40 -0400)]
Merge pull request #8730 from idryzhov/staticd-distance

staticd: fix distance processing

3 years agoospf6d: fix debug message config write
Igor Ryzhov [Wed, 26 May 2021 08:48:09 +0000 (11:48 +0300)]
ospf6d: fix debug message config write

Fix the following issues:
- if "send" is combined with "recv-hdr", only "send" is shown
- if "recv" is combined with "send-hdr", only "recv" is shown
- if both "send-hdr" and "recv-hdr" are enabled, "; header only" is shown

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: fix invalid "no debug ospf6 message unknown"
Igor Ryzhov [Wed, 26 May 2021 08:45:07 +0000 (11:45 +0300)]
ospf6d: fix invalid "no debug ospf6 message unknown"

The message is always shown in the config, because IS_OSPF6_DEBUG_MESSAGE
works incorrectly when negated because of missing outer brackets.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8726 from donaldsharp/possible_ospf_fix
Martin Winter [Wed, 26 May 2021 00:38:43 +0000 (02:38 +0200)]
Merge pull request #8726 from donaldsharp/possible_ospf_fix

ospfd: Fix quick interface down up event handling in ospf

3 years agoospf6d: fix possible crashes
Igor Ryzhov [Tue, 25 May 2021 18:58:55 +0000 (21:58 +0300)]
ospf6d: fix possible crashes

OSPF6 instance may not exist when processing interface state change.
Do not execute processing steps that require an instance if an area is
not configured for an interface.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: Fix quick interface down up event handling in ospf
Donald Sharp [Mon, 24 May 2021 17:45:29 +0000 (13:45 -0400)]
ospfd: Fix quick interface down up event handling in ospf

When we get this sequence of events:

- zebra receives interface up, sends to ospf
- ospf receives intf up, processes( including neighbor formation and spf )
  and sends route to zebra for installation.
- zebra receives route for processing, schedules it too happen in the future
- zebra receives interface down event, sends to ospf
- zebra processes route X and marks it inactive because nexthop
  interface is down
- zebra receives interface up event, sends to ospf
- ospf receives both events and processes the change and decides
  that nothing has changed so it does not send any route change for X to zebra.

At this point zebra has a route from ospf that is marked as inactive, while
ospf believes that the route should be installed properly.

Modify the code such that on an interface down event, ospf marks the routes
as changed if the ifindex is being used for a nexthop, so that when ospf
is deciding if routes have changed post spf that it can just automatically
send that route down again if it still exists.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8675 from wesleycoakley/pbr-table-range-core-fix
Mark Stapp [Tue, 25 May 2021 18:09:41 +0000 (14:09 -0400)]
Merge pull request #8675 from wesleycoakley/pbr-table-range-core-fix

pbrd: implement sparse table lookup for nhg cache

3 years agoMerge pull request #8694 from chiragshah6/evpn_dev1
Russ White [Tue, 25 May 2021 15:37:41 +0000 (11:37 -0400)]
Merge pull request #8694 from chiragshah6/evpn_dev1

tools: fix bgp peer-group deconfiguration in frr-reload

3 years agoMerge pull request #8718 from taspelund/fix_pfx-tree_default
Rafael Zalamena [Tue, 25 May 2021 15:31:03 +0000 (12:31 -0300)]
Merge pull request #8718 from taspelund/fix_pfx-tree_default

lib: fix handling of rmap prefix-tree default node

3 years agoMerge pull request #8723 from mjstapp/fix_show_werror
Quentin Young [Tue, 25 May 2021 15:29:14 +0000 (15:29 +0000)]
Merge pull request #8723 from mjstapp/fix_show_werror

build: display Werror in configure output, if configured

3 years agostaticd: fix distance processing
Igor Ryzhov [Tue, 25 May 2021 12:49:46 +0000 (15:49 +0300)]
staticd: fix distance processing

When the user adds the route + nexthop pair that already exists with a
different distance, we should replace it instead of adding a new one.

Likewise, when the user wants to delete the route + nexthop pair without
explicitly entering the distance, we should delete the route.

Fixes #8695.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8719 from LabNConsulting/chopps/fix-bgp-default
Russ White [Tue, 25 May 2021 11:26:49 +0000 (07:26 -0400)]
Merge pull request #8719 from LabNConsulting/chopps/fix-bgp-default

bgpd: fix default for extended-nexthop-capability

3 years agoMerge pull request #8724 from idryzhov/doc-no-fix
Russ White [Tue, 25 May 2021 11:25:53 +0000 (07:25 -0400)]
Merge pull request #8724 from idryzhov/doc-no-fix

doc: remove "no" commands

3 years agotools: fix peer-group deletion in frr-reload
Chirag Shah [Sun, 16 May 2021 02:41:43 +0000 (19:41 -0700)]
tools: fix peer-group deletion in frr-reload

All of peers and respective configs are wiped out when
pee-group is removed.

In an attempt to remove peer-group and its associated peers
configs via frr-reload fails if the peer-group is removed first.

To pass the peer-group config removal via frr-reload following
steps are taken:
Find the bgp context to which peer-group belongs.
Find the peer-group associated peer(s) and store them in a list.
Remove the peers config lines from the pending list.
Move the peer-group deletion line to end of the pending list so
any remaining peer-group associated config can be removed successfully.

The above steps take 3 iterations over the pending list and scales
linearly.

Ticket:2656351
Reviewed By:CCR-11575
Testing Done:

Broken:

config:
router bgp 5544
 neighbor PG1 peer-group
 neighbor PG1 remote-as external
 neighbor swp10 interface peer-group PG1
 neighbor swp10 timers 3 9

failed frr-reload log:
2021-05-17 22:02:42,608  INFO: Executed "router bgp 5544  no neighbor
PG1 peer-group"
2021-05-17 22:02:42,708  INFO: Failed to execute router bgp 5544  no
neighbor PG1 remote-as external
2021-05-17 22:02:42,808  INFO: Failed to execute router bgp 5544  no
neighbor PG1 remote-as
2021-05-17 22:02:42,906  INFO: Failed to execute router bgp 5544  no
neighbor PG1
2021-05-17 22:02:43,007  INFO: Failed to execute router bgp 5544  no
neighbor
2021-05-17 22:02:43,106  INFO: Failed to execute router bgp 5544  no
2021-05-17 22:02:43,106 ERROR: "router bgp 5544 --  no" we failed to
remove this command
2021-05-17 22:02:43,107 ERROR: % Create the peer-group or interface
first

With fix:
2021-05-17 22:05:27,687  INFO: Executed "router bgp 5544  no neighbor
PG1 remote-as external"
2021-05-17 22:05:27,791  INFO: Executed "router bgp 5544  no neighbor
PG1 peer-group"

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agoMerge pull request #8722 from opensourcerouting/ospfv3-asan-crash
Donald Sharp [Mon, 24 May 2021 16:53:03 +0000 (12:53 -0400)]
Merge pull request #8722 from opensourcerouting/ospfv3-asan-crash

ospf6d: fix address sanitizer crash

3 years agoMerge pull request #8720 from idryzhov/fix-vrf-newline
Mark Stapp [Mon, 24 May 2021 15:40:24 +0000 (11:40 -0400)]
Merge pull request #8720 from idryzhov/fix-vrf-newline

lib: fix missing newline

3 years agodoc: remove "no" commands
Igor Ryzhov [Mon, 24 May 2021 15:38:48 +0000 (18:38 +0300)]
doc: remove "no" commands

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8498 from ton31337/feature/opaque_data_void_zebra
Mark Stapp [Mon, 24 May 2021 11:48:02 +0000 (07:48 -0400)]
Merge pull request #8498 from ton31337/feature/opaque_data_void_zebra

Zebra OPAQUE data from other daemons stuff

3 years agoospf6d: fix address sanitizer crash
Rafael Zalamena [Mon, 24 May 2021 11:30:26 +0000 (08:30 -0300)]
ospf6d: fix address sanitizer crash

Don't `memcpy` a `struct prefix` the memory size varies depending on the
original intended type. In this case the original type was (casted away)
`struct prefix_ipv6` and we tried to copy `struct prefix` which is
bigger.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #8716 from idryzhov/fix-commands
Donald Sharp [Mon, 24 May 2021 10:49:12 +0000 (06:49 -0400)]
Merge pull request #8716 from idryzhov/fix-commands

Fix a couple of CLI commands

3 years agolib: fix missing newline
Igor Ryzhov [Mon, 24 May 2021 10:26:49 +0000 (13:26 +0300)]
lib: fix missing newline

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix default for extended-nexthop-capability
Christian Hopps [Sun, 23 May 2021 20:26:49 +0000 (20:26 +0000)]
bgpd: fix default for extended-nexthop-capability

The default for extended-nexthop-capability is true for
unnumbered (interface) neighbors, false for other types. Break the inner
grouping out of the outer neighbor-parameters grouping so that we can
refine the default in that uses case.

Signed-off-by: Christian Hopps <chopps@gmail.com>
3 years agogrpc: improve checks for GRPC C++ requirements
Christian Hopps [Thu, 20 May 2021 06:46:34 +0000 (06:46 +0000)]
grpc: improve checks for GRPC C++ requirements

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agolib: fix handling of rmap prefix-tree default node
Trey Aspelund [Fri, 21 May 2021 22:04:15 +0000 (22:04 +0000)]
lib: fix handling of rmap prefix-tree default node

Prior to this commit, updating a prefix-list that is referenced by a
route-map clause will unconditionally delete the root node of that
route-map's prefix-tree (used with route-map optimization).
This is problematic because routes not matching a more specific node
in the tree (i.e. other prefix-list sequences) will not fall-back to
the default node, thus they will not hit any route-map sequences.
This commit ensures that an update to a prefix-list will only delete
the default node while adding the first/only seq to the list.

Example config:
========
ip prefix-list peer475-out-pfxlist seq 45 permit 2.138.0.0/16
ip prefix-list peer475-out-pfxlist seq 50 permit 0.0.0.0/0
!
route-map peer475-out permit 5
 match ip address prefix-list peer475-out-pfxlist

Before:
========
ub20# do show route-map peer475-out prefix-table
ZEBRA:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5
IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________
BGP:
IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5
    2.138.0.0/16 (2)
(P) 0.0.0.0/0
                                                      peer475-out seq 5
IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________
ub20# conf t
ub20(config)# ip prefix-list peer475-out-pfxlist seq 45 permit 2.138.0.0/16 le 32
ub20(config)# do show route-map peer475-out prefix-table
ZEBRA:
IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    2.138.0.0/16 (2)
(P)
                                                      peer475-out seq 5
IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________
BGP:
IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    2.138.0.0/16 (2)
(P)
                                                      peer475-out seq 5
IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________
ub20(config)#

After:
========
ub20(config)# do show route-map peer475-out prefix-table
ZEBRA:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5

IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________

BGP:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5

IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________

ub20(config)# ip prefix-list peer475-out-pfxlist seq 45 permit 2.138.0.0/16 le 32
ub20(config)# do show route-map peer475-out prefix-table
ZEBRA:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5

IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________

BGP:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5

IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________

ub20(config)#

Fixes: 8410
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
3 years agoisisd: fix missing VRF parameter
Igor Ryzhov [Fri, 21 May 2021 17:13:51 +0000 (20:13 +0300)]
isisd: fix missing VRF parameter

It was incorrectly removed in 1cbf96a.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix aggregate-address command
Igor Ryzhov [Fri, 21 May 2021 17:10:41 +0000 (20:10 +0300)]
bgpd: fix aggregate-address command

Additional parameters are not mandatory.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8687 from opensourcerouting/bgp-fix-mcast
Igor Ryzhov [Fri, 21 May 2021 15:56:26 +0000 (18:56 +0300)]
Merge pull request #8687 from opensourcerouting/bgp-fix-mcast

yang: fix BGP multicast prefix specification

3 years agoMerge pull request #8671 from donaldsharp/pim_possible_crash
Jafar Al-Gharaibeh [Fri, 21 May 2021 15:16:03 +0000 (10:16 -0500)]
Merge pull request #8671 from donaldsharp/pim_possible_crash

Pim possible crash

3 years agoMerge pull request #8705 from donaldsharp/ospf_sr_topo1_speedup
Donatas Abraitis [Fri, 21 May 2021 11:30:34 +0000 (14:30 +0300)]
Merge pull request #8705 from donaldsharp/ospf_sr_topo1_speedup

tests: Speedup ospf_sr_topo1 by over 100 seconds

3 years agoMerge pull request #8701 from ton31337/feature/show_ip_bgp_alias
Donald Sharp [Fri, 21 May 2021 11:23:10 +0000 (07:23 -0400)]
Merge pull request #8701 from ton31337/feature/show_ip_bgp_alias

bgpd: Show BGP prefixes by community alias

3 years agoyang: fix BGP multicast prefix type
Rafael Zalamena [Fri, 21 May 2021 10:42:46 +0000 (07:42 -0300)]
yang: fix BGP multicast prefix type

Fix many of the commands in the `address-family ipv4 multicast` to use
the proper type to avoid wrong YANG model validation failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoyang: move multicast prefix type definition
Rafael Zalamena [Fri, 21 May 2021 10:42:01 +0000 (07:42 -0300)]
yang: move multicast prefix type definition

Move the multicast prefix type to a common YANG model so other models
can use it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #8709 from dslicenc/ospf-intf-area
Igor Ryzhov [Fri, 21 May 2021 08:10:29 +0000 (11:10 +0300)]
Merge pull request #8709 from dslicenc/ospf-intf-area

ospfd: "ip ospf area" command can select wrong process

3 years agoMerge pull request #8662 from idryzhov/fix-check-linux-vrf
Donatas Abraitis [Fri, 21 May 2021 07:03:21 +0000 (10:03 +0300)]
Merge pull request #8662 from idryzhov/fix-check-linux-vrf

tests: fix bgp_l3vpn_to_bgp_vrf

3 years agoMerge pull request #8704 from idryzhov/revert-no-peer-group-pgname
Donatas Abraitis [Fri, 21 May 2021 07:01:55 +0000 (10:01 +0300)]
Merge pull request #8704 from idryzhov/revert-no-peer-group-pgname

Revert "bgpd: When deleting a neighbor from a peer-group the PGNAME i…

3 years agoMerge pull request #8712 from LabNConsulting/chopps/grpc-doc-update
Mark Stapp [Thu, 20 May 2021 19:38:27 +0000 (15:38 -0400)]
Merge pull request #8712 from LabNConsulting/chopps/grpc-doc-update

doc: expand documentation on gRPC

3 years agobuild: display Werror in configure output if configured
Mark Stapp [Thu, 20 May 2021 19:30:26 +0000 (15:30 -0400)]
build: display Werror in configure output if configured

Include -Werror with the listing of compiler flags.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agobgpd: Show BGP community alias in JSON community list output
Donatas Abraitis [Wed, 19 May 2021 15:24:20 +0000 (18:24 +0300)]
bgpd: Show BGP community alias in JSON community list output

Before:
```
      "community":{
        "string":"first 65001:2 65001:3",
        "list":[
          "65001:1",
          "65001:2",
          "65001:3"
        ]
      },
```

After:
```
      "community":{
        "string":"first 65001:2 65001:3",
        "list":[
          "first",
          "65001:2",
          "65001:3"
        ]
      },
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8616 from donaldsharp/pim_ordering
Martin Winter [Thu, 20 May 2021 16:49:56 +0000 (18:49 +0200)]
Merge pull request #8616 from donaldsharp/pim_ordering

pimd: There exists a path where on vrf bringup we do not create the p…

3 years agoospfd: "ip ospf area" command can select wrong process
Don Slice [Wed, 19 May 2021 18:23:28 +0000 (14:23 -0400)]
ospfd: "ip ospf area" command can select wrong process

Found that in some circumstances, when the "ip ospf area"
command was entered for the default vrf, the wrong ospf
process would be used to check for the presence of a
"network" statement, causing the "ip ospf area" command to
be rejected. This was due to the command using the ospf
instance lookup to find the right ospf process, which can
be in error depending on when the processes were created.

Signed-off-by: Don Slice <dslice@nvidia.com>
3 years agodoc: expand documentation on gRPC
Christian Hopps [Thu, 20 May 2021 14:03:37 +0000 (14:03 +0000)]
doc: expand documentation on gRPC

Add C++ and Python examples, and add compiling info, and known gRPC
version that works.

Signed-off-by: Christian Hopps <chopps@gmail.com>
3 years agoMerge pull request #8666 from idryzhov/bgp-replace-as
Donald Sharp [Thu, 20 May 2021 14:52:35 +0000 (10:52 -0400)]
Merge pull request #8666 from idryzhov/bgp-replace-as

bgpd, yang: fix replace-as yang leaf

3 years agoMerge pull request #8708 from LabNConsulting/chopps/fix-lyd-merge-use
Igor Ryzhov [Thu, 20 May 2021 14:04:54 +0000 (17:04 +0300)]
Merge pull request #8708 from LabNConsulting/chopps/fix-lyd-merge-use

lib: fix northbound merge code (libyang)

3 years agoMerge pull request #8628 from idryzhov/isis-vrf-redist
Donald Sharp [Thu, 20 May 2021 13:00:46 +0000 (09:00 -0400)]
Merge pull request #8628 from idryzhov/isis-vrf-redist

isisd: fix redistribution in vrf

3 years agolib: fix northbound merge code (libyang)
Christian Hopps [Thu, 20 May 2021 06:49:32 +0000 (06:49 +0000)]
lib: fix northbound merge code (libyang)

lyd_merge_tree replaces dest siblings with source siblings, not what we
want. Instead lyd_merge_siblings to keep both. Instead lyd_merge_siblings
to keep both.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #8703 from donaldsharp/ospf_tab
Igor Ryzhov [Thu, 20 May 2021 07:36:58 +0000 (10:36 +0300)]
Merge pull request #8703 from donaldsharp/ospf_tab

ospfd: New code adds newline to log files

3 years agoMerge pull request #8697 from idryzhov/fix-zebra-con
Donatas Abraitis [Thu, 20 May 2021 06:31:02 +0000 (09:31 +0300)]
Merge pull request #8697 from idryzhov/fix-zebra-con

zebra: fix possible uninitialized value

3 years agotests: Speedup ospf_sr_topo1 by over 100 seconds
Donald Sharp [Wed, 19 May 2021 20:01:01 +0000 (16:01 -0400)]
tests: Speedup ospf_sr_topo1 by over 100 seconds

Add some basic timer operations to speed up convergence.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8700 from idryzhov/coverity
Mark Stapp [Wed, 19 May 2021 19:56:17 +0000 (15:56 -0400)]
Merge pull request #8700 from idryzhov/coverity

fix a couple of coverity warnings

3 years agoRevert "bgpd: When deleting a neighbor from a peer-group the PGNAME is optional"
Igor Ryzhov [Wed, 19 May 2021 19:38:19 +0000 (22:38 +0300)]
Revert "bgpd: When deleting a neighbor from a peer-group the PGNAME is optional"

This reverts commit 2cbd181ac99801f2fb6b5b820ad66626c0f7168a.

We also have "no neighbor WORD peer-group" command and it's impossible
to distinguish between those two commands if PGNAME is optional.

3 years agoospfd: New code adds newline to log files
Donald Sharp [Wed, 19 May 2021 18:51:23 +0000 (14:51 -0400)]
ospfd: New code adds newline to log files

FRR is not using newlines in log messages.  Remove them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: Fix rare crash situation
Donald Sharp [Fri, 14 May 2021 13:46:36 +0000 (09:46 -0400)]
pimd: Fix rare crash situation

When running pim on an interface and that interface has
state and we move that interface into a different vrf
there exists a call path where we have not created the pimreg
device yet.  Prevent a crash in this rare situation.

Ticket: #2552763
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: When bind fails give some extra data
Donald Sharp [Fri, 14 May 2021 13:44:12 +0000 (09:44 -0400)]
pimd: When bind fails give some extra data

When bind to a socket fails, let's give some color so we can
understand and fix the issue.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8645 from idryzhov/ospf6-redistribute-fixes
Donald Sharp [Wed, 19 May 2021 18:42:54 +0000 (14:42 -0400)]
Merge pull request #8645 from idryzhov/ospf6-redistribute-fixes

ospf6 redistribution fixes

3 years agoMerge pull request #8678 from achernavin22/bgp_confed_peer_sort
Donald Sharp [Wed, 19 May 2021 18:33:22 +0000 (14:33 -0400)]
Merge pull request #8678 from achernavin22/bgp_confed_peer_sort

bgpd: recalc peer's sort after changing confed peers

3 years agoMerge pull request #8684 from kuldeepkash/multicast-sm-topo1
Donald Sharp [Wed, 19 May 2021 18:28:48 +0000 (14:28 -0400)]
Merge pull request #8684 from kuldeepkash/multicast-sm-topo1

tests: Fix for multicast_pim_sm test failure

3 years agodoc: Show BGP prefixes by community alias
Donatas Abraitis [Wed, 19 May 2021 15:20:08 +0000 (18:20 +0300)]
doc: Show BGP prefixes by community alias

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotests: Show BGP prefixes by community alias
Donatas Abraitis [Wed, 19 May 2021 14:47:23 +0000 (17:47 +0300)]
tests: Show BGP prefixes by community alias

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Show BGP prefixes by community alias
Donatas Abraitis [Wed, 19 May 2021 14:04:48 +0000 (17:04 +0300)]
bgpd: Show BGP prefixes by community alias

This includes both community/large-community.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8690 from idryzhov/ospf-fix-tlv-size
Olivier Dugeon [Wed, 19 May 2021 14:16:35 +0000 (16:16 +0200)]
Merge pull request #8690 from idryzhov/ospf-fix-tlv-size

ospfd: fix SID/Label Sub TLV size

3 years agoMerge pull request #8408 from Orange-OpenSource/TE
Igor Ryzhov [Wed, 19 May 2021 14:04:48 +0000 (17:04 +0300)]
Merge pull request #8408 from Orange-OpenSource/TE

ospfd: Correct Coverity defects

3 years agoMerge pull request #8677 from idryzhov/isis-snmp-build-warning
Patrick Ruddy [Wed, 19 May 2021 13:39:47 +0000 (14:39 +0100)]
Merge pull request #8677 from idryzhov/isis-snmp-build-warning

isisd: fix build warning and simplify code

3 years agopbrd: fix coverity warning
Igor Ryzhov [Wed, 19 May 2021 13:24:21 +0000 (16:24 +0300)]
pbrd: fix coverity warning

CID 1500586

There was an attempt to fix it in 920bb6f7 but the commit didn't
actually fix the warning.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: fix coverity warnings
Igor Ryzhov [Wed, 19 May 2021 12:53:16 +0000 (15:53 +0300)]
lib: fix coverity warnings

CID 1504894

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8693 from idryzhov/fix-bgp-bfd-reg
Rafael Zalamena [Wed, 19 May 2021 12:23:28 +0000 (09:23 -0300)]
Merge pull request #8693 from idryzhov/fix-bgp-bfd-reg

bgpd: fix zebra bfd registration

3 years agoMerge pull request #8665 from volta-networks/fix_pathd_coverity
Olivier Dugeon [Wed, 19 May 2021 12:16:00 +0000 (14:16 +0200)]
Merge pull request #8665 from volta-networks/fix_pathd_coverity

pathd: Clean coverity issues after merge pathd link state feature.

3 years agotests: Fixup some pylint warnings in test_multicast_pim_sm_topo2.py
Donald Sharp [Wed, 19 May 2021 12:04:50 +0000 (08:04 -0400)]
tests: Fixup some pylint warnings in test_multicast_pim_sm_topo2.py

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: fix possible uninitialized value
Igor Ryzhov [Wed, 19 May 2021 11:59:00 +0000 (14:59 +0300)]
zebra: fix possible uninitialized value

Found by Coverity.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8682 from idryzhov/fix-default-originate
Donald Sharp [Wed, 19 May 2021 11:03:47 +0000 (07:03 -0400)]
Merge pull request #8682 from idryzhov/fix-default-originate

ospfd, ospf6d: fix "default-information originate" in non-existing vrf

3 years agoMerge pull request #8667 from volta-networks/fix_pathd_cli_affinity
Olivier Dugeon [Wed, 19 May 2021 10:28:28 +0000 (12:28 +0200)]
Merge pull request #8667 from volta-networks/fix_pathd_cli_affinity

pathd: Fix affinity command to exclude options to match implementation.

3 years agoospfd: Correct Coverity defects
Olivier Dugeon [Tue, 6 Apr 2021 10:09:25 +0000 (12:09 +0200)]
ospfd: Correct Coverity defects

When browsing or parsing OSPF LSA TLVs, we need to use the LSA length which is
part of the LSA header. This length, encoded in 16 bits, must be first
converted to host byte order with ntohs() function. However, Coverity Scan
considers that ntohs() function return TAINTED data. Thus, when the length is
used to control for() loop, Coverity Scan marks this part of the code as defect
with "Untrusted Loop Bound" due to the usage of Tainted variable. Similar
problems occur when browsing sub-TLV where length is extracted with ntohs().

To overcome this limitation, a size attribute has been added to the ospf_lsa
structure. The size is set when lsa->data buffer is allocated. In addition,
when an OSPF packet is received, the size of the payload is controlled before
contains is processed. For OSPF LSA, this allow a secure buffer allocation.
Thus, new size attribute contains the exact buffer allocation allowing a
strict control during TLV browsing.

This patch adds extra control to bound for() loop during TLV browsing to
avoid potential problem as suggested by Coverity Scan. Controls are based
on new size attribute of the ospf_lsa structure to avoid any ambiguity.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>