Re: Server configuration using conditional evaluation

[email protected] Mon, 13 Feb 2023 15:02:42 +1100
Newsgroups gmane.network.dhcp.isc.dhcp-client
Message-ID <cd244f66b323d3e0c0036f524b247878__20112.8387868934$1676261015$gmane$org@uniq.com.au>
The dhcp-eval man page shows the syntax for switch(), binary-to-ascii() 
and substring(). It's important that you use the right length for the 
substring() so that it can do the binary-to-ascii() correctly. It might 
be that the value from the switch is null or not calculated as you 
expected.

switch (binary-to-ascii(16, 32, ".", substring(option dhcp6.ia-na, 0, 
4)))

Here the substring() is taking the 4 bytes starting at offset 0 - the 
first four bytes.

Then binary-to-ascii is treating that as a 32 bit number and displaying 
it as two 16 bit numbers with a "." in  between. Do you know what the 
dhcp6.ia-na is that is being sent so you can manually confirm the 
function is doing what you expect?

regards,
Glenn

On 2023-02-12 22:47, Darren Ankney wrote:
> The error could start earlier than what you've shown here.  Have a
> look earlier in your file and see if there are missing } or if there
> are unterminated ' or " which would mask your ending }  ATM, I can't
> seem to find man pages for ISC DHCP documenting the use of switch, so
> I'll just assume you've used the correct syntax there.
> 
> On Sat, Feb 11, 2023 at 12:20 PM Thomas Köller
> <[email protected]> wrote:
>> 
>> Am 11.02.23 um 18:09 schrieb Greg Sloop <[email protected]>:
>> > This config didn't start out as a Windows file with cr lf line endings
>> > did it? (And is still in that format?)
>> 
>> No, definitely not, all line endings ar lf only.
>> --
>> ISC funds the development of this software with paid support 
>> subscriptions. Contact us at https://www.isc.org/contact/ for more 
>> information.
>> 
>> dhcp-users mailing list
>> [email protected]
>> https://lists.isc.org/mailman/listinfo/dhcp-users
-- 
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/dhcp-users