Re: [PATCH]Change MAC address to case insensitive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote:
> I'll apply this today (using our STRCASEEQ macros) if no one else
> objects.

Hi,

What do you think about using a MAC-address-specific comparison
function?  I.e., one that is not only case-independent, but that also
knows leading zeros are unnecessary?

i.e., it would admit that these two match:

  00:0A:FF:3A:00:09
  0:a:ff:3a:0:9

That would be a little more user friendly.

In any case, even if we stick with simply case-ignoring, I suggest
we give it a name, like macCompare and use it consistently.
There's at least one other MAC comparison: virsh.c currently uses
xmlStrcasecmp in cmdDetachInterface:

                diff_mac = xmlStrcasecmp(tmp_mac, BAD_CAST mac);

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]