Vincent Magnin | 1 May 2012 16:01
Picon
Picon
Favicon

Fix for custom DHCPD options

Dear Netdot Users,

According to "man dhcp-options", new options are declared as follows:

> option new-name code new-code = definition ;

I've found a related issue on Netdot 0.9-git (also found on Netdot 1.0-git):

> diff --git a/lib/Netdot/Model/DhcpScope.pm b/lib/Netdot/Model/DhcpScope.pm
> index 77a6a0e..2edb5b3 100644
> --- a/lib/Netdot/Model/DhcpScope.pm
> +++ b/lib/Netdot/Model/DhcpScope.pm
>  <at>  <at>  -638,7 +638,7  <at>  <at>  sub _print {
>             elsif ( $data->{$id}->{type} eq 'global' &&               
>        defined $code && defined $format ){
>                 # Assume that user is trying to define a new option
> -               print $fh " $code = $format";
> +               print $fh " code $code = $format";
>             }
>             print $fh ";\n";
>

Regards,

Vincent

Carlos Vicente | 1 May 2012 19:12
Favicon

Re: Fix for custom DHCPD options

Hi Vincent,

Thank you. The change has been applied towards v1.0

cv

On 5/1/12 10:01 AM, Vincent Magnin wrote:
> Dear Netdot Users,
> 
> According to "man dhcp-options", new options are declared as follows:
> 
>> option new-name code new-code = definition ;
> 
> I've found a related issue on Netdot 0.9-git (also found on Netdot 1.0-git):
> 
>> diff --git a/lib/Netdot/Model/DhcpScope.pm b/lib/Netdot/Model/DhcpScope.pm
>> index 77a6a0e..2edb5b3 100644
>> --- a/lib/Netdot/Model/DhcpScope.pm
>> +++ b/lib/Netdot/Model/DhcpScope.pm
>>  <at>  <at>  -638,7 +638,7  <at>  <at>  sub _print {
>>             elsif ( $data->{$id}->{type} eq 'global' &&               
>>        defined $code && defined $format ){
>>                 # Assume that user is trying to define a new option
>> -               print $fh " $code = $format";
>> +               print $fh " code $code = $format";
>>             }
>>             print $fh ";\n";
>>
> 
> 
(Continue reading)


Gmane