No config entry for OMAPI


  • LAYER 8

    i'm trying to understand this but OMAPI is not working
    if i set this and save
    Immagine.jpg

    xml is ok but
    there is nothing inside /var/dhcpd/etc/dhcpd.conf about OMAPI
    and of course dhcpd is not listening at 7911

    does not save ->

    EOD;
    
            if (!isset($dhcpifconf['disableauthoritative'])) {
                    $dhcpdconf .= "authoritative;\n";
            }
    
            if (isset($dhcpifconf['alwaysbroadcast'])) {
                    $dhcpdconf .= "always-broadcast on\n";
            }
    
            // OMAPI Settings
            if (isset($dhcpifconf['omapi_port']) && is_numeric($dhcpifconf['omapi_port'])) {
                    $dhcpdconf .= <<<EOD
    
            key omapi_key {
            algorithm {$dhcpifconf['omapi_key_algorithm']};
            secret "{$dhcpifconf['omapi_key']}";
            };
            omapi-port {$dhcpifconf['omapi_port']};
            omapi-key omapi_key;
    
    EOD;
            }
    

  • Rebel Alliance Developer Netgate

    Worked for me on the first try. It's up near the top of the file.

    I used the same port you did, and had it auto-generate the key, which resulted in:

    [...]
    default-lease-time 7200;
    max-lease-time 86400;
    log-facility local7;
    one-lease-per-client true;
    deny duplicates;
    update-conflict-detection false;
    authoritative;
    
    key omapi_key {
      algorithm hmac-sha256;
      secret "<blah>";
    };
    omapi-port 7911;
    omapi-key omapi_key;
    [...]
    

  • LAYER 8

    @jimp

    i don't have it ☹

    [2.5.0-DEVELOPMENT][root@pfSense.localdomain]/etc/inc: cat /var/dhcpd/etc/dhcpd.conf
    
    option domain-name "localdomain";
    option ldap-server code 95 = text;
    option domain-search-list code 119 = text;
    option arch code 93 = unsigned integer 16; # RFC4578
    
    default-lease-time 7200;
    max-lease-time 86400;
    log-facility local7;
    one-lease-per-client true;
    deny duplicates;
    update-conflict-detection false;
    authoritative;
    class "s_lan" {
            match pick-first-value (option dhcp-client-identifier, hardware);
    }
    subnet 192.168.10.0 netmask 255.255.255.0 {
            pool {
                    option domain-name-servers 172.17.0.100,192.168.10.202;
                    ddns-update-style interim;
    
                    range 192.168.10.2 192.168.10.199;
            }
    
            option routers 192.168.10.254;
            option domain-name "kiokoman.home";
            ddns-domainname "kiokoman.home";
            allow client-updates;
    

  • Rebel Alliance Developer Netgate

    I think I might see why. It's using a variable set inside the per-interface foreach outside of the foreach, so the results may be unpredictable depending on whether it's set on the last interface or not. It's trying to take a per-interface setting and trying to apply it globally.

    Open an issue at https://redmine.pfsense.org and we'll take a look. The code right above that for disableauthoritative and alwaysbroadcast has the same problem.

    There is an open request to make a dedicated settings tab ( https://redmine.pfsense.org/issues/5080 ) which may be the end result here, though the items mentioned on that redmine issue are not all relevant or likely to happen in this release.


  • LAYER 8


Log in to reply