[netcf-devel] Multiple interfaces with identical mac-addresses
Daniel P. Berrange
berrange at redhat.com
Tue Jun 23 20:47:34 UTC 2009
On Tue, Jun 23, 2009 at 01:48:51PM -0400, Laine Stump wrote:
> On 06/11/2009 06:28 PM, David Lutterkort wrote:
> > On Wed, 2009-06-10 at 11:30 +0200, Jonas Eriksson wrote:
> >
> > You are right - we need a slightly more complicated interface to cover
> > those cases, something like
> >
> > int ncf_lookup_by_mac_string(struct netcf *, const char *mac, int maxifs, struct netcf_if **interfaces);
> >
> > where the return value gives the total number of toplevel interfaces
> > that match the given MAC, the (randomly) first MAXIFS many are returned
> > in INTERFACES. Does that sound better ?
>
>
> In the libvirt code that I'd already written using the old version of
> this function, I was using the MAC address as a cookie that could get me
> back the original netcf_if at any point in the future (assuming the
> interface hadn't been deleted from the config). If multiple interfaces
> can have the same MAC address, that's not going to fly.
Why would we ever have duplicate MAC addresses? I realize that when you
configure a bonding device bond0, each eth0 and eth1 enslaved will be
configured with the same MAC address. We're not managing those as devices
directly though. We only care about doing a lookup of the 'end point'
interfaces, eg bond0, so fact that eth0 and eth1 have the same MAC should
not impact us.
> Will the interface's name always be unique? If so, I'll switch to using
> that, and that will solve all problems but one (the libvirt public API
> that retrieves interface by MAC address).
Interface names must be unique
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the netcf-devel
mailing list