Changeset 4a02274 for fedkit


Ignore:
Timestamp:
Mar 10, 2014 11:12:49 AM (11 years ago)
Author:
Ted Faber <faber@…>
Branches:
master
Children:
a2ca699
Parents:
26821ac (diff), dffa585 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into shared_nat

Location:
fedkit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fedkit/gateway_lib.pm

    r26821ac r4a02274  
    434434}
    435435
     436# Fling a few ping packets at the peer in the hopes that it opens doors through
     437# NATs and other filters.  Practically speaking this can make a big difference.
     438sub ping_peer {
     439    my($peer) = @_;
     440    system("ping -c 5 $peer");
     441}
     442
    436443sub testcmd_repeat {
    437444    my($cmd, $timeout, $sleep) = @_;
  • fedkit/prep_gateway.pl

    r26821ac r4a02274  
    8989    # appear in the DNS.
    9090    foreach my $p (split(/\s*,\s*/, $peer)) {
    91         gateway_lib::add_route($p, $router, 1, 60 *60)
    92             if $p && $router;
     91        if ($p && $router ) {
     92            gateway_lib::add_route($p, $router, 1, 60 *60);
     93            # grease the skids
     94            gateway_lib::ping_peer($p);
     95        }
    9396    }
    9497}
  • fedkit/setup_bridge.pl

    r26821ac r4a02274  
    1313my $fedkit_dir= "/usr/local/federation";
    1414my $perl = "/usr/bin/perl";
     15my $peer;
    1516my $use_file;
    1617my %opts = (
     
    1819    'addr=s' => \$addr,
    1920    'dest=s' => \$dest,
     21    'peer=s' => \$peer,
    2022    'use_file', \$use_file,
    2123);
    2224
    2325exit(20) unless GetOptions(%opts);
    24 gateway_lib::read_config(gateway_lib::emulab_config_filename(), \%opts)
     26gateway_lib::read_config(gateway_lib::config_filename(), \%opts)
    2527    if $use_file;
    2628
     
    3436
    3537gateway_lib::bind_tap_to_iface($tapno, $iface);
     38gateway_lib::ping_peer($peer)
     39    if $peer;
    3640
    3741exit(0);
Note: See TracChangeset for help on using the changeset viewer.