Commit e59c6569 authored by Mike Hibler's avatar Mike Hibler

Always return a valid VMAC even if it may not be used

(we used to return one just for veth encap).
parent 67c6f075
......@@ -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 ($isveth) {
if ($ip =~ /^\d+\.\d+\.\d+\.\d+$/) {
$mac = sprintf "0000%.2x%.2x%.2x%.2x", split(/\./, $ip);
} else {
$mac = "000000000000";
......
......@@ -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 ($isveth) {
if ($ip =~ /^\d+\.\d+\.\d+\.\d+$/) {
$mac = sprintf "0000%.2x%.2x%.2x%.2x", split(/\./, $ip);
} else {
$mac = "000000000000";
......
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