Commit graph

37432 commits

Author SHA1 Message Date
Quentin Young 5fba3c4d74 watchfrr: increase restart timer 20s -> 90s
This commit:
"tools: run `vtysh -b` once for all-startup"

changed things so that `vtysh -b` is run after all daemons have started
up instead of doing it for each daemon as they are started up. This
results in one long `vtysh -b`, which for large configs and many daemons
(in the case I saw, 4 daemons and 30,000 line config) can exceed the 20
second timer watchfrr uses to kill "hung" background tasks.

Shouldn't be any harm to increasing this to 90 seconds to give us some
leeway while still making sure we kill anything truly misbehaving.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2024-12-09 12:35:42 -05:00
Wesley Coakley a72d1a1124 pbrd: fix vrf_unchanged which may depend on other seqs
Ticket: 2740911
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2024-12-09 12:31:29 -05:00
Anuradha Karuppiah e57ad2fbcd pimd: skip init of mlag roles based on the zebra capabilities message
Looks like the cap setting was added for testing mlag via zebra test cli
to config the mlag role. However it is interfering with the valid state
updates rxed from the MLAG daemon based on timing (in some cases the
MLAG state changes are rxed before the capabilities).

Reference logs -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@TORC11:mgmt:/home/cumulus# grep -ri "my_role\|MlagRole" /var/log/frr/bgpd.log
2021/06/18 13:26:40.380130 PIM: pim_mlag_process_mlagd_state_change: msg dump: my_role: SECONDARY, peer_state: DOWN
2021/06/18 13:26:40.380766 PIM: pim_mlag_process_mlagd_state_change: msg dump: my_role: SECONDARY, peer_state: DOWN
2021/06/18 13:26:41.382258 PIM: pim_mlag_process_mlagd_state_change: msg dump: my_role: SECONDARY, peer_state: RUNNING
2021/06/18 13:26:41.382379 PIM: pim_mlag_process_mlagd_state_change: msg dump: my_role: PRIMARY, peer_state: RUNNING
2021/06/18 13:26:52.386071 ZEBRA: Sending capabilities to client pim: MPLS enabled numMultipath 128 GR disabled MaintMode off MlagRole 0
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Ticket: #2691629

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2024-12-09 12:31:29 -05:00
Donald Sharp b3facc23df zebra: Reduce memory usage of streams for encoding packets
For those packets that we are not sending 16k of data, but something
far less than 256 bytes.  Reduce those stream sizes we allocate
to something much more reasonable.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-09 12:31:29 -05:00
vivek f8c464688d bgpd: Check L3VNI status before announcing default
Check that the L3VNI is "up" before taking action to announce or
withdraw the EVPN type-5 default based on configuration. Otherwise,
there can be timing conditions where a EVPN type-5 default route
gets announced without a VNI and with invalid route targets.

Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>

Ticket: #2684144
Reviewed By: Chirag Shah
Testing Done:
1. Rerun failed test multiple times successfully
2. Some manual testing
3. precommit and partial evpn-smoke
2024-12-09 12:31:29 -05:00
vivek e2b20dfb33 zebra: Reset MAC's remote sequence number appropriately
When a MAC gets deleted but associated neighbors remain, the MAC is
kept in the zebra MAC database as an internal ("auto") entry. When
this happens, reset the MAC's remote sequence number. This ensures that
when the host with the MAC later comes up behind a remote VTEP, the
local switch accepts the MAC and installs it into the bridge FDB and
we don't end up in a situation where remote MACs are not installed
into the bridge FDB.

This fix is a corollary of CM-22753 and is this time done for local
MACs upon delete.

Note: Commit is marked Cumulus-only because I need to evalute more
comprehensive changes before upstreaming it.

Ticket: CM-29581
Reviewed By: As above
Testing Done:
1. Multiple rounds of manual testing
2. Two rounds of evpn-smoke, 1 round of precommit

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Acked-by:      Chirag Shah <chirag@cumulusnetworks.com>
Acked-by:      Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2024-12-09 12:29:38 -05:00
Donald Sharp c05c2b15e5
Merge pull request #17461 from csiltala/multicast-boundary-acl
pimd: Extend multicast boundary/ACL functionality
2024-12-09 10:42:04 -05:00
Donatas Abraitis 17a0d92ffd
Merge pull request #17589 from anlancs/master_up
zebra: use macro for one check
2024-12-07 22:35:12 +02:00
Donatas Abraitis 797cf4757e
Merge pull request #17538 from idryzhov/netns-doc
doc: remove no-op "netns NAMESPACE" command from the docs
2024-12-07 22:32:00 +02:00
Igor Ryzhov e51c6dd256 zebra: add deprecation notice for no-op netns command
Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2024-12-07 17:02:58 +02:00
Igor Ryzhov c3bffa9277 doc: remove no-op "netns NAMESPACE" command from the docs
Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2024-12-07 17:02:58 +02:00
Corey Siltala 8465ba1dde pimd: Convert boundary_oil_plist to struct prefix_list
Rather than storing the prefix-list name and looking it up every time we use it, store a pointer to the prefix-list itself.

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-12-06 14:44:52 -06:00
Corey Siltala ff5309ca2d doc: Expand ACL and multicast boundary documentation
Add documentation for existing extended access-list functionality and
the new "ip multicast boundary" command leveraging that functionality.

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-12-06 14:44:52 -06:00
Corey Siltala 7c2c70dd2b tests: Add basic multicast boundary test
Add simple test to show filtering of IGMP joins using new "ip multicast
boundary" filtering with access-lists, include test of existing prefix-
list based "ip multicast boundary oil" command.

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-12-06 14:44:52 -06:00
Corey Siltala 4de4017d64 pimd,yang: Extend multicast boundary functionality
Add new interface command ip multicast boundary ACCESSLIST4_NAME. This
allows filtering on both source and group using the extended access-list
syntax vs. group-only as with the existing "ip multicast boundary oil"
command, which uses prefix-lists. If both are configured, the prefix-
list is evaluated first. The default behavior for both prefix-lists and
access-lists remains "deny", so the prefix-list must have a terminating
"permit" statement in order to also evaluate against the access-list.

The following example denies groups in range 229.1.1.0/24 and groups in
range 232.1.1.0/24 with source 10.0.20.2:

!
ip prefix-list pim-oil-plist seq 10 deny 229.1.1.0/24
ip prefix-list pim-oil-plist seq 20 permit any
!
access-list pim-acl seq 10 deny ip host 10.0.20.2 232.1.1.0 0.0.0.255
access-list pim-acl seq 20 permit ip any any
!
interface r1-eth0
 ip address 10.0.20.1/24
 ip igmp
 ip pim
 ip multicast boundary oil pim-oil-plist
 ip multicast boundary pim-acl
!

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-12-06 14:44:17 -06:00
Corey Siltala a9bee74ea2 pimd: Move ACL handling to pim_util.c
Move the extended access-list handling from pim_msdp_packet.c to
pim_util.c to allow use elsewhere in the daemon.

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-12-06 14:44:17 -06:00
Jafar Al-Gharaibeh f1a9b9292c
Merge pull request #17603 from opensourcerouting/fix/bgp_peer_with_peer-group
bgpd: Check if as_type is not specified when peer is a peer-group member
2024-12-06 08:55:56 -06:00
Donatas Abraitis 03ea25af68
Merge pull request #17545 from pguibert6WIND/peerup_loc_rib_wrong_format
bgpd: fix peer up message for loc-rib not sent
2024-12-06 14:47:48 +02:00
Donatas Abraitis 3d15035491
Merge pull request #17579 from donaldsharp/timer_connect_bgp_vrf_netns
Timer connect bgp vrf netns
2024-12-06 14:26:33 +02:00
Donatas Abraitis 2797506a5e bgpd: Check if as_type is not specified when peer is a peer-group member
Fixes this sequences:

```
neighbor pg4 peer-group
neighbor 127.0.0.4 peer-group pg4
neighbor 127.0.0.4 remote-as 65004

neighbor pg5 peer-group
neighbor 127.0.0.5 peer-group pg5
neighbor 127.0.0.5 remote-as internal
```

Fixes: 0dfe256 ("bgpd: Implement neighbor X remote-as auto")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-06 08:25:09 +02:00
Jafar Al-Gharaibeh 38ca408c54
Merge pull request #17600 from donaldsharp/bfd_shared_network
Bfd shared network
2024-12-05 22:13:39 -06:00
Donald Sharp a5c5b87389 tests: Fix invalid escape seq seen in bgp_nexthop_ipv6
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 14:08:20 -05:00
Donald Sharp dc372568ad tests: Convert to using neighbor X timers connect 1 for exabgp using tests
For those tests using exabgp convert them all to use `neighbor X timers
connect 1`.  I have noticed that occassionally when looking at the
support files for tests run that peers are in a wait period for
reconnecting which is longer than the test is waiting to converge.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 14:08:12 -05:00
Donald Sharp a43b11fcf6
Merge pull request #17570 from btrent98/igmp-proxy-memfix
pimd: free igmp proxy joins on interface deletion
2024-12-05 10:23:30 -05:00
Donald Sharp 3b97cbf77e bgpd: When bgp notices a change to shared_network inform bfd of it
When bgp is started up and reads the config in *before* it has
received interface addresses from zebra, shared_network can
be set to false in this case.  Later on once bgp attempts to
reconnect it will refigure out the shared_network again( because
it has received the data from zebra now ).  In this case
tell bfd about it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 10:21:26 -05:00
Donald Sharp 7cde71a8e3 bgpd: shared_network is a bool, convert it to such
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 10:19:55 -05:00
Donald Sharp 645a82ec60 tests: bfd_profiles_topo1 is taking a long time to reconnect
Make it faster

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 10:19:55 -05:00
Philippe Guibert f921a8d09a topotests: bmp, test that loc-rib peer up message is sent
Add a test at startup to ensure that peer up message for loc-rib is
correctly set.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-05 15:42:10 +01:00
Philippe Guibert 013b9d4c19 bgpd: fix peer up message for loc-rib not sent
At startup, there is no peer up message for loc-rib instance peer.
Instead, a global peer up message with address 0.0.0.0 is sent.

Such message is wrong, violates the RFC and should be dropped by
a strict collector. Actually, the peer type message sent is wrong,
and should be set to LOC-RIB peer type.

Fix this by changing the peer type of peer up message to either
loc-rib or global instance peer type.

Fixes: 035304c25a ("bgpd: bmp loc-rib peer up/down for vrfs")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-05 15:42:10 +01:00
anlan_cs f536ca30f5 zebra: use macro for one check
Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-12-05 21:20:05 +08:00
Donatas Abraitis 34485ee536
Merge pull request #17582 from pguibert6WIND/no_neighbor_asdot_fix
bgpd: fix unconfigure asdot neighbor
2024-12-05 09:32:54 +02:00
Jafar Al-Gharaibeh e814b000c3
Merge pull request #17585 from donaldsharp/zclient_speedup
lib: Speed up reconnection attempts for zapi
2024-12-04 21:59:33 -06:00
Jafar Al-Gharaibeh 59b0a6e339
Merge pull request #17502 from opensourcerouting/msdp-shutdown
pimd: implement MSDP shutdown command
2024-12-04 21:57:18 -06:00
Donald Sharp fe180581bd lib: Speed up reconnection attempts for zapi
Currently the zapi reconnection is once every 10 seconds
for the first 3 times and then once every 60 seconds from then
on out.  We are seeing interesting behavior under loaded systems
where zebra is just slow to come up and daemons are spending a long
time waiting to connect.  Let's just make things a bit more aggressive.

Change the code to attempt to reconnect once every second for 30 seconds
and then change to once every 5 seconds from then on out.

This should help with non-integrated configuration on system startup.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-04 16:14:34 -05:00
Jafar Al-Gharaibeh 7c8cef4891
Merge pull request #17578 from donaldsharp/pim_autorp_prevent_crash
pimd: Prevent crash of pim when auto-rp's socket is not initialized
2024-12-04 14:40:25 -06:00
Philippe Guibert 12a9ca4de6 bgpd: fix unconfigure asdot neighbor
The below command is not successfull on an existing as dot peer

> no neighbor 10.0.0.2 remote-as 1.1
> % Create the peer-group or interface first

Handle the case where the remote-as argument can be an ASNUM.

Fixes: 8079a4138d ("lib, bgp: add initial support for asdot format")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-04 21:29:34 +01:00
Barry A. Trent 693a37ab04 pimd: free igmp proxy joins on interface deletion
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-12-04 10:51:54 -08:00
Donald Sharp 37b88191fb pimd: Prevent crash of pim when auto-rp's socket is not initialized
If the socket associated with the auto-rp fails to initialize then
the memory for the auto-rp is just dropped on the floor.  Additionally
any type of attempt at using the feature will just cause pimd to crash,
when the pointer is derefed.  Since it is derefed all over the place
without checking.

Clearly if you cannot bind/use the socket let's allow continuation.

Fixes: #17540
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-04 10:49:49 -05:00
Donald Sharp 6bf4283421
Merge pull request #17569 from btrent98/igmp-proxy-bugfix
pimd: igmp proxy joins should not be written as part of config
2024-12-04 08:16:24 -05:00
Russ White f1ab0a0c2f
Merge pull request #17556 from opensourcerouting/fix/add_route_map_action_reason
lib: Print the reason why the route-map and/or the index parsing is done
2024-12-04 08:09:48 -05:00
Donatas Abraitis 75e9b1b090
Merge pull request #17571 from donaldsharp/fix_bsd_sockopt_problem
Fix bsd sockopt problem
2024-12-04 14:46:08 +02:00
Donatas Abraitis 5b976f00f6 lib: Print the reason why the route-map and/or the index parsing is done
This would give more details why at some point we return deny, no match, etc.

Before this we have sometimes (I don't know why), e.g.:

```
Route-map: null, prefix: 192.168.2.0/24, result: deny
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-04 08:27:13 +02:00
Jafar Al-Gharaibeh 9797f20a1e
Merge pull request #17558 from donaldsharp/bfd_fix
lib: Fix session re-establishment
2024-12-03 20:06:28 -06:00
Donald Sharp 959dbe27cd lib,vtysh: Use backoff setsockopt option for freebsd
Commit: 9112fb367b

Introduced the idea of setting the socket buffer
send/receive sizes.  BSD's in general have the fun
issue of not allowing nearly as large as a size as
linux.  Since the above commit was developed on linux
and not run on bsd it was never tested.  Modify the
codebase to use the backoff setsockopt that we have
in the code base and use the returned values to allow
us to notice what was set and respond appropriately.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-03 18:49:59 -05:00
Donald Sharp d5615fd6f8 lib: Allow setsockopt functions to return size set
When finding a send/receive buffer size that is usable
let's report how big we were able to set it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-03 18:38:59 -05:00
Barry A. Trent d4b8a98019 pimd: igmp proxy joins should not be written as part of config
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-12-03 13:44:08 -08:00
Donatas Abraitis 267dc19825
Merge pull request #17518 from csiltala/fix-pimd-acl-memleak
pimd: Fix access-list memory leak in pimd
2024-12-03 23:35:34 +02:00
Jafar Al-Gharaibeh 71f9899bc4
Merge pull request #17313 from mjstapp/zserv_open_unpriv
zebra: separate zebra ZAPI server open and accept
2024-12-03 14:26:09 -06:00
Donald Sharp 2c6fcbdf84 lib: Fix session re-establishment
Currently if you have this sequence of events:

a) BGP starts
b) BGP reads cli that has bfd configuration
c) BGP attempts to install bfd configuration but fails because
zebra is not connected to yet
d) BGP connects to zebra
e) BGP receives resend bfd code from bfdd
f) BGP was not sending down the unsent data to bfd, never causing
the bfd session to be established.

So effectively bfd was attempting to install but failed
and then when it was asked to replay everything it decided
that the bfd information for a particular peer was actually
installed and does not need to be resent.  Modify the code
such that the bfd code now tracks failed installation and
allows the resend of data to bfdd.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-03 12:08:12 -05:00
Russ White e9c9db0122
Merge pull request #17542 from opensourcerouting/fix/peer-group_remote_as_regression
bgpd: Fix remote-as with peer-group
2024-12-03 10:05:44 -05:00