Project

General

Profile

Actions

Bug #14708

closed

PHP error when the system fails to create an interface

Added by Diana Moore about 1 year ago. Updated 22 days ago.

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

100%

Estimated time:
Plus Target Version:
24.11
Release Notes:
Force Exclusion
Affected Version:
Affected Architecture:

Description

When enabling 6rd while 6to4 is enabled on another interface the web ui will throw an error of Uncaught TypeError: pfSense_interface_rename().

This can also occur when enabling 6to4 with 6rd already enabled.

UI error shows the following when trying to enable 6to4 on wan with 6rd enabled on opt1 (Full trace attached to bug report):

Fatal error: Uncaught TypeError: pfSense_interface_rename(): Argument #1 ($ifname) must be of type string, array given in /etc/inc/interfaces.inc:4745 Stack trace: #0 /etc/inc/interfaces.inc(4745): pfSense_interface_rename(Array, 'wan_stf') #1 /etc/inc/interfaces.inc(4289): interface_6to4_configure('wan', Array) #2 /usr/local/www/interfaces.php(476): interface_configure('wan', true) #3 {main} thrown in /etc/inc/interfaces.inc on line 4745 PHP ERROR: Type: 1, File: /etc/inc/interfaces.inc, Line: 4745, Message: Uncaught TypeError: pfSense_interface_rename(): Argument #1 ($ifname) must be of type string, array given in /etc/inc/interfaces.inc:4745 Stack trace: #0 /etc/inc/interfaces.inc(4745): pfSense_interface_rename(Array, 'wan_stf') #1 /etc/inc/interfaces.inc(4289): interface_6to4_configure('wan', Array) #2 /usr/local/www/interfaces.php(476): interface_configure('wan', true) #3 {main} thrown

Static IPv6, SLAAC, and DHCPv6 are unaffected.

Interfaces involved:
  • wan - igb0 - Requires 6to4 for IPv6
  • opt1 - VLAN 201 on igb1 - Requires 6rd for IPv6

System is a Super Micro a1sri-2758f


Files

PHP_errors_wan.log (7.83 KB) PHP_errors_wan.log Enabling 6to4 on Wan Diana Moore, 08/24/2023 11:24 PM
PHP_errors_opt1.log (6.96 KB) PHP_errors_opt1.log Enabling 6rd on opt1 VLAN Diana Moore, 08/24/2023 11:24 PM
Actions #1

Updated by Christopher Cope about 1 year ago

I am unable to reproduce this on 23.05.1. I created an interface using 6to4 and then another using 6rd without error.

If you are able to reliably reproduce this, please provide a step-by-step process that triggers the error.

Actions #2

Updated by Diana Moore about 1 year ago

I tried to reproduce it on a seperate interface, but did not encounter the same error.

So it must be related to my overall configuration of the system.

I'll try to do some more testing, and see if I can reproduce the steps to get this error on a test system.

Actions #3

Updated by Marcos M 6 months ago

  • Project changed from pfSense Plus to pfSense
  • Subject changed from Uncaught TypeError: pfSense_interface_rename() when enabling a second interface with 6to4 or 6rd after first configuriung an interface to use 6to4 or 6rd to PHP error when the system fails to create an interface
  • Category changed from Interfaces to Interfaces
  • Status changed from New to Pull Request Review
  • Assignee set to Marcos M
  • Target version set to 2.8.0
  • Release Notes changed from Default to Force Exclusion
  • Affected Plus Version deleted (23.05.1)
  • Plus Target Version set to 24.08
  • Affected Architecture deleted (amd64)

https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/1157

This is not specific to 6rd. This can happen when the interface cannot be created, though the reason why is not passed down. We can add some better error handling around the relevant parts. Potentially, the root issue in the report has been solved in newer versions. We can reopen the report if that's not the case.

Actions #4

Updated by Marcos M 6 months ago

  • Status changed from Pull Request Review to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Jim Pingle about 1 month ago

  • Plus Target Version changed from 24.08 to 24.11
Actions #6

Updated by Marcos M 22 days ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF