/[pxelator]/lib/PXElator/dhcpd.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/dhcpd.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 456 by dpavlin, Sat Jan 2 15:49:09 2010 UTC revision 464 by dpavlin, Sun Jan 3 18:11:48 2010 UTC
# Line 121  sub process_packet { Line 121  sub process_packet {
121    
122          config::for_ip( $ip );          config::for_ip( $ip );
123    
124          my $server;          my $server = server::as_hash_for $ip;
         map { $server->{ $_ } = eval '$server::' . $_ } ( 'ip', 'netmask', 'bcast', 'domain' );  
   
         if ( my $force = client::conf( $ip => 'dhcpd.pl' ) ) {  
                 eval $force;  
                 die "$force\n$@" if $@;  
                 warn "force server ", dump $server;  
         }  
125    
126          my $packet = {          my $packet = {
127                  Op              => BOOTREPLY(),                  Op              => BOOTREPLY(),
# Line 146  sub process_packet { Line 139  sub process_packet {
139    
140          my $options = {          my $options = {
141                  DHO_SUBNET_MASK()       => $server->{netmask},                  DHO_SUBNET_MASK()       => $server->{netmask},
142                  DHO_ROUTERS()           => $server->{ip},                  DHO_ROUTERS()           => ( $server->{gw} || $server->{ip} ),
143                  DHO_DOMAIN_NAME()       => $server->{domain},                  DHO_DOMAIN_NAME()       => $server->{domain},
144                  DHO_NAME_SERVERS()      => $server->{ip},                  DHO_NAME_SERVERS()      => $server->{ip},
145                  DHO_DOMAIN_NAME_SERVERS() => $server->{ip},                  DHO_DOMAIN_NAME_SERVERS() => ( $server->{dns} || $server->{ip} ),
146                  DHO_HOST_NAME()         => client::conf( $ip, 'hostname' ),                  DHO_HOST_NAME()         => client::conf( $ip, 'hostname' ),
147                  DHO_BROADCAST_ADDRESS() => $server->{bcast},                  DHO_BROADCAST_ADDRESS() => $server->{bcast},
148  #               DHO_NTP_SERVERS() => '',  #               DHO_NTP_SERVERS() => '',

Legend:
Removed from v.456  
changed lines
  Added in v.464

  ViewVC Help
Powered by ViewVC 1.1.26