Show
Ignore:
Timestamp:
02/05/09 18:07:56 (3 years ago)
Author:
Ted Faber <faber@…>
Children:
c8c2c6405c2e024f565f0431fa2b411e0ba8a901
Parents:
8bc5754be1b96774a8dcfb3bdd6f6ecbff8244da
git-committer:
Ted Faber <faber@isi.edu> / 2009-02-06T02:07:56Z+0000
Message:

Keith Sklower's patch to use tunnel MAC addresses if they are supplied.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • fedkit/fed-tun.pl

    rb09f346 rb0c185f  
    2525my $IFCONFIG = "/sbin/ifconfig"; 
    2626my $TMCC = "/usr/local/etc/emulab/tmcc"; 
     27my $FINDIF = "/usr/local/etc/emulab/findif"; 
    2728# If a special version of ssh is required, it will be installed in 
    2829# /usr/local/bin/ssh.  Otherwise use the usual one. 
     
    398399    print "tunnel options:  ip=$tunnel_ip mask=$tunnel_mask mac=$tunnel_mac router=$tunnel_router\n" if ($debug); 
    399400 
    400     # Sadly, we ignore the tunnel mac for now -- we should eventually 
    401     # use it to determine which interface to use, just like the 
    402     # Emulab startup scripts. 
     401    if (defined($tunnel_mac) && ($tunnel_mac ne "")) { 
     402       print "Opening $FINDIF $tunnel_mac\n" if ($debug); 
     403       open(FIF, "$FINDIF $tunnel_mac |") || die "findif failed\n"; 
     404       my $line = <FIF>; 
     405       chomp($line); 
     406       print "$FINDIF returned $line\n" if ($debug); 
     407       $tunnel_iface = $line; 
     408    } 
    403409 
    404410    system("ifconfig $tunnel_iface $tunnel_ip" .