Commit 9e4a71e0 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor fixes so that layer 2 links between directly connected PCs work.

I had done this a while ago, but broke it slightly when I added MLE
stuff.
parent f43c4578
...@@ -5452,10 +5452,9 @@ sub InterpLinksAux($) ...@@ -5452,10 +5452,9 @@ sub InterpLinksAux($)
$self->printdb("LINK simple: $virtA,$virtB - ". $self->printdb("LINK simple: $virtA,$virtB - ".
"$nodeA:$portA,$nodeB:$portB\n"); "$nodeA:$portA,$nodeB:$portB\n");
if ($virtlan->_layer() == 1 || $direct) { if ($virtlan->_layer() == 1) {
# #
# Just a wire. At layer two, its a wire between # Just a wire.
# two nodes.
# #
$protolink = ProtoLan->Create($experiment, $lan, $protolink = ProtoLan->Create($experiment, $lan,
$self->impotent() || $self->impotent() ||
...@@ -5558,7 +5557,12 @@ sub InterpLinksAux($) ...@@ -5558,7 +5557,12 @@ sub InterpLinksAux($)
$protolink = ProtoLan->Create($experiment, $lan, $protolink = ProtoLan->Create($experiment, $lan,
$self->impotent() || $self->impotent() ||
$self->alloconly()); $self->alloconly());
$protolink->SetType("vlan"); #
# At layer 2, a direct link is a wire between two
# interfaces. We want them setup like any layer 2
# link.
#
$protolink->SetType(($direct ? "direct" : "vlan"));
$protolink->SetRole("link/lan"); $protolink->SetRole("link/lan");
$protolink->SetAttribute("link/lan", $lan); $protolink->SetAttribute("link/lan", $lan);
$protolink->AddInterface($nodeA, $vnodeA, $vportA, $portA); $protolink->AddInterface($nodeA, $vnodeA, $vportA, $portA);
......
Supports Markdown
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