Skip to content

Commit

Permalink
refactor: return error on unknown interface type
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Case <richard.case@outlook.com>
  • Loading branch information
richardcase committed May 15, 2023
1 parent abf8c0c commit 55149e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infrastructure/microvm/cloudhypervisor/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (p *provider) buildArgs(vm *models.MicroVM, state State, logger *logrus.Ent
} else if iface.Type == models.IfaceTypeTap {
args = append(args, fmt.Sprintf("tap=%s,mac=%s", status.HostDeviceName, iface.GuestMAC))
} else {
logger.Warn("unknown network interface type", "name", iface.GuestDeviceName, "type", iface.Type)
return nil, fmt.Errorf("unknown network interface type %v for %s", iface.Type, iface.GuestDeviceName)
}
}

Expand Down

0 comments on commit 55149e5

Please sign in to comment.