Show
Ignore:
Timestamp:
02/22/10 04:40:21 (2 years ago)
Author:
Ted Faber <faber@…>
Children:
2b11a1d726b3605cdc7df9978925a09a8ab8a23c
Parents:
238db1e65f3d8b44b2b0cb6afd4527ef192804fb
git-committer:
Ted Faber <faber@isi.edu> / 2010-02-22T12:40:21Z+0000
Message:

Supporting nodes connected by transit networks

Location:
fedkit
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • fedkit/active_config.pl

    rc3a3fe3 r55779d4  
    4242exit(20) if $?; 
    4343 
    44 my $f = new IO::File($iface_file) || die "Can't open $iface_file: $!\n"; 
    45 my $ifnum = 0; 
    4644 
    4745print "Waiting for ssh on $peer\n"; 
     
    5250    "-i $ssh_privkey $peer ls", 5*60); 
    5351 
    54 while (<$f>) { 
    55     /([[:alnum:]]+)\s+([\d\.]+)/ && do { 
    56         my ($iface, $addr) = ($1, $2); 
     52if (my $f = new IO::File($iface_file)) { 
     53    my $ifnum = 0; 
     54    while (<$f>) { 
     55        /([[:alnum:]]+)\s+([\d\.]+)/ && do { 
     56            my ($iface, $addr) = ($1, $2); 
    5757 
    58         my $cmd = "$ssh -w $ifnum:$ifnum -o \"Tunnel ethernet\" " .  
    59             "-o \"StrictHostKeyChecking no\" -i $ssh_privkey " . 
    60             "$peer perl -I$fedkit_dir/lib $fedkit_dir/bin/setup_bridge.pl " . 
    61             "--tapno=$ifnum --dest=$addr &"; 
    62         system($cmd); 
    63         die if $?; 
    64         gateway_lib::bind_tap_to_iface($ifnum, $iface, $addr); 
    65         $ifnum++; 
    66     }; 
     58            my $cmd = "$ssh -w $ifnum:$ifnum -o \"Tunnel ethernet\" " .  
     59                "-o \"StrictHostKeyChecking no\" -i $ssh_privkey " . 
     60                "$peer perl -I$fedkit_dir/lib $fedkit_dir/bin/setup_bridge.pl " . 
     61                "--tapno=$ifnum --dest=$addr &"; 
     62            system($cmd); 
     63            die if $?; 
     64            gateway_lib::bind_tap_to_iface($ifnum, $iface, $addr); 
     65            $ifnum++; 
     66        }; 
     67    } 
     68    $f->close(); 
    6769} 
    68 $f->close(); 
     70else { 
     71    warn "Can't open $iface_file: $!\n"; 
     72} 
    6973exit(0); 
    7074 
  • fedkit/federate.pl

    r6d985c0 r55779d4  
    7979copy("/tmp/hosts", "/etc/hosts"); 
    8080 
     81# If there are tunnelip interfaces to bring up, bring 'em 
     82system("$perl -I/usr/local/federation/lib " .  
     83    "/usr/local/federation/bin/config_from_tunnelip.pl"); 
     84 
    8185 
    8286if ($services{'userconfig'}) { 
  • fedkit/prep_gateway.pl

    r8d4e4fb r55779d4  
    4343    # Add the route to a peer.  Wait up to an hour for the peer's IP address to 
    4444    # appear in the DNS. 
    45     gateway_lib::add_route($peer, $router, 1, 60 *60); 
     45    gateway_lib::add_route($peer, $router, 1, 60 *60)  
     46        if $peer && $router; 
    4647} 
    4748