manually killing OpenVPN connection in dashboard widget crashes after upgrade to 2.6.0
-
Hi,
today i got this error messages after trying to manually kill a openvpn connection via the dashboard widget.
Crash report begins. Anonymous machine information: amd64 12.3-STABLE FreeBSD 12.3-STABLE RELENG_2_6_0-n226742-1285d6d205f pfSense Crash report details: PHP Errors: [28-Feb-2022 17:58:08 Europe/Berlin] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function openvpn_kill_client(), 2 passed in /usr/local/www/widgets/widgets/openvpn.widget.php on line 285 and exactly 3 expected in /etc/inc/openvpn.inc:2106 Stack trace: #0 /usr/local/www/widgets/widgets/openvpn.widget.php(285): openvpn_kill_client('server1', '12.34.56.78:...') #1 {main} thrown in /etc/inc/openvpn.inc on line 2106 [28-Feb-2022 17:58:31 Europe/Berlin] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function openvpn_kill_client(), 2 passed in /usr/local/www/widgets/widgets/openvpn.widget.php on line 285 and exactly 3 expected in /etc/inc/openvpn.inc:2106 Stack trace: #0 /usr/local/www/widgets/widgets/openvpn.widget.php(285): openvpn_kill_client('server1', '12.34.56.78:...') #1 {main} thrown in /etc/inc/openvpn.inc on line 2106 No FreeBSD crash data found.
Worked before i did the upgrade from previous version.
-
Function definition got changed a couple of month ago, for 2.6.0. But not all the one that call it.
To make a long story short :
Edit /usr/local/www/widgets/widgets/openvpn.widget.php line 285, make it look like this :$retval = openvpn_kill_client($port, $remipp, "");
That adds the missing third parameter. That will do it.
Or, forget about the widget, goto Status > OpenVPN and kill there. No edits needed then. -
Hi,
that worked perfectly fine. Thanks a lot.
I just wanted to point that out so it can be fixed.
I like the widget as i see everything on the dashboard and i can even do some actions there without the need to click around.
Anyway, thanks again!
Have a nice time and stay safe.
-
Fixed in upstream:
https://redmine.pfsense.org/issues/12817You can install the System Patches pkg:
https://docs.netgate.com/pfsense/en/latest/development/system-patches.htmland apply patch id 3ade222beb2cae2c0681ed69d4e5a0c82c6303f9
-
@viktor_g said in manually killing OpenVPN connection in dashboard widget crashes after upgrade to 2.6.0:
https://redmine.pfsense.org/issues/12817
Thanks, the issue was already known for 12 days - I forgot to look at the Regression list.
Btw : Not related : This would normally do :
but this does nothing. After a "Save" and a "Fetch" :
The URL got extended to :
https://github.com/pfsense/pfsense/commit/3ade222beb2cae2c0681ed69d4e5a0c82c6303f9.patch
and that URL is correct.
But .....No Test Debug Apply View buttons, as the patch didn't got fetched ?! The Patch Contents box in the patch stays empty.
The Patcher needs to be patcher ? Or it's just late (01h43 AM here).
Anyway, copy pasting the patch content manually in the Patch Contents box, and all is fine : I could patch.
-
@gertjan said in manually killing OpenVPN connection in dashboard widget crashes after upgrade to 2.6.0:
No Test Debug Apply View buttons, as the patch didn't got fetched ?! The Patch Contents box in the patch stays empty.
The Patcher needs to be patcher ? Or it's just late (01h43 AM here).Hello!
Are you running the new 2.0x System Patches package? It is broken when trying to use custom patches.
https://forum.netgate.com/topic/170300/new-system-patches-v2-0/9
John
-
@serbus said in manually killing OpenVPN connection in dashboard widget crashes after upgrade to 2.6.0:
Are you running the new 2.0x System Patches package?
The latest ... for now.
I copy pasted the patch from https://github.com/pfsense/pfsense/commit/3ade222beb2cae2c0681ed69d4e5a0c82c6303f9.patch that woks.
Normally, when you enter an ID like 3ade222beb2cae2c0681ed69d4e5a0c82c6303f9 and a Description, it should figure out the rest all by itself.
-
There is a bug when fetching patches, I'll have a fix in shortly. In the meantime, visit the URL for that patch and copy/paste the text into the patch entry manually rather than using the URL.
-
-
-
-
-