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

A few problems with DHCP

Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
2 Posts 2 Posters 1.5k 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.
  • M
    mwixon
    last edited by Jan 4, 2010, 1:30 AM

    Hi -

    I've been testing some of the new options on DHCP, such as tftp server, and "Additional DHCP" Options.  I found a few problems:

    1)  If you add a "numbered option" and then delete it, so you have no more left, the DHCP config screen will crap out on line 312 in services_dhcp.php.  I think you're just missing a if (isset …)

    
    before:  
                   unset($config['dhcpd'][$if]['numberoptions']['item']);
    after:
                   if ( isset($config['dhcpd'][$if]['numberoptions']['item']))
                            unset($config['dhcpd'][$if]['numberoptions']['item']);
    
    

    the above seems to fix it.

    2)  some of the "numbered options" expect int32 or uint32, but it seems that the config always writes it as a string.  I haven't found where this happens yet.

    For instance to set tz offset in seconds, I'm east coast, so that would be -18000  DHCP option 2.    The config generated by the gui for this is below, but doesn't work:

    
    option domain-name "local";
    option ldap-server code 95 = text;
    option domain-search-list code 119 = text;
    option custom-opt-0 code 2 = text;
    
    default-lease-time 7200;
    max-lease-time 86400;
    log-facility local7;
    ddns-update-style none;
    one-lease-per-client true;
    deny duplicates;
    ping-check true;
    authoritative;
    subnet 172.16.10.0 netmask 255.255.255.0 {
            pool {
                    range 172.16.10.150 172.16.10.179;
            }
            option routers 172.16.10.1;
            option domain-name-servers 172.16.10.1;
            option ntp-servers 172.16.10.1;
            option tftp-server-name "172.16.10.70";
    
            option custom-opt-0 "-18000";
    }
    
    
    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Jan 4, 2010, 4:25 AM

      Good catch :)

      It would probably be best to open this up as a ticket in redmine ( http://redmine.pfsense.org ) and if possible, include a diff/patch.

      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!

      1 Reply Last reply Reply Quote 0
      1 out of 2
      • First post
        1/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received