Commit Graph

24087 Commits

Author SHA1 Message Date
David Lamparter
3b20069fd6
Merge pull request #8648 from idryzhov/fix-test-assert
tests: fix build warning
2021-05-10 12:52:21 +02:00
Rafael Zalamena
34723b2fad
Merge pull request #8639 from idryzhov/isis-new-bfd-lib
isisd: rework BFD integration
2021-05-09 17:10:42 -03:00
David Lamparter
16819a24a4
Merge pull request #8627 from volta-networks/fix_pceplib_scan_build
pceplib. Clean scan-build static analyzer messages.
2021-05-09 20:25:24 +02:00
David Lamparter
83f5d2581a
Merge pull request #8441 from mjstapp/fix_topo_pylint1 2021-05-09 19:48:33 +02:00
David Lamparter
2ab691e6c0
Merge pull request #8626 from idryzhov/fix-isis-topo1
tests: fix isis-topo1 topologies
2021-05-09 19:46:01 +02:00
David Lamparter
3c786ef229 Merge branch 'pull/8563'
w/ style fix to speed things along
2021-05-09 19:38:24 +02:00
David Lamparter
e207132594 zebra: fix style warnings in previous commits
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-09 19:37:12 +02:00
David Lamparter
4666232247
Merge pull request #8631 from dslicenc/pimd-timer-fix 2021-05-09 19:31:36 +02:00
David Lamparter
de10458d6e
Merge pull request #8380 from mjstapp/nexthop_cmp_basic 2021-05-09 19:29:45 +02:00
David Lamparter
c93d410837
Merge pull request #8642 from idryzhov/bgp-gr-no-oper
bgpd: don't return error for GR no-op commands
2021-05-09 19:24:10 +02:00
David Lamparter
b4a0d49a68
Merge pull request #8640 from pjdruddy/fix-bgp-auth-key-error
tests: fix intermittent key error in bgp-auth topotest
2021-05-09 19:22:55 +02:00
David Lamparter
0f12ac7f12
Merge pull request #8472 from donaldsharp/more_valgrind_stuff
tools: Add some more data to ignore for valgrind
2021-05-09 19:20:47 +02:00
Igor Ryzhov
f3d2d1e0be tests: fix build warning
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-09 18:23:43 +03:00
Mark Stapp
f94b1d526b
Merge pull request #8634 from idryzhov/ospf-vrf-redist
ospf redistribution fixes
2021-05-07 15:22:19 -04:00
Russ White
d2b7ab9445
Merge pull request #8347 from volta-networks/fix_ospv6_filter_debug
ospf6d: Fix when an "export-list" or "filter-list out" is configured
2021-05-07 14:27:01 -04:00
Igor Ryzhov
ca187fd355 ospfd: free "default-information originate" config when removing router
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-07 18:10:01 +03:00
Igor Ryzhov
d0bb3c542c
Merge pull request #8632 from wesleycoakley/le-32-128-fix
lib: ip prefix-list "le" and "ge" bug squish
2021-05-07 12:05:59 +03:00
Igor Ryzhov
c97b34cf1a lib: remove old bfd library
This commit also adds missing `bfd_protocol_integration_set_shutdown` to
ospf6d and pimd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-07 12:03:57 +03:00
Igor Ryzhov
081f9b29df isisd: fix bfd config output
Don't show default BFD config ("no isis bfd") if show_enabled flag is not set.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-07 12:03:57 +03:00
Igor Ryzhov
c022a581ec isisd: enable autocompletion for bfd profiles
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-07 12:03:57 +03:00
Igor Ryzhov
bb28b985fd isisd: fix "no bfd profile" command
Instead of setting the profile to an empty string we should destroy the
NB node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-07 12:03:57 +03:00
Igor Ryzhov
13bf38300e isisd: rework BFD integration
Rewrite the BFD integration code to use the new library.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-07 12:03:57 +03:00
Donatas Abraitis
03d39784e7
Merge pull request #8581 from qlyoung/bgp-fix-last-reset-buffer-size
bgpd: rework BGP_MAX_PACKET_SIZE & friends
2021-05-06 22:31:09 +03:00
Igor Ryzhov
895b0d0ad6 bgpd: don't return error for GR no-op commands
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-06 21:33:14 +03:00
Wesley Coakley
6907bb6bbf
lib: ip prefix-list enforce expected ge le behavior
When specifying only an "le" for an existing ip prefix-list qualified with
both an "le" and "ge" make sure to remove the "ge" property so it does
not stay in the tree.

E.g. Saying these two things in order:

ip prefix-list test seq 1 permit 1.1.0.0/16 ge 18 le 24
ip prefix-list test seq 1 permit 1.1.0.0/16 ge 18

... should result in the second statement "overwriting" the first like
this:

vxdev-arch# do show ip prefix-list
ZEBRA: ip prefix-list foobar: 3 entries
   seq 1 permit 15.0.0.0/16 ge 18

Previously this did not happen and "le" would stick around since it was
never given NB_OP_DESTROY and purged from the data tree.

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-05-06 14:07:06 -04:00
Wesley Coakley
d7e594edd2
tools: stop frr-reload squashing le 32 / le 128
frr-reload no longer consolidates ip prefix-list "le 32" or "le 128"
rules when a "ge" is present, more accurately representing existing user
config and reflecting also what is accepted in CLI.

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-05-06 12:31:37 -04:00
Quentin Young
556beacf10 bgpd: rework BGP_MAX_PACKET_SIZE & friends
BGP_MAX_PACKET_SIZE no longer represented the absolute maximum BGP
packet size as it did before, instead it was defined as 4096 bytes,
which is the maximum unless extended message capability is negotiated,
in which case the maximum goes to 65k.

That introduced at least one bug - last_reset_cause was undersized for
extended messages, and when sending an extended message > 4096 bytes
back to a peer as part of NOTIFY data would trigger a bounds check
assert.

This patch redefines the macro to restore its previous meaning,
introduces a new macro - BGP_STANDARD_MESSAGE_MAX_PACKET_SIZE - to
represent the 4096 byte size, and renames the extended size to
BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE for consistency. Code locations
that definitely should use the small size have been updated, locations
that semantically always need whatever the max is, no matter what that
is, use BGP_MAX_PACKET_SIZE.

BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE should only be used as a constant
when storing what the negotiated max size is for use at runtime and to
define BGP_MAX_PACKET_SIZE. Unless there is a future standard that
introduces a third valid size it should not be used for any other
purpose.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-05-06 11:54:02 -04:00
Quentin Young
38861dab3c
Merge pull request #8638 from ton31337/fix/bgp_doc
doc: Remove trailing whitespaces and fix WARNING: Error in "code-block"
2021-05-06 14:24:50 +00:00
Pat Ruddy
650e0d1bb8 tests: fix intermittent key error in bgp-auth topotest
There is a rare case where with prefix peers the peer is
completely absent from the json output when checking the
peer state resulting in a python key error. Check key exists
before checking the state.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-05-06 14:36:52 +01:00
Rafael Zalamena
4478793c43
Merge pull request #8636 from idryzhov/ospfv3-vrf-support
OSPFv3 VRF support
2021-05-06 08:50:32 -03:00
Donatas Abraitis
073b766450 doc: Remove trailing whitespaces and fix WARNING: Error in "code-block"
maximum 1 argument(s) allowed, 56 supplied.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-06 14:09:10 +03:00
Donald Sharp
dd82f72543
Merge pull request #8497 from ton31337/feature/bgp_community_alias
bgpd: Create BGP alias names for community/large-community
2021-05-06 06:07:07 -04:00
Igor Ryzhov
487df4500b doc: update ospf6d for vrf support
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-06 10:54:31 +03:00
harios_niral
0681195e86 tests: add topotest for ospf6d vrf support
Co-authored-by: Kaushik Nath <kaushiknath.null@gmail.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
2021-05-06 10:54:31 +03:00
harios_niral
d48ef099db ospf6d: add vty support for multiple vrfs
Co-authored-by: Kaushik Nath <kaushiknath.null@gmail.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
2021-05-06 10:54:31 +03:00
Igor Ryzhov
b416a4a6e4
Merge pull request #8635 from pjdruddy/fix_isis_snmp_clang
isisd: fix clang-11 warnings in snmp code
2021-05-06 00:56:04 +03:00
harios_niral
4e8ccd9213 ospf6d: add internal support for multiple vrfs
Co-authored-by: Kaushik Nath <kaushiknath.null@gmail.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
2021-05-05 23:17:01 +03:00
Pat Ruddy
4397d967d5 isisd: fix clang-11 warnings in snmp code
fix a number of SA errors thrown up by the newer clang

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-05-05 17:35:40 +01:00
Igor Ryzhov
7bced643b9 ospfd: fix redistribution config when vrf doesn't exist
Currently ospfd relies on vrf bitmaps in zclient to check that the
redistribution is configured. This doesn't work when the VRF for OSPF
instance doesn't exist yet, because vrf bitmaps ignore VRF_UNKNOWN id.

Because of this, the following problems occur when the VRF doesn't exist:
- repeated "redistribute smth" command is processed as a first-time
  instead of an update
- "no redistribute smth" doesn't work at all

This commit fixes both issues by relying on internal redistribution
config instead of zclient vrf bitmaps.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-05 19:31:22 +03:00
Igor Ryzhov
de11c1bc24 ospfd: deregister vrf from zebra when vrf is disabled
Currently the VRF is deregistered only when it is re-enabled again.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-05 19:31:22 +03:00
Igor Ryzhov
91d1a0f6d9
Merge pull request #8630 from donaldsharp/max_port
bgpd: Another call path with uninited data
2021-05-05 19:27:18 +03:00
Donald Sharp
c41e4b45e7
Merge pull request #8598 from idryzhov/fix-topotest-bgp-auth
tests: fix bgp-auth topotest
2021-05-05 11:17:37 -04:00
Donald Sharp
56b99116f2 tools: Add some more data to ignore for valgrind
When running valgrind there are some possible memory leaks.
These memory leaks we have absolutely no control over, mark
them as not worthy of being reported.

Finally move the valgrind suppressions file from bgpd/ to tools/
this is because this suppressions file can be used beyond bgpd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-05 10:52:51 -04:00
Donald Sharp
4a73887e0f zebra: Reduce per vrf memory usage from hash table creation
When creating a large number of vrf's we are creating a fairly
large number of hash tables per vrf.  Reduce memory usage on
startup as well as let us identify the table these things come
from.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-05 10:08:06 -04:00
Donald Sharp
da55bcbcb3 zebra: Reduce size of vni hash tables to a more reasonable start size
We are creating 2 hash tables per vni in zebra.  Once we start to
scale the number of vni's we start to see some serious memory
usage in zebra.  Let's reduce the memory usage at startup
for scale of vni's.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-05 10:08:06 -04:00
Donald Sharp
38078b1d5a zebra: Add some ability to know what hash is for what vni
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-05 10:08:06 -04:00
Donald Sharp
ec64a634c2 zebra: Allow the zvrf to know it's vrf when allocing
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-05 10:08:06 -04:00
Donatas Abraitis
b820f3d0a3 tests: Check if bgp community alias NAME ALIAS commands works
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-05 16:37:01 +03:00
Donatas Abraitis
76b40371fe doc: Add bgp community alias NAME ALIAS command
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-05 16:37:01 +03:00
Donatas Abraitis
ed0e57e3f0 bgpd: Create BGP alias names for community/large-community
Show alias name instead of numerical value in `show bgp <prefix>. E.g.:

```
root@exit1-debian-9:~/frr# vtysh -c 'sh run' | grep 'bgp community alias'
bgp community alias 65001:123 community-1
bgp community alias 65001:123:1 lcommunity-1
root@exit1-debian-9:~/frr#
```

```
exit1-debian-9# sh ip bgp 172.16.16.1/32
BGP routing table entry for 172.16.16.1/32, version 21
Paths: (2 available, best #2, table default)
  Advertised to non peer-group peers:
  65030
    192.168.0.2 from home-spine1.donatas.net(192.168.0.2) (172.16.16.1)
      Origin incomplete, metric 0, valid, external, best (Neighbor IP)
      Community: 65001:12 65001:13 community-1 65001:65534
      Large Community: lcommunity-1 65001:123:2
      Last update: Fri Apr 16 12:51:27 2021
exit1-debian-9#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-05-05 16:37:00 +03:00