Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
b13ca759
Commit
b13ca759
authored
Sep 23, 2011
by
Leigh B Stoller
Browse files
Fix for shared nodes; when setting up the lan, be sure we do not
include interfaces that link to the layer 1 switch.
parent
e18adc86
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/libvtop_test.pm.in
View file @
b13ca759
...
...
@@ -25,6 +25,7 @@ use Node;
use NodeType;
use Lan;
use OSinfo;
use Port;
use English;
use Data::Dumper;
use Carp;
...
...
@@ -5200,6 +5201,35 @@ sub InterpLinks($)
if ($interface->role() ne TBDB_IFACEROLE_EXPERIMENT() ||
!$wiredup);
#
# Gack. We need to make sure that we are connected to an
# ethernet switch, not something like an apcon or another
# node. Use the Port library for this.
#
my $port = Port->GetOtherEndByIface($pnodename, $iface);
if (!defined($port)) {
tberror("Could not get Port other end for $interface\n");
return -1;
}
next
if (! $port->is_switch_side());
my $switchname = $port->node_id();
my $switch = Node->Lookup($switchname);
if (!defined($switch)) {
tberror("Could not lookup node object for $switchname\n");
return -1;
}
my $forwarding_protocols;
if ($switch->NodeTypeAttribute("forwarding_protocols",
\$forwarding_protocols) ||
!defined($forwarding_protocols) ||
$forwarding_protocols eq "") {
tberror("No forwarding_protocols set for $switch\n");
return -1;
}
next
if ($forwarding_protocols ne "ethernet");
my $speed = $self->interfacespeedmbps($type, "ethernet");
DBQueryWarn("update interfaces set " .
" current_speed='$speed',trunk=1 " .
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment