Commit Graph

24238 Commits

Author SHA1 Message Date
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
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
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
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
Patrick Ruddy
f334254982
Merge pull request #8677 from idryzhov/isis-snmp-build-warning
isisd: fix build warning and simplify code
2021-05-19 14:39:47 +01:00
Igor Ryzhov
3558b8b8b4 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>
2021-05-19 16:24:21 +03:00
Igor Ryzhov
f96c2b6dc2 lib: fix coverity warnings
CID 1504894

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-19 16:22:24 +03:00
Rafael Zalamena
c4aa00a776
Merge pull request #8693 from idryzhov/fix-bgp-bfd-reg
bgpd: fix zebra bfd registration
2021-05-19 09:23:28 -03:00
Olivier Dugeon
587a1dfa39
Merge pull request #8665 from volta-networks/fix_pathd_coverity
pathd: Clean coverity issues after merge pathd link state feature.
2021-05-19 14:16:00 +02:00
Igor Ryzhov
389faf93b7 zebra: fix possible uninitialized value
Found by Coverity.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-19 14:59:00 +03:00
Donald Sharp
942f6d35d3
Merge pull request #8682 from idryzhov/fix-default-originate
ospfd, ospf6d: fix "default-information originate" in non-existing vrf
2021-05-19 07:03:47 -04:00