[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address v
From: |
Alex Williamson |
Subject: |
[Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config |
Date: |
Wed, 14 Jan 2009 08:34:58 -0700 |
On Wed, 2009-01-14 at 12:05 +0200, Dor Laor wrote:
> Alex Williamson wrote:
> > +static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t
> > *config)
> > +{
> > + VirtIONet *n = to_virtio_net(vdev);
> > + struct virtio_net_config netcfg;
> > +
> > + memcpy(&netcfg, config, sizeof(netcfg));
> > +
> > + if (memcmp(netcfg.mac, n->mac, 6)) {
> > + memcpy(n->mac, netcfg.mac, 6);
> > + qemu_format_nic_info_str(n->vc, n->mac);
> > + }
> > +}
> > +
> >
>
> What if the guest will chose the host's mac?
> Thinking about it, I don't think we should test that.
> A concerned host mgmt app can add ebtables roles for such a case.
>
> Maybe we can optionally allow/deny it?
What's the topology you're thinking of that the virtio-net MAC is also
the host MAC? I typically use a bridge with a tap device, so the
virtio-net MAC is isolated from the host. Thanks,
Alex
--
Alex Williamson HP Open Source & Linux Org.
- [Qemu-devel] [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Alex Williamson, 2009/01/13
- [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Dor Laor, 2009/01/14
- [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config,
Alex Williamson <=
- Re: [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Jamie Lokier, 2009/01/14
- Re: [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Dor Laor, 2009/01/14
- Re: [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Dor Laor, 2009/01/14
- Re: [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Paul Brook, 2009/01/14
- Re: [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Jamie Lokier, 2009/01/15
- Re: [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Jamie Lokier, 2009/01/15
- Re: [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Avi Kivity, 2009/01/15
- Re: [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Dor Laor, 2009/01/18
- Re: [Qemu-devel] Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config, Avi Kivity, 2009/01/18