Regression #11441
closedUnable to create static routes
0%
Description
Upon upgrading to 2.5.0, my pfSense instance was inaccessible. After some playing around with interfaces etc. it appears as though there is some sort of issue with static routing.
When attempting to add a static route (I have tried multiple) the following crash happens:
Crash report begins. Anonymous machine information: amd64 12.2-STABLE FreeBSD 12.2-STABLE d48fb226319(devel-12) pfSense Crash report details: PHP Errors: [18-Feb-2021 13:33:41 Etc/UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function route_add_or_change(), 1 passed in /etc/inc/system.inc on line 764 and at least 2 expected in /etc/inc/util.inc:2770 Stack trace: #0 /etc/inc/system.inc(764): route_add_or_change('-inet 10.20.40...') #1 /etc/inc/system.inc(669): system_staticroutes_configure('', false) #2 /etc/rc.openvpn(81): system_routing_configure() #3 {main} thrown in /etc/inc/util.inc on line 2770 [18-Feb-2021 13:34:39 Etc/UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function route_add_or_change(), 1 passed in /etc/inc/system.inc on line 764 and at least 2 expected in /etc/inc/util.inc:2770 Stack trace: #0 /etc/inc/system.inc(764): route_add_or_change('-inet 10.20.40...') #1 /etc/inc/system.inc(669): system_staticroutes_configure('', false) #2 /usr/local/www/system_gateways.php(74): system_routing_configure() #3 {main} thrown in /etc/inc/util.inc on line 2770 [18-Feb-2021 13:35:55 Etc/UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function route_add_or_change(), 1 passed in /etc/inc/system.inc on line 764 and at least 2 expected in /etc/inc/util.inc:2770 Stack trace: #0 /etc/inc/system.inc(764): route_add_or_change('-inet 10.20.40...') #1 /etc/inc/system.inc(669): system_staticroutes_configure('', false) #2 /usr/local/www/system_gateways.php(74): system_routing_configure() #3 {main} thrown in /etc/inc/util.inc on line 2770 [18-Feb-2021 13:36:30 Etc/UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function route_add_or_change(), 1 passed in /etc/inc/system.inc on line 764 and at least 2 expected in /etc/inc/util.inc:2770 Stack trace: #0 /etc/inc/system.inc(764): route_add_or_change('-inet 10.20.40...') #1 /etc/inc/system.inc(669): system_staticroutes_configure('', false) #2 /usr/local/www/system_routes.php(59): system_routing_configure() #3 {main} thrown in /etc/inc/util.inc on line 2770 [18-Feb-2021 13:37:17 Etc/UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function route_add_or_change(), 1 passed in /etc/inc/system.inc on line 764 and at least 2 expected in /etc/inc/util.inc:2770 Stack trace: #0 /etc/inc/system.inc(764): route_add_or_change('-inet 10.20.40...') #1 /etc/inc/system.inc(669): system_staticroutes_configure('', false) #2 /usr/local/www/system_routes.php(59): system_routing_configure() #3 {main} thrown in /etc/inc/util.inc on line 2770 [18-Feb-2021 13:41:28 Etc/UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function route_add_or_change(), 1 passed in /etc/inc/system.inc on line 764 and at least 2 expected in /etc/inc/util.inc:2770 Stack trace: #0 /etc/inc/system.inc(764): route_add_or_change('-inet 10.0.0.0...') #1 /etc/inc/system.inc(669): system_staticroutes_configure('', false) #2 /usr/local/www/system_routes.php(59): system_routing_configure() #3 {main} thrown in /etc/inc/util.inc on line 2770 [18-Feb-2021 13:44:44 Etc/UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function route_add_or_change(), 1 passed in /etc/inc/system.inc on line 764 and at least 2 expected in /etc/inc/util.inc:2770 Stack trace: #0 /etc/inc/system.inc(764): route_add_or_change('-inet 1.1.1.1/...') #1 /etc/inc/system.inc(669): system_staticroutes_configure('', false) #2 /usr/local/www/system_routes.php(59): system_routing_configure() #3 {main} thrown in /etc/inc/util.inc on line 2770 No FreeBSD crash data found.
My instance had a static route set before the upgrade, and after upgrading the device I was unable to access it over any interface until I removed the interface through which the static route was routing traffic.
PHP log attached.
Thanks
Files
Updated by Renato Botelho over 4 years ago
- Status changed from New to Rejected
Something is not right on your system (maybe a broken upgrade ??). Line 764 of system.inc doesn't have a call to route_add_or_change() as you can see at
https://github.com/pfsense/pfsense/blob/RELENG_2_5_0/src/etc/inc/system.inc#L764
Post on forum to diagnose