Commit 8db4a8a9 authored by Leigh Stoller's avatar Leigh Stoller

More bridge fixes, related to Nick changing the bridge class.

parent 2c430720
......@@ -1827,7 +1827,7 @@ sub new($$$)
my $source = GetText("source", $ref);
my $capacity = GetText("capacity", $ref);
my $latency = GetText("latency", $ref);
my $lossrate = GetText("packet_loss", $ref);
my $lossrate = GetText("lossrate", $ref);
# Geni-lib will always add the node to the iface_id.
my ($tmp,$iface_id) = split(":", $source);
......
......@@ -213,8 +213,7 @@ sub GenerateNodeStatements($)
foreach my $k (sort(keys(%{$node->pipes()}))) {
my $p = $node->pipes()->{$k};
my $pname = ($p->{'iface_id'} eq $if0
? "pipe('$if0')" : "pipe('$if1')");
my $pname = ($p->{'iface_id'} eq $if0 ? "pipe0" : "pipe1");
$node->addTagStatement("${pname}.bandwidth = ". $p->capacity())
if (defined($p->capacity()));
......@@ -365,7 +364,12 @@ sub GenerateNodeStatements($)
# the internally created interface, not add another one.
#
if ($ntype eq "delay") {
$node->addStatement("$itag = ${ntag}.interface('$iface_id')");
my ($iface0, $iface1) = values(%{$node->{'ifaces'}});
my (undef,$if0) = split(":", $iface0->{'client_id'});
my (undef,$if1) = split(":", $iface1->{'client_id'});
my $iname = ($iface_id eq $if0 ? "iface0" : "iface1");
$node->addStatement("$itag = ${ntag}.${iname}");
if ($addr) {
$node->addStatement("${itag}.addAddress($addr)");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment