...
 
Commits (2)
...@@ -6292,6 +6292,10 @@ sub InterpLinks($) ...@@ -6292,6 +6292,10 @@ sub InterpLinks($)
# Total hack ... see snmpit. # Total hack ... see snmpit.
$protovlan->SetAttribute("trunk_mode", "dual"); $protovlan->SetAttribute("trunk_mode", "dual");
# Well, if there are no experimental interfaces, we want to kill
# the protovlan so that it does not confused snmpit.
my $iface_counter = 0;
foreach my $pnode (@sharedpnodes) { foreach my $pnode (@sharedpnodes) {
my $pnodename = $pnode->node_id(); my $pnodename = $pnode->node_id();
my @interfaces; my @interfaces;
...@@ -6365,7 +6369,12 @@ sub InterpLinks($) ...@@ -6365,7 +6369,12 @@ sub InterpLinks($)
or return -1 if (!($self->impotent() || or return -1 if (!($self->impotent() ||
$self->alloconly())); $self->alloconly()));
} }
$iface_counter++;
}
} }
if (!$iface_counter) {
$self->printdb("No interfaces in shared vlan, killing protovlan\n");
$protovlan->Destroy();
} }
} }
......
<?php <?php
# #
# Copyright (c) 2000-2017 University of Utah and the Flux Group. # Copyright (c) 2000-2017, 2019 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -261,6 +261,22 @@ else { ...@@ -261,6 +261,22 @@ else {
PAGEFOOTER($view); PAGEFOOTER($view);
die(""); die("");
} }
else if ($dologin_status == DOLOGIN_STATUS_IPFREEZE) {
# Short delay.
sleep(1);
$IP = $_SERVER['REMOTE_ADDR'];
PAGEHEADER("Login", $view);
echo "<h4>
There have been too many failures from your IP address, we
have blocked $IP from further attempts.
You must contact $TBMAILADDR to have this IP unblocked.
<br> <br>
Please do not attempt to login again; it will not work!
</h4>\n";
PAGEFOOTER($view);
die("");
}
else if ($dologin_status == DOLOGIN_STATUS_INACTIVE) { else if ($dologin_status == DOLOGIN_STATUS_INACTIVE) {
# Short delay. # Short delay.
sleep(1); sleep(1);
......
...@@ -905,6 +905,8 @@ function DOLOGIN($token, $password, $adminmode = 0, $nopassword = 0) { ...@@ -905,6 +905,8 @@ function DOLOGIN($token, $password, $adminmode = 0, $nopassword = 0) {
$ipfrozen = $iprow['frozen']; $ipfrozen = $iprow['frozen'];
if ($ipfrozen) { if ($ipfrozen) {
#TBMAIL('stoller', "Login Debug", "Disabled IP $token $IP");
DBQueryFatal("update login_failures set ". DBQueryFatal("update login_failures set ".
" failcount=failcount+1, ". " failcount=failcount+1, ".
" failstamp='$now' ". " failstamp='$now' ".
......