"raw packet not available" when execute() on release (solved)

Glenn Satchell glenn.satchell at uniq.com.au
Thu May 3 23:27:50 UTC 2012


Using an option in the global space means that these values will be 
added to every dhcp packet sent to every client. Not really what you 
want or need.

You may still need to check if the ip4 address is set before trying to 
assign it. I suspect there are lots of warning messages in the logs 
about value not being available.

regards,
-glenn

On 05/04/12 01:09, Niall O'Reilly wrote:
>
> On 3 May 2012, at 14:38, Nicolas C. wrote:
>
>> # Declared globally
>> option cache-ipv4 code 190 = text;
>> option cache-mac code 191 = text;
>
> 	I'm surprised you needed to declare any options.
> 	I didn't find it necessary.  A simple 'set' was enough.
>
> 	For example:
>
> joe(user)4: grep vendor-string /var/netdb/dhcpd/scarr/tailored-dhcpd.conf
>      set vendor-string = option vendor-class-identifier;
> joe(user)5:
>
> 	IIUC, the object manipulated by the 'set' command is a
> 	dynamically-created per-lease state variable rather than an option.
>
>> # Declared in the subnet
>> set cache-ipv4 = binary-to-ascii(10, 8, ".", leased-address);
>> set cache-mac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
>>
>> on expiry {
>>         execute (
>>                 "/usr/local/bin/ddns-ipv6",
>>                 prefix,
>>                 "-d",
>>                 ddns-hostname,
>>                 cache-mac,
>>                 cache-ipv4
>>         );
>> }
>
> 	Neat!
>
>> Thanks!
>
> 	Ravi!
> 	/Niall
>


More information about the dhcp-users mailing list