Project

General

Profile

Actions

Bug #14606

closed

Deleting Last BFD Profile in FRR Package Causes PHP Fatal Error

Added by Bill Hughes 9 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
FRR
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
2.7.x
Affected Plus Version:
23.05.1
Affected Architecture:

Description

To reproduce:

1. Enable BFD in FRR.
2. Create a BFD profile (only requires a profile name).
3. Delete the BFD profile.
4. The following error is displayed.

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/frr/inc/frr_bfd.inc:89 Stack trace: #0 /usr/local/pkg/frr/inc/frr_bfd.inc(245): frr_bfd_generate_profiles() #1 /usr/local/pkg/frr.inc(684): frr_generate_config_bfd() #2 /usr/local/www/pkg_edit.php(245) : eval()'d code(1): frr_generate_config() #3 /usr/local/www/pkg_edit.php(245): eval() #4 {main} thrown in /usr/local/pkg/frr/inc/frr_bfd.inc on line 89 PHP ERROR: Type: 1, File: /usr/local/pkg/frr/inc/frr_bfd.inc, Line: 89, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/frr/inc/frr_bfd.inc:89 Stack trace: #0 /usr/local/pkg/frr/inc/frr_bfd.inc(245): frr_bfd_generate_profiles() #1 /usr/local/pkg/frr.inc(684): frr_generate_config_bfd() #2 /usr/local/www/pkg_edit.php(245) : eval()'d code(1): frr_generate_config() #3 /usr/local/www/pkg_edit.php(245): eval() #4 {main} thrown

An example of the error log is attached.

Affects both 23.05.1 and 2.7.0. Tested on Netgate 7100 and VM with CE.

Manually removing the empty <frrbfdprofiles> </frrbfdprofiles> tags in the config.xml stopped the error message from appearing.


Files

PHP_errors_FRR_BFD_error.log (487 Bytes) PHP_errors_FRR_BFD_error.log Bill Hughes, 07/24/2023 12:58 AM
Actions #1

Updated by Lev Prokofev 9 months ago

I can reproduce it on 23.05.1, error doesn't come if the BFD daemon is disabled, but occurs immediately when you enable it.

PHP ERROR: Type: 1, File: /usr/local/pkg/frr/inc/frr_bfd.inc, Line: 89, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/frr/inc/frr_bfd.inc:89
Stack trace:
#0 /usr/local/pkg/frr/inc/frr_bfd.inc(245): frr_bfd_generate_profiles()
#1 /usr/local/pkg/frr.inc(684): frr_generate_config_bfd()
#2 /usr/local/www/pkg.php(142) : eval()'d code(1): frr_generate_config()
#3 /usr/local/www/pkg.php(142): eval()
#4 {main}
  thrown
<pre>
</pre>
Actions #2

Updated by Lev Prokofev 9 months ago

  • Status changed from New to Confirmed
Actions #3

Updated by Jim Pingle 9 months ago

  • Assignee set to Jim Pingle
Actions #4

Updated by Jim Pingle 9 months ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100

Fixed in FRR Package v1.3, which is building now and will be available shortly.

Actions #5

Updated by Bill Hughes 9 months ago

Jim Pingle wrote in #note-4:

Fixed in FRR Package v1.3, which is building now and will be available shortly.

I tested both devices experiencing the issue: 23.05.1 (Netgate 7100) and 2.7.0 (Proxmox VM).

I confirmed older version still had the issue and then upgraded to FRR v1.3. no longer experiencing the issue.

Thanks!

Actions #6

Updated by Jim Pingle 9 months ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF