Commit 6c66b71c authored by Leigh Stoller's avatar Leigh Stoller

Silly hack so that we can create a link over a layer1 path between two

nodes (no switch in the middle). Handy for testing, not really something
we expect people to do.
parent e9c0f1b1
......@@ -901,7 +901,7 @@ REPLACE INTO table_regex VALUES ('virt_lans','trace_db','int','redirect','defaul
REPLACE INTO table_regex VALUES ('virt_lans','fixed_iface','text','redirect','default:tinytext',0,128,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','modbase','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','compat','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','layer','int','redirect','default:tinyint',1,2,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','layer','int','redirect','default:tinyint',1,3,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','ofenabled','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','ofcontroller','text','regex','^tcp:(\\d+\\.+){3,3}\\d+:\\d+$',0,32,NULL);
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBQueryFatal("REPLACE INTO table_regex VALUES ".
"('virt_lans','layer','int','redirect',".
"'default:tinyint',1,3,NULL)");
return 0;
}
# Local Variables:
# mode:perl
# End:
......@@ -6149,10 +6149,11 @@ sub InterpLinks($)
my ($member0,$member1) = $virtlan->memberlist();
my $firstmember = $vpath->firstmember();
my $lastmember = $vpath->lastmember();
my $direct = $virtlan->_layer() == 3 ? 1 : 0;
$self->printdb("Adding link $virtlan, implemented by $vpath\n");
$self->AddLinkToSolution($vlink, 0, 0,
$self->AddLinkToSolution($vlink, 0, $direct,
$firstmember->_pnode(),
$firstmember->_pport(),
$lastmember->_pnode(),
......@@ -9154,7 +9155,7 @@ sub UpLoadIPAddresses($)
my $mask = $virtlan->_mask();
next
if ($virtlan->_layer() != 2);
if ($virtlan->_layer() != 2 && $virtlan->_layer() != 3);
foreach my $member ($virtlan->memberlist()) {
# Will this happen?
......
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