On Fri, 2012-07-06 at 14:25 -0700, Haiyang Zhang wrote:
> This adds support for setting synthetic NIC MAC address from within Linux
> guests. Before using this feature, the option "spoofing of MAC address"
> should be enabled at the Hyper-V manager / Settings of the synthetic
> NIC.
[...]
> +int rndis_filter_set_device_mac(struct hv_device *hdev, char *mac)
> +{
[...]
> +     t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
> +     if (t == 0) {
> +             netdev_err(ndev, "timeout before we got a set response...\n");
> +             /*
> +              * can't put_rndis_request, since we may still receive a
> +              * send-completion.
> +              */
> +             return -EBUSY;
> +     } else {
> +             set_complete = &request->response_msg.msg.set_complete;
> +             if (set_complete->status != RNDIS_STATUS_SUCCESS)
> +                     ret = -EINVAL;
[...]

Is there a specific error code that indicates the hypervisor is
configured not to allow MAC address changes?  If so, shouldn't that be
translated to return EPERM rather than EINVAL?

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to