Commit Graph

24361 Commits

Author SHA1 Message Date
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
Don Slice
3f1f8641fa pimd: adjust rp_keep_alive_time when register_suppress_time is changed
The router->register_suppress_time is used to derive the
rp_keep_alive_time, but when the suppress time was changed, pim was
not recalculating the rp_keep_alive_time and left it at the old value.
This fix applies the changes when a new suppress_time is entered
(or removed.)

Signed-off-by: Don Slice <dslice@nvidia.com>
2021-05-05 09:02:28 -04:00
Don Slice
bb4b6eb547 pimd: stop displaying global parameters in each vrf
Problem reported that when certain pim commands were entered, they
showed up duplicated in the configuration both under default instance
and every vrf (whether pim was used there or not.) This was because
these particular parameters are global only and the function doing
the display would repeat for each vrf. This fix only displays those
in the default case (and removes them from the help for entering
under a vrf.)

Signed-off-by: Don Slice <dslice@nvidia.com>
2021-05-05 08:11:27 -04:00
Mark Stapp
6038682d46
Merge pull request #8619 from donaldsharp/sharp_redistribute
sharpd: add v4 redistribute watching
2021-05-05 08:01:40 -04:00
Mark Stapp
3d4b999fab
Merge pull request #8237 from pguibert6WIND/nhrp_use_zebra_2
Nhrp use zebra 2
2021-05-05 07:57:04 -04:00
Donald Sharp
60031a55f6 bgpd: Another call path with uninited data
Prevent another call path that uses uninited data in
bgp_pbr.c

This was found through more clang sa runs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-05 07:48:55 -04:00
Donatas Abraitis
48c2039199
Merge pull request #8564 from rameshabhinay/bgp_tcp_mss
bgpd: Support tcp-mss for bgp neighbors
2021-05-05 13:45:39 +03:00
Javier Garcia
fadf00aa54 pceplib: Clean scan-build static analyzer messages.
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-05-05 12:11:53 +02:00
Igor Ryzhov
3adfae9613 tests: fix isis-topo1 topologies
parse_topology function doesn't correctly process vertex types with
spaces. Therefore the reference topology files are completely messed up,
we have values in incorrect fields - types in metrics, metrics in
parents, etc.

This commit fixes the parsing function and the reference files.

The same fix was done for isis-topo1-vrf in #8365.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-05 12:26:38 +03:00
Patrick Ruddy
4d504309d3
Merge pull request #8459 from taspelund/no_rmac_on_mac_only
bgpd: Fix IP-VRF ext-comm check for MACIP routes
2021-05-05 09:48:11 +01:00
Igor Ryzhov
8acb8bff38
Merge pull request #8625 from c-po/graceful-restart 2021-05-05 09:44:25 +03:00
Igor Ryzhov
5d421ab2cd
Merge pull request #8040 from donaldsharp/fix_distribute 2021-05-05 03:40:39 +03:00
Igor Ryzhov
731849d4bc
Merge pull request #8551 from donaldsharp/peer_damp_doppleganger 2021-05-05 03:39:40 +03:00
Igor Ryzhov
d236114b13
Merge pull request #8618 from Prerana-GB/lcom
bgpd: BGP large community-list configuration with regex is failing.
2021-05-05 00:46:30 +03:00
Christian Poessinger
5b899e99fe bgpd: changing graceful-restart parameters should not be considered as error
vtysh will return an informational message to the user that changing any
graceful-shutdown related parameter will require a peer reset. This is should
not be treated as an error message (resulting in a return code of 1) but
rather as a simple information to the user.

This fixes GitHub issue https://github.com/FRRouting/frr/issues/8403

$ vtysh -c configure -c 'router bgp 100' -c 'bgp graceful-restart'
Graceful restart configuration changed, reset all peers to take effect
$ echo $?
0

Signed-off-by: Christian Poessinger <christian@poessinger.com>
2021-05-04 23:32:41 +02:00
Donald Sharp
39d8dd2d17 bgpd: Consolidate dampening show run output with the rest of that code
For whatever reason the dampening show run code was outside the normal
loop of code that handles the afi/safi portion.  consolidate it into
the rest of the normal code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 16:25:58 -04:00
Donald Sharp
dcc862322c bgpd: No need to check if we are a dynamic peer or not
bgp_config_write_peer_af already checks to see if we are
a dynamic peer.  No need to do so right before we call it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 16:25:58 -04:00
Donald Sharp
783492c7cd bgpd: Do not output peer doppleganger dampened output
When we are cycling through all peers and looking for
dampening data to dump, do not consider non-configed
peers( dopplegangers ).

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 16:25:58 -04:00
Donald Sharp
8a7be4dda3 doc: Fix the rip and ripng distribute-list ... commands
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 16:23:37 -04:00
Donald Sharp
eda0ea2949 lib: Remove dead code
The distribute_list_init command is not used and is setup
code that will never be used because it makes assumptions about
how distribute-lists work that are fundamentally incorrect.

Remove the code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 16:23:37 -04:00
Donald Sharp
32282a6ecf babeld: Allow babeld to actually register to use distribute-list
The `distribute-list` commands were registered but never setup
properly to work.  Put the commands in place.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 16:23:37 -04:00
Donald Sharp
5463d7c374 eigrpd: fix distribute-list... command for EIGRP
The distribute-list command was being registered but never
setup properly in EIGRP.  Put it into place.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 16:23:37 -04:00
Donald Sharp
458133dbc5 lib, ripd, ripngd, vtysh: Move distribute list to correct spot
Allow the `distribute-list...` command in ripd and ripngd to
work correctly.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 16:23:37 -04:00
Donald Sharp
df19c76a53 lib: Abstract parsing of distribute lists
Abstract the parsing of distribute lists so that we
don't have as much cut-n-paste code.

This is a setup commit for future work.  In effect
current distribute-list handling is all kinds of messed up

a) eigrp and babel both attempt to use distribute-lists, they just plain
don't work.
b) `distribute-list` is only sent to rip.  `ipv6 distribute-list`
is sent to ripngd.  If you use `distribute-list` under `router ripng`
it sends the command to rip but ripd is in the wrong mode and it
never works.
c) Should ripngd care about v4 and v6 specific distribute-lists?
This dichotomy was added for babel but babel has been broke
about this since day 1( see a ).

All in all we need to unwind this whole mess.  Make distribute-list
commands specific to the daemons( so that we can be in the right
sub-mode ).  But the parsing is going to be the same across all
daemons.  So let's provide that functionality in `lib/distribute.c`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 16:23:37 -04:00
Mark Stapp
403e26cd03 tests: add unit test for nexthop comparisons
Add a nexthop unit test module, just exercising the 'basic'
comparison api for now.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-05-04 15:51:01 -04:00
Mark Stapp
338ec3b867 lib: add basic nexthop comparison api
Add a simpler, more limited nexthop comparison function. This
compares a few key attributes, such as vrf, gateway, labels.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-05-04 15:51:01 -04:00
lynne
f6c5f2e0c3 ospf6d: Fix when an "export-list" or "filter-list out" is applied.
When an "export-filter" or "filter-list out" was configured on an area the
filter was not applied to existing database.    The user would either have
to restart the neighboring router in the other area or issue a "clear ipv6
ospf6 interface" to cause the neighbor router to resend it's LSAs.   The
new filter would then be applied to these LSAs and permit or deny summary
LSAs from being added/removed from the database.  The code now applies the
filters to the existing database without user needing to take any action
to clear ospfv3 adjacencies.

The second part of the problem was if a rule changed the updated filter was
not applied.  The code has been modifed to now process the rule update and
reapply the filter.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-05-04 15:28:56 -04:00
Rafael Zalamena
bc79672d3e
Merge pull request #8499 from donaldsharp/ospf_what
Ospf what
2021-05-04 14:41:42 -03:00
Russ White
52a65a8cc6
Merge pull request #8587 from volta-networks/fix_ospf6_message_logs
ospf6d: Make debug logs configurable to only display message headers
2021-05-04 11:53:17 -04:00
Mark Stapp
26dddc01a8 lib: Fix label-stack comparison for nexthops
Use the correct number of octets in the comparison of
nexthops' label stacks.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-05-04 11:18:08 -04:00
Russ White
4ae7bb11fc
Merge pull request #8620 from donaldsharp/redistribution_and_infinite
zebra: Allow redistribution for routes selected
2021-05-04 11:14:35 -04:00
Russ White
be7916a032
Merge pull request #8504 from ranjanyash54/link_lsa_priority
ospf6d: Send Link LSAs when interface priority is changed
2021-05-04 10:24:45 -04:00
Russ White
7e4085ca98
Merge pull request #8506 from ranjanyash54/route_json_change
ospf6d: Change structure of "show ipv6 ospf6 route json" command
2021-05-04 10:24:03 -04:00
prerana
a9f42ac2e3 bgpd: BGP large community-list configuration with regex is failing.
frr(config)# bgp large-community-list expanded com1 permit .*
% Malformed community-list value

The check to validate large-community against UINT_MAX is added for
both standard and expanded community. But however it needs to be
validated only for standard community.

Signed-off-by: Prerana-GB <prerana@vmware.com>
2021-05-04 06:24:22 -07:00
Donald Sharp
674c29dd23 ospfd: Use %pI4 in some places
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 09:06:14 -04:00
Donald Sharp
5e5181bbe2 ospfd: Fix some deep indentation issues in ospf_asbr.c
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 09:06:13 -04:00
Donald Sharp
b259f5af14 ospfd: Fix indentation in ospf_is_type_redistributed
clang-format was not happy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 09:03:27 -04:00
Donald Sharp
5d8c8d0b1d ospfd: Do not use case default for switches that have enum
Found a couple spots where FRR was using `case default` when
using a switch over an enum.  In this case we *must* enumerate
all states as part of the switch.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 09:03:27 -04:00
Donald Sharp
6ec9c6a899 ospfd: Cleanup some awful deep indentation in ospf_zebra.c
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-04 09:03:27 -04:00
Russ White
8ad44ef497
Merge pull request #8514 from donaldsharp/connected_is_limited
zebra: Allow one connected route per network mask on a interface
2021-05-04 07:45:33 -04:00
Russ White
c973779d02
Merge pull request #8615 from dslicenc/eigrp-asn-check
eigrpd: Test for EIGRP AS number and ensure it's the same
2021-05-04 07:43:48 -04:00
Donald Sharp
2fd97fd87d
Merge pull request #8614 from opensourcerouting/msdp-fixes
pimd: MSDP trivial fixes
2021-05-04 07:21:51 -04:00
Igor Ryzhov
10839180a9
Merge pull request #8621 from donaldsharp/bgp_pbr_clang_sa
bgpd: Prevent test against uninited data
2021-05-04 14:06:51 +03:00