Bug #14606
closedDeleting Last BFD Profile in FRR Package Causes PHP Fatal Error
100%
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
Updated by Lev Prokofev over 1 year 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>
Updated by Jim Pingle over 1 year 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.
Updated by Bill Hughes over 1 year 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!