Project

General

Profile

Actions

Feature #13085

closed

OpenVPN NBDD server options

Added by Phil Wardt over 2 years ago. Updated 7 months ago.

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

0%

Estimated time:
Plus Target Version:
24.03
Release Notes:
Default

Description

In first commit, I expose the NBDD servers in GUI, replace some spaces by tabs and fix the GUI bugs
Commit 1: OpenVPN: expose NBDD servers option and fix gui bugs
- add option to push NBDD servers to client in both server and specific client overrides
- in OpenVPN server, when enabling NetBios options, then WINS Servers, disabling Netbios options now properly hides WINS Servers fields
- properly do not save NetBios settings in config when NetBios option is disabled in both server and client specific overrides
- in client specific overrides: NTP and DNS options: use javascript instead of toggles class because the latter causes inverted results when repeating clicks too quickly. This also matches the code used in the server page

Optional second commit:
OpenVPN: Rename deprecated settings variables
- the netbios old settings variables are automatically converted when loading the settings file, so deprecate them in openvpn.inc

Optional last commit
Fix upstream empty() / 0 confusion
- if you set DNS/NTP servers values to 0, they will be saved in config, but on edit, the field is hidden, yet the server is properly saved as '0'.
This is because testing string 0 is false and empty() can be false for 'boolean true' and true for numeric '0'
This patch properly tests if a field has entries, text or numeric, excluding NULL, unset, empty and booleans


Files

expose_nbdd_servers-v1.0.patch (18.3 KB) expose_nbdd_servers-v1.0.patch Phil Wardt, 04/22/2022 03:50 AM
openvpn_nbdd.patch (6.35 KB) openvpn_nbdd.patch Phil Wardt, 11/06/2023 06:39 PM
Actions #1

Updated by Phil Wardt over 2 years ago

Github pull request:
https://github.com/pfsense/pfsense/pull/4572

The first commit fixes a few annoying GUI bugs too

The second commit looks safe to me
The last one: the issue is using !empty() on form fields. A value of '0' can be entered, and will be saved in the settings file, but the GUI will not show it unless we enable the option again.
This should be fixed around most current GUI pages. I provide this optional implementation for the Client specific overrides as an example

Please feel free to merge only the commits you feel needed

Actions #2

Updated by Phil Wardt over 2 years ago

patch applying to current master branch and to release v2.6

Actions #3

Updated by Jim Pingle over 2 years ago

  • Status changed from New to Pull Request Review
Actions #4

Updated by Phil Wardt over 2 years ago

I posted the following patches: #13087, #13088, #13089

Once they are merged, I will push the NDBB server part, as it is linked to the Netbios and Wins servers show/hide functions that need to be fixed first

Actions #5

Updated by Marcos M about 1 year ago

  • Subject changed from OpenVPN: expose NBDD servers in GUI + fix GUI bugs to OpenVPN: expose NBDD servers in GUI
  • Status changed from Pull Request Review to New
  • Assignee deleted (Jim Pingle)

Please submit a new PR with the relevant changes for NBDD.

Actions #6

Updated by Phil Wardt about 1 year ago

I posted a new patch as requested
https://github.com/pfsense/pfsense/pull/4653

I will add the patch diff file later here

Actions #7

Updated by Phil Wardt about 1 year ago

And the patch working on current git release

Actions #8

Updated by Marcos M about 1 year ago

  • Assignee set to Marcos M
  • Target version set to 2.8.0
  • Plus Target Version set to 24.03

Merged after some minor touchups.

Applied in changeset 6c01ae83c2480d5ae692ae11c94918a0cfd43a52.

Actions #9

Updated by Phil Wardt about 1 year ago

@Marcos M
Thank you for having noticed that I missed the nbdd_server_change "();" in code

Actions #10

Updated by Marcos M 12 months ago

  • Status changed from New to Feedback
Actions #11

Updated by Jim Pingle 10 months ago

  • Subject changed from OpenVPN: expose NBDD servers in GUI to OpenVPN NBDD server options
Actions #12

Updated by Jim Pingle 7 months ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF