Commit e459ec0d authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Make sure the physical interface underlying veth interfaces, have

their current_speed set properly (max speed for the interface type),
so that they are configured properly during boot.
parent 5c920c54
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -3117,7 +3117,15 @@ sub NewVethIface($$$;$)
my $newid = $query_result->insertid;
$newveth = "veth" . $newid;
if (!defined($pport)) {
if (defined($pport)) {
my $speed = interfacespeedmbps(physinterfacetype($pnode, $pport),
"ethernet");
DBQueryFatal("update interfaces set " .
" current_speed='$speed' " .
"where node_id='$pnode' and iface='$pport'");
}
else {
if (!defined($veth_interfaces{$lan})) {
$veth_interfaces{$lan} = {};
}
......
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