Changeset 402

Show
Ignore:
Timestamp:
05/29/07 16:58:50 (1 year ago)
Author:
kindlund
Message:

Reenabled FW support; improved manager logging.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-filesystem/lib/HoneyClient/Manager.pm

    r401 r402  
    561561    $vmMAC = $som->result(); 
    562562 
     563 
    563564    # Figure out when the Agent on the VM is alive and well. 
    564565    $ret = undef; 
     566    my $logMsgPrinted = 0; 
    565567    while (!$ret) { 
    566568        sleep (3); 
     
    573575 
    574576        if (defined($vmIP)) { 
     577            if (!$logMsgPrinted) { 
     578                $LOG->info("Created clone VM (" . $vmName . ") using IP (" . $vmIP . ") and MAC (" . $vmMAC . ")."); 
     579                $logMsgPrinted = 1; 
     580            } 
    575581 
    576582            # Try contacting the Agent; ignore any faults. 
     
    601607    } 
    602608 
    603     $LOG->info("Created clone '" . $vmName . "' using IP (" . $vmIP . ") and MAC (" . $vmMAC . ")."); 
    604  
    605609    # Build our VM's connection table. 
    606610    # Note: We assume our VM has a single MAC address 
     
    620624   
    621625    # Initialize the firewall. 
    622 #    $stubFW->fwInit(); 
     626    $stubFW->fwInit(); 
    623627 
    624628    # Add new chain, per cloned VM. 
    625 #    $stubFW->addChain($vmStateTable); 
     629    $stubFW->addChain($vmStateTable); 
    626630    
    627631    sleep (2); 
     
    711715                # Delete the old firewall rules, based upon existing 
    712716                # targets. 
    713 #                $stubFW->deleteRules($vmStateTable); 
     717                $stubFW->deleteRules($vmStateTable); 
    714718 
    715719                # Get the new targets from the Agent. 
     
    723727 
    724728                # Add the new targets from the Agent. 
    725 #                $stubFW->addRules($vmStateTable); 
     729                $stubFW->addRules($vmStateTable); 
    726730 
    727731                print "Calling run()...\n"; 
     
    738742                    # the daemon, in which case, we indefinately try to reset the 
    739743                    # firewall accordingly. 
    740 #                    $stubFW->fwInit(); 
    741 #                    $stubFW->addChain($vmStateTable); 
    742 #                    $stubFW->addRules($vmStateTable); 
     744                    $stubFW->fwInit(); 
     745                    $stubFW->addChain($vmStateTable); 
     746                    $stubFW->addRules($vmStateTable); 
    743747                }; 
    744748                if (!$@) {