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

    DHCP Additional DHCP options issue

    Scheduled Pinned Locked Moved 2.3-RC Snapshot Feedback and Issues - ARCHIVED
    6 Posts 4 Posters 2.1k 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.
    • C
      C0RR0SIVE
      last edited by

      Playing with wpad and the such on 2.3, I have found I get an interesting error.

      At the bottom under "Additional BOOTP/DHCP Options" when I use [Option 252 String "http://xxx.xxx.xxx.xxx/xxx.ext"] and click "Save" I get an error at the topโ€ฆ

      The following input errors were detected:
      String type must be enclosed in quotes like "this" or must be a series of octets specified in hexadecimal, separated by colons, like 01:23:45:67:89๐Ÿ†Žcd:ef
      String type must be enclosed in quotes like "this" or must be a series of octets specified in hexadecimal, separated by colons, like 01:23:45:67:89๐Ÿ†Žcd:ef
      String type must be enclosed in quotes like "this" or must be a series of octets specified in hexadecimal, separated by colons, like 01:23:45:67:89๐Ÿ†Žcd:ef

      As far as I can tell, "http://192.168.1.2/wpad.dat" and so on is a valid entry is it not?

      What is more interesting, if I have DHCP turned off, it lets me save the settings, but I can't turn DHCP on in the WebGUI with those entries present.

      1 Reply Last reply Reply Quote 0
      • J
        JorgeOliveira
        last edited by

        Hi,

        I have done a little digging on the code and it seems it only supports up to option 99.
        https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcp.php#L228

        And there is an equivalent limitation on v6 as well:
        https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcpv6.php#L179

        (Not 100% sure about this, maybe someone more skilled can shed some light on this subject)

        Regards,
        Jorge M. Oliveira

        Edit!
        Problem is that option is base64_encoded and not decoded while checking:
        https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcp.php#L233
        https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcp.php#L379

        My views have absolutely no warranty express or implied. Always do your own research.

        1 Reply Last reply Reply Quote 0
        • H
          heper
          last edited by

          i'm guessing the <99 points to the amount of individual entries/records | so not about the actual option_number

          1 Reply Last reply Reply Quote 0
          • J
            JorgeOliveira
            last edited by

            I've opened a PR that should fix the issue.

            Please test if you can and let us know if it works.
            https://github.com/pfsense/pfsense/pull/2492

            Thanks :)

            My views have absolutely no warranty express or implied. Always do your own research.

            1 Reply Last reply Reply Quote 0
            • rbgargaR
              rbgarga Developer Netgate Administrator
              last edited by

              @JorgeOliveira:

              I've opened a PR that should fix the issue.

              Please test if you can and let us know if it works.
              https://github.com/pfsense/pfsense/pull/2492

              Thanks :)

              Merged, thanks!

              Renato Botelho

              1 Reply Last reply Reply Quote 0
              • C
                C0RR0SIVE
                last edited by

                Working great here so far, Thanks a lot!!! :)

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