/[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 166 by dpavlin, Thu Aug 6 18:09:17 2009 UTC revision 167 by dpavlin, Thu Aug 6 20:14:43 2009 UTC
# Line 145  sub process_packet { Line 145  sub process_packet {
145          };          };
146    
147          my @requested = split(/\s/, $dhcp->getOptionValue(DHO_DHCP_PARAMETER_REQUEST_LIST));          my @requested = split(/\s/, $dhcp->getOptionValue(DHO_DHCP_PARAMETER_REQUEST_LIST));
148          warn "options ",dump( $options ), ' requested: ',dump( @requested );          warn "options ",dump( $options ), ' requested: ',dump( @requested ) if $debug;
149    
150            my @missing;
151          foreach ( @requested ) {          foreach ( @requested ) {
152                  $packet->{$_} = $options->{$_} if defined $options->{$_};                  if ( defined $options->{$_} ) {
153                            $packet->{$_} = $options->{$_};
154                    } else {
155                            push @missing, $_;
156                    }
157          }          }
158    
159            warn "W: options requested but missing: ",dump( @missing );
160    
161          foreach my $opt ( 'magic', 'config_file', 'path_prefix', 'reboot_time' ) {          foreach my $opt ( 'magic', 'config_file', 'path_prefix', 'reboot_time' ) {
162                  my $DH0 = eval 'DHO_PXELINUX_' . uc $opt;                  my $DH0 = eval 'DHO_PXELINUX_' . uc $opt;
163                  warn "DH0: $@" if $@;                  warn "DH0: $@" if $@;
164                  my $v = eval "\$pxelinux::$opt";                  my $v = eval "\$pxelinux::$opt";
165                  warn "v: $@" if $@;                  warn "v: $@" if $@;
166                  next unless defined $v;                  next unless defined $v;
167                  warn "pxelinux dhcp option $opt = $DH0 = $v";                  warn "pxelinux dhcp option $opt = $DH0 = $v\n" if $debug;
168                  $packet->{ $DH0 } = $v;                  $packet->{ $DH0 } = $v;
169          }          }
170    
# Line 183  sub process_packet { Line 191  sub process_packet {
191                  log::mac $mac, "$messagetype igored (bootp?)";                  log::mac $mac, "$messagetype igored (bootp?)";
192          }          }
193    
         warn "packet ",dump( $packet );  
   
194          warn ">> $mac == $ip server: $server::ip", $file ? " file: $file\n" : "\n" if $debug;          warn ">> $mac == $ip server: $server::ip", $file ? " file: $file\n" : "\n" if $debug;
195    
196          $packet = new Net::DHCP::Packet( %$packet );          $packet = new Net::DHCP::Packet( %$packet );

Legend:
Removed from v.166  
changed lines
  Added in v.167

  ViewVC Help
Powered by ViewVC 1.1.26