Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
17c47eb3
Commit
17c47eb3
authored
Aug 29, 2018
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GetJailIP() which is only used when ops is a jail on boss.
parent
7ec685f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
db/Node.pm.in
db/Node.pm.in
+8
-18
No files found.
db/Node.pm.in
View file @
17c47eb3
...
...
@@ -3833,24 +3833,14 @@ sub GetJailIP($;$)
}
}
my
$
node_id
=
$
self
->
node_id
();
my
$
query_result
=
DBQueryWarn
(
"SELECT IP, mask FROM virt_node_public_addr WHERE "
.
"node_id='$node_id'"
);
if
(
$
query_result
&&
$
query_result
->
numrows
)
{
#
we
've assigned a public address to this one
return $query_result->fetchrow_array();
} else {
my $nodenumlimit = $ISUTAH ? 200 : 254;
my $pnet = $IPBASE2;
my $pnode2 = int($ipbase);
while ($pnode2 > $nodenumlimit) {
$pnet++;
$pnode2 -= $nodenumlimit;
}
return ("${IPBASE1}.${pnet}.${pnode2}.${num}", $JAILIPMASK);
}
my
$
nodenumlimit
=
$
ISUTAH
?
200
:
254
;
my
$
pnet
=
$
IPBASE2
;
my
$
pnode2
=
int
($
ipbase
);
while
($
pnode2
>
$
nodenumlimit
)
{
$
pnet
++;
$
pnode2
-=
$
nodenumlimit
;
}
return
(
"${IPBASE1}.${pnet}.${pnode2}.${num}"
,
$
JAILIPMASK
);
}
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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