invalid expression type in print_expression: 45

Glenn Satchell glenn.satchell at uniq.com.au
Wed Nov 4 14:06:41 UTC 2015


On Thu, November 5, 2015 12:42 am, Bob Harold wrote:
> On Mon, Nov 2, 2015 at 6:45 PM, Shraddha Pandhe
> <spandhe.openstack at gmail.com
>> wrote:
>
>> Hi folks,
>>
>> I am using dhcp-4.1.1-49.
>>
>> What are the possible reasons for getting this error? I have been using
>> the same dhcpd.conf without any issues. Today, I removed "dhcp-domain"
>> option from the subnet definition and I started seeing this issue.
>> Adding
>> dhcp-domain back didn't help, so I am not sure if that caused anything.
>>
>>
>>
>> My dhcpd config file:
>>
>>
>> # dhcpd.conf
>> #
>> # Sample configuration file for ISC dhcpd
>> #
>> log-facility local6;
>> allow booting;
>> deny unknown-clients;
>> ddns-update-style none;
>> default-lease-time 3600;
>>
>> lease-file-name "/home/neutron/dhcpd/dhcpd.leases";
>> pid-file-name "/home/neutron/dhcpd/pid";
>>
>> next-server <ip-address>;
>> server-name "<ip-address>";
>>
>> omapi-port 7911;
>>
>> # Local subnet definition is required to start dhcpd
>> subnet <ip-address> netmask 255.255.255.255 {
>> }
>>
>>
>> if exists user-class and option user-class = "iPXE" {
>>    filename "init.ipxe";
>> }
>> elsif exists user-class and option user-class = "gPXE" {
>>    filename "init.gpxe";
>> }
>> else {
>>    filename "undionly.kpxe";
>> }
>>
>> ####################################################################
>> #           DHCP Subnet Definitions to follow               #
>> ####################################################################
>> # NETWORK_ID 0b00f86d-2dbd-4931-8a17-8ddaea74f475
>> subnet 192.168.122.0 netmask 255.255.255.0 {
>>   option broadcast-address 192.168.122.255;
>>   option domain-name-servers 192.168.122.1;
>>   range 192.168.122.2 192.168.122.254;
>> }
>>

Here is the line in the source, ./common/tree.c - it is evaluating an
expression and the 45 is the "operation". Looking in includes/tree.c,
operator 46 is expr_funcall (whatever that means)

int write_expression (file, expr, col, indent, firstp)
...
        switch (expr -> op) {
...
              default:
                log_fatal ("invalid expression type in print_expression: %d",
                           expr -> op);
        }
        return col;
}

I have a pretty early copy of the 4.1.1 source, but when I compare with
4.3.2 source there is a case expr_funcall in that switch statement now. Is
it possible you used a late version that has written something the older
version can now no longer parse? Is it possible to upgrade to the newest
release you can (ie later 4.1.1 or perhaps compile your own latest
version?

My guess is that it has written something to the leases file, and now
can't evaluate it properly. So that's where I'd look.

regards,
-glenn




More information about the dhcp-users mailing list