Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Non exposed openvpn dhcp-option NBDD option

    Scheduled Pinned Locked Moved CE 2.7.0 Development Snapshots (Retired)
    5 Posts 2 Posters 1.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      phil80
      last edited by

      Hi,
      While working to add more options to the OpenVPN Client Specific Overrides (redmine_12522), I found that the code to specify an NBDD server address (NetBIOS over TCP/IP Datagram Distribution Server) was properly implemented in all relevant code vpn_openvpn_server.php, vpn_openvpn_csc.php and openvpn.inc

      Only the GUI menu is not present in both vpn_openvpn_server.php and vpn_openvpn_csc.php files

      Is it on purpose ? Or should the code be either discarded or the menu option exposed ?
      https://github.com/pfsense/pfsense/blob/master/src/etc/inc/openvpn.inc#L789

      Note that there is a small error in code:
      https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/vpn_openvpn_server.php#L833

      if ($pconfig['dns_server_enable']) {
      	$server['nbdd_server1'] = $pconfig['nbdd_server1'];
      }
      
      // should be
      if ($pconfig['nbdd_server_enable']) {
      	$server['nbdd_server1'] = $pconfig['nbdd_server1'];
      }
      

      Should I submit a separate PR ?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        I don't see anything that touched code specifically mentioning nbdd in over a decade so it probably was lost whenever the GUI was last overhauled (~2.3) or even older.

        NetBIOS has mostly died in general, though, so even if it is fixed I'm not sure how useful it will be. MS deprecated it in Windows 2000, though it's still hanging on by a thread in some areas.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        P 1 Reply Last reply Reply Quote 1
        • P
          phil80 @jimp
          last edited by

          @jimp said in Non exposed openvpn dhcp-option NBDD option:

          I don't see anything that touched code specifically mentioning nbdd in over a decade so it probably was lost whenever the GUI was last overhauled (~2.3) or even older.

          NetBIOS has mostly died in general, though, so even if it is fixed I'm not sure how useful it will be. MS deprecated it in Windows 2000, though it's still hanging on by a thread in some areas.

          Should I send a PR to remove the dead code ? Or rather expose the GUI option ?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Fixing the GUI option seems better at the moment, since it's partway to working. There may be someone out there who still needs it and OpenVPN itself hasn't deprecated it yet.

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            P 1 Reply Last reply Reply Quote 0
            • P
              phil80 @jimp
              last edited by phil80

              @jimp said in Non exposed openvpn dhcp-option NBDD option:

              Fixing the GUI option seems better at the moment, since it's partway to working. There may be someone out there who still needs it and OpenVPN itself hasn't deprecated it yet.

              Please look at this PR
              https://redmine.pfsense.org/issues/13085?next_issue_id=13084

              I am just not comfortable with pfsense using !(empty() for testing text/numeric form fields. This causes the value of 0 to be actually saved in settings, but it will not be exposed in GUI for example under NTP and WINS servers

              I implemented the proper way for php to validate this type of checks and added it to the CSC page only. But the problem is probably across all GUI pages. Using empty() is probably safe under most circumstances, but it is not very clean in the way it is implemented.

              I posted a gist with the php samples:
              https://gist.github.com/PhilZ-cwm6/4676368b77fc01d478f42b5c94f26a66

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.