Skip to content
GitLab
Menu
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
427d9abd
Commit
427d9abd
authored
Nov 11, 2002
by
Shashi Guruprasad
Browse files
Backed off the NSE hack changes untill I can figure out a solution.
parent
fc580b5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/staticroutes.in
View file @
427d9abd
...
...
@@ -324,55 +324,41 @@ foreach my $route (keys(%routes)) {
my
$hop
=
$routes
{
$route
};
my
$type
=
'
host
';
# XXX NSE hack: We need all routes
# Installing the route in the directly connected case is harmless
#
# If directly connected, skip.
#
#
if ($dst eq $hop) {
#
next;
#
}
if
(
$dst
eq
$hop
)
{
next
;
}
#
# This is the lan that contains the src and hop. (the link).
#
my
$srclan
=
$rlans
{"
$src
:
$hop
"};
my
$dstlan
;
# XXX NSE hack: We need all the routes
if
(
$dst
eq
$hop
)
{
$dstlan
=
$srclan
;
if
(
$debug
)
{
print
"
$src
-->
$dst
:
$hop
:
$dst
\n
";
}
}
else
{
#
# Now we need to find the destination lan (link) by stepping through
# each hop till we get to it.
#
my
$nhop
=
$hop
;
while
(
1
)
{
#
# Now we need to find the destination lan (link) by stepping through
# each hop till we get to it.
#
my
$nhop
=
$hop
;
while
(
1
)
{
# Next hop to destination.
if
(
!
defined
(
$routes
{"
$nhop
:
$dst
"}))
{
die
("
*** $0:
\n
"
.
"
Failed to find route:
$nhop
:
$dst
!
\n
");
die
("
*** $0:
\n
"
.
"
Failed to find route:
$nhop
:
$dst
!
\n
");
}
my
$nnhop
=
$routes
{"
$nhop
:
$dst
"};
# Last hop to destination.
if
(
$nnhop
eq
$dst
)
{
last
;
last
;
}
$nhop
=
$nnhop
;
}
$dstlan
=
$rlans
{"
$nhop
:
$dst
"};
if
(
$debug
)
{
}
my
$dstlan
=
$rlans
{"
$nhop
:
$dst
"};
if
(
$debug
)
{
print
"
$src
-->
$dst
:
$nhop
:
$dst
\n
";
}
}
#
...
...
Write
Preview
Supports
Markdown
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