]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
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 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 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 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>
3 years agoMerge pull request #8688 from idryzhov/bgp-vrf-bind-priv
Donatas Abraitis [Wed, 19 May 2021 07:02:20 +0000 (10:02 +0300)]
Merge pull request #8688 from idryzhov/bgp-vrf-bind-priv

bgpd: raise privs for SO_BINDTODEVICE

3 years agobgpd: fix zebra bfd registration
Igor Ryzhov [Tue, 18 May 2021 20:31:52 +0000 (23:31 +0300)]
bgpd: fix zebra bfd registration

If there's no default router configured at the moment when bgpd is
connected to zebra, bgpd is not registered as a BFD client.

We should do the registration regardless of the config existence.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8686 from idryzhov/fix-doc-index
Mark Stapp [Tue, 18 May 2021 19:33:48 +0000 (15:33 -0400)]
Merge pull request #8686 from idryzhov/fix-doc-index

doc: remove redundant index directives

3 years agobuild: Update configure.ac to reflect new master version
Donald Sharp [Tue, 18 May 2021 18:41:39 +0000 (14:41 -0400)]
build: Update configure.ac to reflect new master version

That we are building towards.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: fix SID/Label Sub TLV size
Igor Ryzhov [Tue, 18 May 2021 15:25:14 +0000 (18:25 +0300)]
ospfd: fix SID/Label Sub TLV size

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agopathd: Clean coverity issues after merge pathd link state feature.
Javier Garcia [Thu, 13 May 2021 11:17:44 +0000 (13:17 +0200)]
pathd: Clean coverity issues after merge pathd link state feature.

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agopathd: Fix affinity command to exclude options to match implementation.
Javier Garcia [Thu, 13 May 2021 11:38:41 +0000 (13:38 +0200)]
pathd: Fix affinity command to exclude options to match implementation.

Including documentation update.

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agoMerge pull request #8608 from Fredi-raspall/pr_isis_sr_anycast
Renato Westphal [Tue, 18 May 2021 14:35:58 +0000 (11:35 -0300)]
Merge pull request #8608 from Fredi-raspall/pr_isis_sr_anycast

isisd: clear the N-flag in ext. reachability TLVs

3 years agoMerge pull request #8133 from gpnaveen/ospf_basic_testcases
Olivier Dugeon [Tue, 18 May 2021 14:26:12 +0000 (16:26 +0200)]
Merge pull request #8133 from gpnaveen/ospf_basic_testcases

tests: adding ospf basic 2 testcases.

3 years agoMerge pull request #8673 from LabNConsulting/chopps/ly2-again
Donald Sharp [Tue, 18 May 2021 14:21:51 +0000 (10:21 -0400)]
Merge pull request #8673 from LabNConsulting/chopps/ly2-again

lib: libyang2 add missed conversion

3 years agobgpd: raise privs for SO_BINDTODEVICE
Igor Ryzhov [Tue, 18 May 2021 14:07:06 +0000 (17:07 +0300)]
bgpd: raise privs for SO_BINDTODEVICE

The priv raise was incorrectly dropped in 97896a9.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agodoc: remove redundant index directives
Igor Ryzhov [Tue, 18 May 2021 12:29:59 +0000 (15:29 +0300)]
doc: remove redundant index directives

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8646 from chiragshah6/mdev
Patrick Ruddy [Tue, 18 May 2021 10:45:56 +0000 (11:45 +0100)]
Merge pull request #8646 from chiragshah6/mdev

zebra: evpn check vni oper state in svi up/down event

3 years agoisisd: simplify node Sid handling
Fredi Raspall [Tue, 18 May 2021 08:37:28 +0000 (10:37 +0200)]
isisd: simplify node Sid handling

Centralize the n-flag-clear processing to a single point.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
3 years agoisisd: clear the N-flag in ext. reachability TLVs
Fredi Raspall [Sun, 2 May 2021 15:13:11 +0000 (17:13 +0200)]
isisd: clear the N-flag in ext. reachability TLVs

If the n-flag-clear option is set in the configuration of a prefix
segment, clear the flag in the extended ip reachability TLVs.

RFCs 7794 and 8667 are not too strict on the setting / clearing the
N-flag in prefix SIDs. However, if there exists a cmd line option
to clear it, it should be cleared in the TLVs announced, as other
vendors do.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
3 years agoMerge pull request #8535 from opensourcerouting/zlog-rnode
Donatas Abraitis [Tue, 18 May 2021 06:50:42 +0000 (09:50 +0300)]
Merge pull request #8535 from opensourcerouting/zlog-rnode

zebra: replace _rnode_zlog with %pZN ext

3 years agotests: adding ospf basic 2 testcases.
nguggarigoud [Tue, 23 Feb 2021 05:04:28 +0000 (10:34 +0530)]
tests: adding ospf basic 2  testcases.

Test cases included are 1 ospf cost, 1 ospf mtu.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agolib: libyang2 add missed conversion
Christian Hopps [Mon, 17 May 2021 21:16:28 +0000 (21:16 +0000)]
lib: libyang2 add missed conversion

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: Fix for multicast_pim_sm failure
Kuldeep Kashyap [Tue, 18 May 2021 01:50:49 +0000 (18:50 -0700)]
tests: Fix for multicast_pim_sm failure

Test case test_verify_mroute_when_5_different_receiver_joining_same_sources_p0
is failing intermittently in master. Fixed the issue.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoMerge pull request #8680 from idryzhov/rip-ripng-fix-crash
Renato Westphal [Tue, 18 May 2021 01:47:27 +0000 (22:47 -0300)]
Merge pull request #8680 from idryzhov/rip-ripng-fix-crash

ripd, ripngd: fix interface wakeup after shutdown

3 years agoospf6d: free "default-information originate" config when removing router
Igor Ryzhov [Fri, 7 May 2021 14:53:13 +0000 (17:53 +0300)]
ospf6d: free "default-information originate" config when removing router

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: fix crash when removing router from vrf that doesn't exist
Igor Ryzhov [Fri, 7 May 2021 14:52:41 +0000 (17:52 +0300)]
ospf6d: fix crash when removing router from vrf that doesn't exist

`listgetdata(listhead(list))` crashes for an empty list.

Reproducible with:
```
router ospf6 vrf doesntexist
 default-information originate always
 exit
no router ospf6 vrf doesntexist
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: always free redistribute config
Igor Ryzhov [Fri, 7 May 2021 14:05:40 +0000 (17:05 +0300)]
ospf6d: always free redistribute config

When the ospf6 instance in unknown VRF is deleted, the redistribution
config is not freed, because it is not registered in zebra. We should
always free the config regardless of zebra registration status.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: fix "default-information originate" in non-existing vrf
Igor Ryzhov [Mon, 17 May 2021 22:24:22 +0000 (01:24 +0300)]
ospf6d: fix "default-information originate" in non-existing vrf

If the default route redistribution is configured in OSPF6 router before
the VRF is created, then this is not currently registered in zebra after
the VRF creation.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: fix "default-information originate" in non-existing vrf
Igor Ryzhov [Mon, 17 May 2021 22:23:35 +0000 (01:23 +0300)]
ospfd: fix "default-information originate" in non-existing vrf

If the default route redistribution is configured in OSPF router before
the VRF is created, then this is not currently registered in zebra after
the VRF creation.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8643 from icosahedral/master
Sri Mohana Singamsetty [Mon, 17 May 2021 18:43:35 +0000 (11:43 -0700)]
Merge pull request #8643 from icosahedral/master

bgpd: modify path selection for EVPN type-5 routes

3 years agoMerge pull request #8676 from idryzhov/test-gitignore
Mark Stapp [Mon, 17 May 2021 16:44:13 +0000 (12:44 -0400)]
Merge pull request #8676 from idryzhov/test-gitignore

tests: fix missing gitignore entry

3 years agoripngd: fix interface wakeup after shutdown
Igor Ryzhov [Mon, 17 May 2021 16:35:57 +0000 (19:35 +0300)]
ripngd: fix interface wakeup after shutdown

RIPNG schedules a call to `ripng_interface_wakeup` in 1 second after
receiving the interface UP event from zebra. The function is called even
if the interface was shut down during this interval.

This is incorrect and also leads to a crash in the following scenario:
```
vtysh -c "conf" -c "router ripng vrf red" -c "network enp2s0"
ip link add red type vrf table 1
ip link set enp2s0 vrf red
ip link set enp2s0 down
ip link set enp2s0 up && sleep 2 && ip link del red
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoripd: fix interface wakeup after shutdown
Igor Ryzhov [Mon, 17 May 2021 16:34:02 +0000 (19:34 +0300)]
ripd: fix interface wakeup after shutdown

RIP schedules a call to `rip_interface_wakeup` in 1 second after
receiving the interface UP event from zebra. The function is called even
if the interface was shut down during this interval.

This is incorrect and also leads to a crash in the following scenario:
```
vtysh -c "conf" -c "router rip vrf red" -c "network enp2s0"
ip link add red type vrf table 1
ip link set enp2s0 vrf red
ip link set enp2s0 down
ip link set enp2s0 up && ip link del red
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: recalc peer's sort after changing confed peers
Alexander Chernavin [Mon, 17 May 2021 09:34:03 +0000 (05:34 -0400)]
bgpd: recalc peer's sort after changing confed peers

Currently, when AS number of an existing BGP neighbor is added in a BGP
confederation, AS_CONFED_SEQUENCE segment attribute will be missing in
prefixes advertised to the neighbor. Also, receiving prefixes from the
neighbor will be withdrawn because of "Malformed AS path from A.B.C.D".

    neighbor 10.100.200.3 remote-as 123
    bgp confederation identifier 65001
    bgp confederation peers 123

With this change, update peer's sort after adding or removing its AS
number in a BGP confederation.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
3 years agoisisd: fix build warning and simplify code
Igor Ryzhov [Mon, 17 May 2021 10:07:24 +0000 (13:07 +0300)]
isisd: fix build warning and simplify code

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: fix missing gitignore entry
Igor Ryzhov [Mon, 17 May 2021 10:01:55 +0000 (13:01 +0300)]
tests: fix missing gitignore entry

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agopbrd: nhg "add" edge case for last in table range
Wesley Coakley [Sat, 15 May 2021 06:41:28 +0000 (02:41 -0400)]
pbrd: nhg "add" edge case for last in table range

When handling the addition of a nhg which would saturate the range of
tables PBR is configured to install into, handle this *before* a
possible call to pbr_nhgc_alloc during hash query

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agopbrd: use sparse table for allocated NHG table IDs
Wesley Coakley [Sat, 15 May 2021 02:53:56 +0000 (22:53 -0400)]
pbrd: use sparse table for allocated NHG table IDs

Represent installed ("allocated") NHG tables with a hash keyed by table
ID. Replaces a pre-allocated array of booleans that implemented this
functionality before.

+ PBR table range > 65535 is fixed (was OOB access before :))
+ Pre-compute next available ID to save time when only checking
  if all tables are allocated

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agoMerge pull request #8672 from qlyoung/fix-bgp-timer-display
Igor Ryzhov [Sat, 15 May 2021 11:18:50 +0000 (14:18 +0300)]
Merge pull request #8672 from qlyoung/fix-bgp-timer-display

3 years agotests: Check if opaque data from BGP is accessable in Zebra
Donatas Abraitis [Sun, 18 Apr 2021 19:04:15 +0000 (22:04 +0300)]
tests: Check if opaque data from BGP is accessable in Zebra

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agozebra: Send more OPAQUE data from BGP
Donatas Abraitis [Sun, 18 Apr 2021 18:53:19 +0000 (21:53 +0300)]
zebra: Send more OPAQUE data from BGP

This includes community and large-community data.

```
exit1-debian-9# show ip route 172.16.16.1/32
Routing entry for 172.16.16.1/32
  Known via "bgp", distance 20, metric 0, best
  Last update 00:00:23 ago
  * 192.168.0.2, via eth1, weight 1
    AS-Path          : 65030
    Communities      : 65001:1 65001:2 65001:3 65001:4 65001:5 65001:6
    Large-Communities: 65001:123:1 65001:123:2
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agozebra: Format changes for evpn_mh_neigh_holdtime_cmd
Donatas Abraitis [Sat, 17 Apr 2021 20:29:30 +0000 (23:29 +0300)]
zebra: Format changes for evpn_mh_neigh_holdtime_cmd

Just to avoid fixing all the time manually this stuff after not relevant
changes.

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