Commit Graph

24361 Commits

Author SHA1 Message Date
Russ White
d5e73f4708
Merge pull request #8719 from LabNConsulting/chopps/fix-bgp-default
bgpd: fix default for extended-nexthop-capability
2021-05-25 07:26:49 -04:00
Russ White
089d0c2816
Merge pull request #8724 from idryzhov/doc-no-fix
doc: remove "no" commands
2021-05-25 07:25:53 -04:00
Chirag Shah
934c84a02b 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>
2021-05-24 16:06:24 -07:00
Donald Sharp
978f4b32eb
Merge pull request #8722 from opensourcerouting/ospfv3-asan-crash
ospf6d: fix address sanitizer crash
2021-05-24 12:53:03 -04:00
Mark Stapp
9f6b060f63
Merge pull request #8720 from idryzhov/fix-vrf-newline
lib: fix missing newline
2021-05-24 11:40:24 -04:00
Igor Ryzhov
9977e56cc3 doc: remove "no" commands
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-24 18:39:32 +03:00
Mark Stapp
2d3eb91699
Merge pull request #8498 from ton31337/feature/opaque_data_void_zebra
Zebra OPAQUE data from other daemons stuff
2021-05-24 07:48:02 -04:00
Rafael Zalamena
0f8443653d 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>
2021-05-24 08:30:26 -03:00
Donald Sharp
7b4e9d3cfc
Merge pull request #8716 from idryzhov/fix-commands
Fix a couple of CLI commands
2021-05-24 06:49:12 -04:00
Igor Ryzhov
d9f1279475 lib: fix missing newline
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-24 13:27:23 +03:00
Christian Hopps
d267d77668 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>
2021-05-23 20:30:04 +00:00
Christian Hopps
41b7a9898d grpc: improve checks for GRPC C++ requirements
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-22 00:01:06 +00:00
Trey Aspelund
4718791c8f 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>
2021-05-21 22:25:24 +00:00
Igor Ryzhov
2582d02c55 isisd: fix missing VRF parameter
It was incorrectly removed in 1cbf96a.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-21 20:29:13 +03:00
Igor Ryzhov
faff43d05c bgpd: fix aggregate-address command
Additional parameters are not mandatory.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-21 20:28:57 +03:00
Igor Ryzhov
80b82d5289
Merge pull request #8687 from opensourcerouting/bgp-fix-mcast
yang: fix BGP multicast prefix specification
2021-05-21 18:56:26 +03:00
Jafar Al-Gharaibeh
10d52ac7f7
Merge pull request #8671 from donaldsharp/pim_possible_crash
Pim possible crash
2021-05-21 10:16:03 -05:00
Donatas Abraitis
99447cf226
Merge pull request #8705 from donaldsharp/ospf_sr_topo1_speedup
tests: Speedup ospf_sr_topo1 by over 100 seconds
2021-05-21 14:30:34 +03:00
Donald Sharp
2db528e384
Merge pull request #8701 from ton31337/feature/show_ip_bgp_alias
bgpd: Show BGP prefixes by community alias
2021-05-21 07:23:10 -04:00
Rafael Zalamena
684a5c8a6b 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>
2021-05-21 07:56:01 -03:00
Rafael Zalamena
e51da3f817 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>
2021-05-21 07:55:51 -03:00
Igor Ryzhov
53e00a69d2
Merge pull request #8709 from dslicenc/ospf-intf-area
ospfd: "ip ospf area" command can select wrong process
2021-05-21 11:10:29 +03:00
Donatas Abraitis
a418752d47
Merge pull request #8662 from idryzhov/fix-check-linux-vrf
tests: fix bgp_l3vpn_to_bgp_vrf
2021-05-21 10:03:21 +03:00
Donatas Abraitis
e1285ac414
Merge pull request #8704 from idryzhov/revert-no-peer-group-pgname
Revert "bgpd: When deleting a neighbor from a peer-group the PGNAME i…
2021-05-21 10:01:55 +03:00
Mark Stapp
3511890fa1
Merge pull request #8712 from LabNConsulting/chopps/grpc-doc-update
doc: expand documentation on gRPC
2021-05-20 15:38:27 -04:00
Mark Stapp
1c35c57c96 build: display Werror in configure output if configured
Include -Werror with the listing of compiler flags.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-05-20 15:30:26 -04:00
Donatas Abraitis
d95a84e0a5 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>
2021-05-20 21:12:20 +03:00
Martin Winter
202af4abaa
Merge pull request #8616 from donaldsharp/pim_ordering
pimd: There exists a path where on vrf bringup we do not create the p…
2021-05-20 18:49:56 +02:00
Don Slice
b56114aa9e 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>
2021-05-20 12:09:27 -04:00
Christian Hopps
640b04d9e9 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>
2021-05-20 15:42:48 +00:00
Donald Sharp
6970d7d141
Merge pull request #8666 from idryzhov/bgp-replace-as
bgpd, yang: fix replace-as yang leaf
2021-05-20 10:52:35 -04:00
Igor Ryzhov
46ea9d49c6
Merge pull request #8708 from LabNConsulting/chopps/fix-lyd-merge-use
lib: fix northbound merge code (libyang)
2021-05-20 17:04:54 +03:00
Donald Sharp
21967e4e82
Merge pull request #8628 from idryzhov/isis-vrf-redist
isisd: fix redistribution in vrf
2021-05-20 09:00:46 -04:00
Christian Hopps
44cd2b2c2a 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>
2021-05-20 07:38:09 +00:00
Igor Ryzhov
91895b15a9
Merge pull request #8703 from donaldsharp/ospf_tab
ospfd: New code adds newline to log files
2021-05-20 10:36:58 +03:00
Donatas Abraitis
3532ab1ffb
Merge pull request #8697 from idryzhov/fix-zebra-con
zebra: fix possible uninitialized value
2021-05-20 09:31:02 +03:00
Donald Sharp
bd7fb46e5b 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>
2021-05-19 16:01:01 -04:00
Mark Stapp
e804e2597c
Merge pull request #8700 from idryzhov/coverity
fix a couple of coverity warnings
2021-05-19 15:56:17 -04:00
Igor Ryzhov
71cc0c88de Revert "bgpd: When deleting a neighbor from a peer-group the PGNAME is optional"
This reverts commit 2cbd181ac9.

We also have "no neighbor WORD peer-group" command and it's impossible
to distinguish between those two commands if PGNAME is optional.
2021-05-19 22:41:08 +03:00
Donald Sharp
55370b9564 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>
2021-05-19 15:10:48 -04:00
Donald Sharp
8c70a46b65 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>
2021-05-19 14:48:11 -04:00
Donald Sharp
262649bd05 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>
2021-05-19 14:48:11 -04:00
Donald Sharp
d516382e12
Merge pull request #8645 from idryzhov/ospf6-redistribute-fixes
ospf6 redistribution fixes
2021-05-19 14:42:54 -04:00
Donald Sharp
b5ca4a47d8
Merge pull request #8678 from achernavin22/bgp_confed_peer_sort
bgpd: recalc peer's sort after changing confed peers
2021-05-19 14:33:22 -04:00
Donald Sharp
8863a71845
Merge pull request #8684 from kuldeepkash/multicast-sm-topo1
tests: Fix for multicast_pim_sm test failure
2021-05-19 14:28:48 -04:00
Donatas Abraitis
9f977b2def doc: Show BGP prefixes by community alias
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-19 18:20:08 +03:00
Donatas Abraitis
b15be1605a tests: Show BGP prefixes by community alias
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-19 18:11:39 +03:00
Donatas Abraitis
a70a28a577 bgpd: Show BGP prefixes by community alias
This includes both community/large-community.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-19 18:11:38 +03:00
Olivier Dugeon
e55ee4b9ed
Merge pull request #8690 from idryzhov/ospf-fix-tlv-size
ospfd: fix SID/Label Sub TLV size
2021-05-19 16:16:35 +02:00
Igor Ryzhov
1f25f6c768
Merge pull request #8408 from Orange-OpenSource/TE
ospfd: Correct Coverity defects
2021-05-19 17:04:48 +03:00