Commit Graph

23292 Commits

Author SHA1 Message Date
Chirag Shah
fae6021583 lib: consolidate plist nb callbacks
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-03 19:47:56 -08:00
Christian Hopps
e184ea7311 pimd: correctly get interface name for error message
This was found while doing libyang2 work (causes assert); however, it is
also incorrect for libyang1 (empty canonical value for incorrectly
referenced interface vs interface-name node).

While here, fix 2 other incorrect uses of "." on a container node.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-03-03 21:06:06 -05:00
Trey Aspelund
3ba7b4aff0 bgpd: fix bgp statistics for l2vpn evpn
'show bgp l2vpn evpn statistics' was returning 0 for all stats
because bgp_table_stats_walker bailed out if afi != AFI_IP or AFI_IP6.
Add case condition to catch AFI_L2VPN.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2021-03-04 02:05:56 +00:00
Martin Winter
5a57c2f935
Merge pull request #8197 from idryzhov/pip2-link
doc: fix link for python2 get-pip.py
2021-03-03 22:19:22 +01:00
Igor Ryzhov
a113a35d6b doc: fix link for python2 get-pip.py
Script by the current link doesn't work with Python 2 anymore:
```
ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6.
Please use https://bootstrap.pypa.io/2.7/get-pip.py instead.
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-04 00:13:44 +03:00
Quentin Young
bb4bcaad9a
Merge pull request #8190 from gromit1811/fix_topotest_pylint
tests: Fix topotest.py pylint errors
2021-03-03 15:43:38 -05:00
Donatas Abraitis
b764e4682a doc: Add rfc8654 to supported RFCs list
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-03-03 22:21:08 +02:00
Donatas Abraitis
8b6ff0de56 tests: Use BGP Extended Message length
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-03-03 22:21:08 +02:00
Igor Ryzhov
632f36100c bfdd: forbid creation of the same peer with and without interface name
Currently it is possible to configure the same peer with and without
interface name:
```
bfd
 peer 1.1.1.1
 !
 peer 1.1.1.1 interface enp0s3
 !
```

There are multiple problems with that:
1. Both nodes actually control the same BFD session. So the config is
   either duplicated or, even worse, different - and there is no way to
   say which one actually works.
2. When the user deletes both nodes, the session is not actually freed,
   because its refcount is always greater than 1.

Such configuration must be forbidden. User should either have single
node with wildcard name or multiple nodes with actual names.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-03 23:10:19 +03:00
Rafael Zalamena
fecbc5d2e7
Merge pull request #8189 from idryzhov/topotest-mkdir
tests: don't complain when /tmp/topotests exists
2021-03-03 19:30:11 +00:00
Quentin Young
60e7da0cff tests: fix community-list invalid command
Didn't test this but it's already randomly broken so cant be worse

Hopefully fixes:

raise InvalidCLIError("%s" % output)
InvalidCLIError: line 2: % Command incomplete[4]: bgp
large-community-list standard Test1 permit

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-03-03 13:56:39 -05:00
Igor Ryzhov
5e4d0fbc93 bfdd: actually return validation error instead of logging
Before:
```
(config-bfd)# peer fe80::a00:27ff:fea2:5803 multihop local-address fe80::a00:27ff:fea2:5802
% Configuration failed.

Error type: validation
```

After:
```
(config-bfd)# peer fe80::a00:27ff:fea2:5803 multihop local-address fe80::a00:27ff:fea2:5802
% Configuration failed.

Error type: validation
Error description: When using link-local you must specify an interface
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-03 19:43:00 +03:00
Igor Ryzhov
4cce733fc2 bfdd: require local-address when using multihop
If local-address is not supplied, then an incorrect xpath is generated
which is not expected by NB CLI.

Fixes #7465.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-03 19:38:38 +03:00
Martin Buck
67c3bf97c3 tests: Fix topotest.py pylint errors
Fix 2 string formatting errors (cosmetic only - remove unused string
formatting arguments). Also fix obvious typos in empty class FreeBSDRouter
implementation.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2021-03-03 16:19:59 +01:00
Igor Ryzhov
cd07806b29 staticd: forbid blackhole and non-blackhole nexthops in a single route
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-03 18:06:42 +03:00
Igor Ryzhov
f60e5fd3d1
Merge pull request #8183 from kuldeepkash/multicast_pim_bsm
tests: Fix for test failure in PR #8158
2021-03-03 18:05:41 +03:00
lynne
bac66c5c64 ospf6d: Don't advertise AS-External LSAs into stub area
If area is a normal area and has adjacencies up and then the user changes
the area to a stub area, the code was leaving existing AS-External LSAs in
the database and was sending AS-External LSAs into the stub area causing
the adjacency to stay in Ex-Start.   With this change we now cleanup the
AS-External LSAs that existed when area was not a stub and do not advertise
AS-External LSAs into the stub area.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-03-03 09:20:36 -05:00
Igor Ryzhov
cac0ed050e tests: don't complain when /tmp/topotests exists
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-03 14:22:15 +03:00
Patrick Ruddy
6e2489de37
Merge pull request #8168 from donaldsharp/test_evpn
Test cleanup and fix evpn_type5_test_topo1
2021-03-03 10:28:39 +00:00
Emanuele Di Pascale
7bfc5ae813 ospf6d: fix setting NOAUTOCOST flag
ospf6 keeps a flag to remember whether the cost for an interface
was manually added via config or computed automatically, but if
the configured value matches the auto-computed one we were not
setting this flag, meaning that the config would not show up in
the config.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-03-03 10:56:51 +01:00
Wesley Coakley
23f3a92e34
tests: address coverity / styling issues in topotests
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-03-02 20:44:15 -05:00
Donald Sharp
6640d900cd
Merge pull request #8170 from mjstapp/fix_sa_pim
bgpd, pimd: fix coverity SA warnings
2021-03-02 15:51:57 -05:00
Donald Sharp
17d1e8a386 tests: Don't generate support bundles when we get the results we want
We are generating support bundles for tests being run that
are passing.  Tell the system...

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-02 13:41:50 -05:00
Donald Sharp
9dfe1acd2a tests: Remove sleep(60) and look for convergence
Sleeping when convergence is not guaranteed in 60 seconds
and then testing the rib to see if it has the data is
not a great way to have a test complete all the time.

Modify the code so that we check for convergence
and if we have converged then look in the rib.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-02 13:41:50 -05:00
Wesley Coakley
cd72ad0133
pimd: show ip mroute column realign
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-03-02 12:19:53 -05:00
Wesley Coakley
ff0e8ee8a5
staticd: warn on attempted delete of non-existent route
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-03-02 12:19:43 -05:00
Stephen Worley
b1077f0fa2
Merge pull request #8152 from idryzhov/fix-zebra-blackhole
zebra: don't use kernel nexthops for blackhole routes
2021-03-02 11:50:46 -05:00
Russ White
4d3cdc2cf9
Merge pull request #8150 from pguibert6WIND/ecomm_seq_0_possible
bgpd: accept (ext)community list sequence number set to 0
2021-03-02 11:46:41 -05:00
Russ White
8b52859575
Merge pull request #8175 from mjstapp/fix_printfrr_nulls
lib, bgpd: handle NULL inputs in printfrr extensions
2021-03-02 11:36:49 -05:00
lynne
0a4340469e tests: Adding test for ISIS SNMP
Adding test to verify walking of the ISIS SNMP MIB

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-03-02 10:06:31 -05:00
lynne
1ee746d990 isisd: support for snmp
Add support for read only mib objects from RFC4444.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-03-02 10:06:31 -05:00
Kuldeep Kashyap
d99438d27d tests: Fix for test failure in PR #8158
1. There were few tests where routes were configured with blackhole and
non-blackhole nexthops simultaneously, enhanced tests accordingly and
verified in master branch and with PR #8158 changes.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-03-02 05:32:28 -08:00
Donald Sharp
e7528866cb
Merge pull request #8084 from ranjanyash54/spf_json
ospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"
2021-03-02 07:26:49 -05:00
Donald Sharp
fe914c4b60
Merge pull request #7951 from mjstapp/fix_cancel_event
libs, bgpd: improve task cancellation by argument value
2021-03-02 07:21:47 -05:00
Patrick Ruddy
e1cfd75ffb
Merge pull request #8021 from AnuradhaKaruppiah/evpn-weak-override-fix
zebra: disable setting weak override flag in neigh updates
2021-03-02 10:44:43 +00:00
Patrick Ruddy
11b5777f13
Merge pull request #8117 from AnuradhaKaruppiah/evpn-consistency-checks
bgpd: enable ES consistency checks on first ES add
2021-03-02 10:37:59 +00:00
Yash Ranjan
305b639bca ospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"
Modify code to add JSON format output in show command
"show ipv6 ospf6 spf tree" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-02 02:14:57 -08:00
Donatas Abraitis
c103ac43de
Merge pull request #8172 from donaldsharp/more_pytest_bgp
More pytest stuff
2021-03-02 09:30:06 +02:00
Donatas Abraitis
3ca7090fdc
Merge pull request #8178 from donaldsharp/bgp_fib_install
bgpd: Wait for Install should not always set the flag
2021-03-02 08:56:35 +02:00
Donald Sharp
188b0db9d4
Merge pull request #8171 from mjstapp/print_nh_null
lib: print NULL for NULL nexthops
2021-03-01 20:22:54 -05:00
Chirag Shah
f7f101156e lib: fix a crash in plist update
Problem:
Prefix-list with mulitiple rules, an update to
a rule/sequence with different prefix/prefixlen
reset prefix-list next-base pointer to avoid
having stale value.

In some case the old next-bast's reference leads
to an assert in tri (trie_install_fn ) add.

bt:
(object=0x55576a4c8a00, updptr=0x55576a4b97e0) at lib/plist.c:560
(plist=0x55576a4a1770, pentry=0x55576a4c8a00) at lib/plist.c:585
(ple=0x55576a4c8a00) at lib/plist.c:745
(args=0x7fffe04beb50) at lib/filter_nb.c:1181

Solution:
Reset prefix-list next-base pointer whenver a
sequence/rule is updated.

Ticket:CM-33109
Testing Done:

Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-01 16:04:31 -08:00
Chirag Shah
b12bcae462 lib: fix plist le ge reset value
merge conflict leads to incorrect reset value for
prefix-list less than and greater than equal values.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-01 16:04:31 -08:00
Chirag Shah
978ca5d5ba lib: plist validation use enum type
In prefix-list nortbound callback's validation
phase, use type as enum rather string for better
performance.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-01 16:04:31 -08:00
Chirag Shah
4d2f546f82 lib: remove prefix-list dup api in validation phase
Following patch
" lib: disallow access list duplicated values"
introduce a libyang dnode iterator for every prefix-list
config which adds an overhead of traversal all prefix dnodes
and degrades the performance in scaled prefix-list config.

This check is not necessary in prefix-list northbound callbacks
as there won't be a case where prefix-list config comes to nb
callback without sequence number.

The dup check is only necessary for the vtysh case for backward
compatiblity reason where cli can be accepted without sequence number.

Ticket: CM-32035
Reviewed By: CCR-11096
Testing Done:

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-01 16:04:31 -08:00
Chirag Shah
6440741834 yang: remove when statement from prefix-list
Remove when statements from prefix-list yang OM,
and do the same check in frr validation phase.
This helps a bit in perfomance of prefix-lists
scale config.

Ticket:CM-32035
Reviewed By:CCR-11096
Testing Done:

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-01 16:04:31 -08:00
Mark Stapp
8e2c653ed3 lib: protect printfrr extensions from NULL input
Protect the lib printfrr extension handlers from NULL inputs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-01 15:41:30 -05:00
Mark Stapp
001ab42b19 bgpd: protect bgp printfrr extension from NULLs
Protect the bgp printfrr extension from NULL input.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-01 15:40:51 -05:00
Donald Sharp
a1b773e287 bgpd: Wait for Install should not always set the flag
If we are filtering a route due to any of the filter reasons
we should not be setting the BGP_NODE_FIB_INSTALL_FIB_PENDING
flag.  This is especially evident with say a loopback that
is covered by a network statement.  When we receive the route
back from our peer we should not be setting the
BGP_NODE_FIB_INSTALL_PENDING flag on it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-01 13:09:11 -05:00
Igor Ryzhov
4be03ff4ca zebra: don't use kernel nexthops for blackhole routes
Fixes #6522 and #8149.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-01 17:47:38 +03:00
Donald Sharp
5980ad0ae0 tests: Run black against tests again to clean up formatting
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-01 09:18:49 -05:00