Opened 3 years ago

Closed 17 months ago

#5265 closed enhancement (wontfix)

ISC DHCP expression

Reported by: fdupont Owned by:
Priority: very low Milestone: ISC DHCP migration
Component: Unclassified Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

ISC DHCP supports "expressions" of 3 types: boolean, data (string) and numeric (integer).
They can be used for matching classes, set option values, etc.
Unfortunately this system is not fully consistent, for instance if you'd like to set an option to true:

option ip-forwarding = true;

This does not work because true is not a keyword and is parsed as a variable reference. As it is not set at runtime it will be evaluated as null so false...
If you try a constant true expression (aka tautology):

option ip-forwarding = 'foo' = 'foo';

In this case you specify a boolean expression when the system wants a data expression so refused this attempt at parsing time.
Note it is worse for integers, in:

option default-ip-ttl = 12;

the 12 is in hexadecimal so in fact is 18... If you want a decimal value you need a context where a number is expected.
Cf KB references:
https://kb.isc.org/article/AA-00334/56/Do-the-list-of-parameters-in-the-dhcp-parameter-request-list-need-to-be-in-hex.html

and about inconsistencies in output/display:

https://kb.isc.org/article/AA-01039/56/Formatting-MAC-addresses-in-dhcpd-or-why-does-binary-to-ascii-strip-leading-zeroes.html

Subtickets

Change History (1)

comment:1 Changed 17 months ago by fdupont

  • Resolution set to wontfix
  • Status changed from new to closed

Replaced by gitlab 247

Note: See TracTickets for help on using tickets.