Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
e59c6569
Commit
e59c6569
authored
Jul 07, 2009
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always return a valid VMAC even if it may not be used
(we used to return one just for veth encap).
parent
67c6f075
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
tbsetup/assign_wrapper.in
tbsetup/assign_wrapper.in
+2
-2
tbsetup/libvtop.pm.in
tbsetup/libvtop.pm.in
+2
-2
No files found.
tbsetup/assign_wrapper.in
View file @
e59c6569
...
...
@@ -3566,9 +3566,9 @@ sub NewVirtIface($$$;$)
#
# Make up a MAC address. For now, just derive it from the assigned
# IP address.
Note that this is only needed for "veth" type interfaces.
# IP address.
#
if
(
$i
sveth
)
{
if
(
$i
p
=~
/^\d+\.\d+\.\d+\.\d+$/
)
{
$mac
=
sprintf
"
0000%.2x%.2x%.2x%.2x
",
split
(
/\./
,
$ip
);
}
else
{
$mac
=
"
000000000000
";
...
...
tbsetup/libvtop.pm.in
View file @
e59c6569
...
...
@@ -4553,9 +4553,9 @@ sub NewVirtIface($$$$;$)
#
# Make up a MAC address. For now, just derive it from the assigned
# IP address.
Note that this is only needed for "veth" type interfaces.
# IP address.
#
if ($i
sveth
) {
if ($i
p =~ /^\d+\.\d+\.\d+\.\d+$/
) {
$mac = sprintf "0000%.2x%.2x%.2x%.2x", split(/\./, $ip);
} else {
$mac = "000000000000";
...
...
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